This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GMAIL_LABEL_NAME = 'NotionToSync'; | |
const SYNCED_LABEL = 'SyncedToNotion'; | |
// if you set this, the attachments will be copied over to google drive and the links added to the notion page | |
const GDRIVE_FOLDER_ID = ''; | |
const gmailToNotion = () => { | |
const label = GmailApp.getUserLabelByName(GMAIL_LABEL_NAME); | |
const successLabel = GmailApp.getUserLabelByName(SYNCED_LABEL); | |
label.getThreads(0, 20).forEach((thread) => { |