An automated pipeline to transform emails into Notion tasks with full support for file attachments, sender security, and deep linking.
- Sender Security: Only processes emails from an authorized address to prevent spam.
- Attachment Support: Automatically uploads email attachments to Google Drive and links them in the Notion task.
- Deep Linking: Includes a direct link back to the original Gmail thread in each Notion task for quick access.
- Auto-Reply: Sends a confirmation email to the sender once the task is successfully created.
- Automatic Labeling: Categorizes emails in Gmail as 'Processed' or 'Error' for easy tracking.
- Create an integration at Notion Developers.
- Note your
Internal Integration Token. - Create a Notion database with these exact properties:
- Name (type: Title)
- Description (type: Rich Text)
- Date (type: Date)
- Priority (type: Select)
- Status (type: Status)
- Source (type: Rich Text)
- Grant the integration access to the database via the 'Connect to' menu.
- Create a new project at Apps Script.
- Copy the contents of
Main.gs. - Create a
Config.gsfile and enter your API keys and database IDs. - Enable the Google Drive API service in the Apps Script editor (Services > Add a service > Drive API).
- Run the
setupTriggerfunction once to activate the automation.
Send an email to yourself with the subject defined in your config (e.g., "Notion Task"):
TASK: Review financial report
DESC: Check the Q3 numbers and verify with the team.
DATE: 2026-12-01
PRIORITY: High
STATUS: In progress