Create Draft Messages with Attachments using Gmail API

The GmailApp service of Google Apps Script doesn’t support drafts creation but you use the Gmail API to programatically create drafts in your mailbox.

You can create basic HTML drafts or you can also create drafts with attachments as shown in the following example. It can also be extended to create duplicate drafts in Gmail – you fetch the source draft using the Gmail API itself, parse the MIME message, edit the text or html if required, and save it as a new draft.