open gmail with app script.

270 views
Skip to first unread message

Farassi Youssef

unread,
Nov 8, 2021, 10:57:19 AM11/8/21
to Google Apps Script Community
Hi everyone,

I would like to know if it is possible to open a draft directly on gmail with the script?

Thanks for your answer :D.

Alan Wells

unread,
Nov 8, 2021, 11:03:58 AM11/8/21
to Google Apps Script Community
Do you want to cause the GMail user interface to display a draft to the user?
I don't know of a way to do that. Apps Script can get the content of a draft email, and if you created your own dialog box you could display the contents.

Here is a link to some documentation.

Farassi Youssef

unread,
Nov 8, 2021, 11:23:41 AM11/8/21
to Google Apps Script Community
at the beginning I wanted to open directly a draft in gmail 
after I decided thereafter to open my mail in a modal and to make it modifiable but unfortunately that makes it difficult to add an attachment 
and prevents me from changing the formatting of the text as with this bar.

Capture.PNG

Alan Wells

unread,
Nov 8, 2021, 7:52:52 PM11/8/21
to Google Apps Script Community
You'd need to implement an HTML editor in the modal to format the email content which might be difficult.
And Gmail doesn't support all HTML styling.
I'm not sure if a Chrome extension could do what you want, but I don't know if there's a way to integrate Apps Script into a Chrome Extension.
You could spend a lot of time trying to find a solution and end up at a dead end. If someone else has any ideas, please let us know.

Reply all
Reply to author
Forward
0 new messages