Solved

Is it still possible to automatically create Gmail drafts?

  • 14 August 2020
  • 3 replies
  • 4 views

Dear community,

 

I found this video (https://www.youtube.com/watch?v=-dbRKOj-1zw) and this forum (https://community.safe.com/s/question/0D54Q000080h9MY/drafting-of-gmails-automatically) about the possibility to create Gmail drafts. However, I am not sure if this is still possible?

 

Please let me know how I could achieve this.

Thank you!

icon

Best answer by LizAtSafe 17 January 2023, 23:28

View original

3 replies

Userlevel 4
Badge +26

Hmm, it should still be possible, however, I suspect that the steps in that youtube video are now invalid given changes to google.

 

I think what you need to use is Googles REST API. It's documented here: https://developers.google.com/gmail/api/v1/reference/users/drafts

In order to do this you will also need to figure out how to authenticate the process which can be a bit of a challenger.

You can use FME's HTTPCaller to make the REST calls you need to once you know what you need to do.

 

For testing rest calls and experimenting I suggest getting PostMan to help with experimenting and testing calls

https://www.postman.com/product/api-client/

 

You shouldn't need to write any python but if you're not familiar with making REST calls and FME it might take you a fair amount of time to get your head around the whole process.

 

I wish you luck and if you get stuck during the process we're here to help!

Userlevel 4
Badge +26

Hmm, it should still be possible, however, I suspect that the steps in that youtube video are now invalid given changes to google.

 

I think what you need to use is Googles REST API. It's documented here: https://developers.google.com/gmail/api/v1/reference/users/drafts

In order to do this you will also need to figure out how to authenticate the process which can be a bit of a challenger.

You can use FME's HTTPCaller to make the REST calls you need to once you know what you need to do.

 

For testing rest calls and experimenting I suggest getting PostMan to help with experimenting and testing calls

https://www.postman.com/product/api-client/

 

You shouldn't need to write any python but if you're not familiar with making REST calls and FME it might take you a fair amount of time to get your head around the whole process.

 

I wish you luck and if you get stuck during the process we're here to help!

OK, so I did a little more research into it and at least the Authentication will be easy. You can use the Gmail Web connection in the HTTPCaller to make requests to your google account.

But you will need to use something to ceate the email object itself. I thiiink for that you might need to hunt down some python.

 

But FME can automatically Send emails from you gmail account too. That doesn't require any python and is much easier.

Userlevel 2
Badge +14

There is a new update to the Emailer package that includes an option to save the email as a draft for Gmail. This package update is available for FME 2023.0 (b23209). For information on how to upgrade the Emailer package after downloading the beta, see the FME Packages FAQ.

Emailer-2023.0cc: @virtualcitymatt​ 

Reply