简体   繁体   中英

How to Import Google doc text into Email draft using Google Apps Script

I'm pretty new to Google Apps Script as a whole. And the main reason I hope to learn is to be able to import the text written in a google doc file into an email draft that i'm writing (so as to continue building off that main function later on). Originally, I wanted a widget within the gmail compose box. But after scouring the web for a solution, I'm settling for just about anything.

Just to be clear, I don't want the .docx file attached to the email only the option to pick a specific doc and import whatever is written within it.

Thanks in advance and sorry for not being able to provide sufficient code progress!

You can refer to the Document Service Documentation for manipulation of documents.

This service allows scripts to create, access, and modify Google Docs files.

There are available sample code in the said documentation.

After manipulating the desired document, you can refer to this Class GmailDraft Documentation to paste the information you got from the documents.

A user-created draft message in a user's Gmail account.

Hope this documents can help you further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM