Closed JugaadiTek closed 1 year ago
I can confirm that currently there's no action for this
And I've also added the API doc that uses Google APIs Node.js lib: https://googleapis.dev/nodejs/googleapis/latest/gmail/classes/Resource$Users$Settings$Sendas.html#patch
Thanks for the request! Did you know that anyone can author and publish their own Pipedream actions? Would you be interested in helping out with that? We're happy to answer any questions or support you in any way.
If you don't have the time, would you be willing to reach out to the app provider to see if they're interested in building these? When we work with an app partner, it improves the quality of the integration, and it helps when this kind of request comes from a customer like you.
Currently we don't have the required scopes for this method. As seen in the docs, one of these is necessary:
@dannyroosevelt is adding one of these scopes be viable?
Sorry for the delay on this -- both of those are restricted scopes, which have an unreasonably high bar to get approval for, from Google.
The best solution right now would be to build out the action for the Gmail Developer app.
@Modocosm have you seen the Gmail Developer app? It uses your own custom client ID and secret from a Google Cloud Project, instead of Pipedream's app, in order to work around Google's onerous requirements. Is that a viable solution for you?
Confirmed it works with the action being developed in Gmail Developer App, just be sure the add the scope https://www.googleapis.com/auth/gmail.settings.basic
when authenticating your account in Pipedream.
Sorry for the delay on this
😄 (no worries at all) 😄
The best solution right now would be to build out the action for the Gmail Developer app. @Modocosm have you seen the Gmail Developer app? It uses your own custom client ID and secret from a Google Cloud Project, instead of Pipedream's app, in order to work around Google's onerous requirements. Is that a viable solution for you?
the google GCP Account in question is very recently setup though. No idea if that impacts that scope.
Confirmed it works with the https://github.com/PipedreamHQ/pipedream/pull/4816 in Gmail Developer App, just be sure the add the scope https://www.googleapis.com/auth/gmail.settings.basic when authenticating your account in Pipedream.
Will Confirm then
Hello @Modocosm @andrewjschuang, I've tested this action and verified it working
Some notes regarding the usage,
I need to add both scopes https://mail.google.com https://www.googleapis.com/auth/gmail.settings.basic
in order for the Oauth flow to work
You might need to format it as HTML
I have it working when targetting self.
But not (as org owner/admin) targeting anyone other org emails. 🤔
But not (as org owner/admin) targeting anyone other org emails. 🤔
@Modocosm May I ask what is your usecase for this? Is it possible for you to have Pipedream connect to that specific org account?
I searched through the internet and find an article here to set Org's default footer: https://www.techrepublic.com/article/how-to-set-a-gmail-signature-for-your-organization/
Is it fulfill your need?
But not (as org owner/admin) targeting anyone other org emails. 🤔
@andrewjschuang, on another note, I think we can update this line right here to have it use a prop to update other org email. Though I have not tested it since I don't have org admin email
@Modocosm May I ask what is your use case for this? Is it possible for you to have Pipedream connect to that specific org account?
I searched through the internet and find an article here to set Org's default footer: https://www.techrepublic.com/article/how-to-set-a-gmail-signature-for-your-organization/
Is it fulfill your need?
Footers are assigned/enforced specifically for compliance disclaimers. mostly unstyled. Sigs separately would take user variables and enforce branding consistency in (especially) external communications. Universally, the whole team is in favor of this. As the brand evolves, it would help reduce redundant, data entry busy work.
@andrewjschuang, on another note, I think we can update this line right here to have it use a prop to update other org email. Though I have not tested it since I don't have org admin email
@vunguyenhung email
in this line is an optional prop that the user can type in to change the signature for another email. Though I have not tested for the same reason
@andrewjschuang, per this Gmail API doc here, it allows us to set the userId
as email in order to set signature for other org email.
I think we can use the existing Email
prop, we just need to pass the email to the userId
field when it is set by user, or me
if it is not set.
What do you think?
@vunguyenhung from my understanding of this doc, the parameter sendAsEmail
is the one that configures another email to have the signature set
Hello @andrewjschuang, @Modocosm have tested the Email
prop, but it is not working for other org email for his case. Is it possible to try pass the email to userId
param for him to test if it works?
I'm sorry for back-and-forth communication 🙏 I'd love to have it work for @Modocosm.
@vunguyenhung np, can you please test this branch? - gmail-update-signature-test
Thank you @andrewjschuang! Hello @Modocosm, since I don't have the Gmail Org account to test.
Could you do the following steps to deploy the action to your account to test on your side?
# Checkout the git branch
git checkout origin/gmail-update-signature-test
pd publish components/gmail_custom_oauth/actions/update-signature/update-signature.mjs
4. Finally, you can add the Pipedream action from `My Action` section
<img width="822" alt="Screen Shot 2022-12-14 at 08 59 01" src="https://user-images.githubusercontent.com/18277920/207486503-e622a9f2-5f17-4a35-aa91-258d83f5a322.png">
<img width="821" alt="Screen Shot 2022-12-14 at 08 59 38" src="https://user-images.githubusercontent.com/18277920/207486586-0f8d7499-7b0d-4e7d-a693-601794d98cbb.png">
Hello @Modocosm, we figures that to update the signature for other org email, you'll need to use other kind of authentication which is Google Cloud Service account with delegated domain-wide authority
Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.
So we have updated the Update Signature action to use Google Cloud authentication. The new code is available in the branch checkpoint-gmail
now, could you test it following the below steps?
# Checkout the git branch
git checkout origin/checkpoint-gmail
pd publish components/gmail_custom_oauth/actions/update-signature/update-signature.mjs
4. Finally, you can add the Pipedream action from `My Action` section
<img width="822" alt="Screen Shot 2022-12-14 at 08 59 01" src="https://user-images.githubusercontent.com/18277920/207486503-e622a9f2-5f17-4a35-aa91-258d83f5a322.png">
<img width="821" alt="Screen Shot 2022-12-14 at 08 59 38" src="https://user-images.githubusercontent.com/18277920/207486586
Thank you so much for your support @Modocosm!
Alrighty, im back, sorry for the delayed response and thank you for the detailed walkthrough! Much appreciated :)
Ill give it a shot shortly and let you know.
Thanks @andrewjschuang @vunguyenhung! 🥳
@Modocosm That's great to hear, thanks for testing it out! @vunguyenhung I'll create another PR so this gets published to the official registry. Thanks for kindly insisting on this feature, turned out great!
Is there a specific app this action is for?
gmail in gsuite
Please provide a link to the relevant API docs for the specific service / operation.
https://developers.google.com/gmail/api/guides/alias_and_signature_settings#managing_signatures https://googleapis.dev/nodejs/googleapis/latest/gmail/classes/Resource$Users$Settings$Sendas.html#patch