File labelled email into a Notion database
Turns mail carrying a Gmail label you choose into pages in a Notion database, and never files the same message twice.
What it does
The integration steps this workflow runs, in the order it first runs them.
- 1
GmailCreate label - 2
GmailList emails - 3
GmailGet message headers - 4
NotionCreate page
- 5
GmailAdd label to message
How it works
Everything the template sets up, and what to fill in before the first run.
Nominate a Gmail label and a Notion database. Every hour this workflow collects the mail carrying that label and creates one Notion page per message: the subject becomes the page title, and the page itself holds who sent it, when it was sent, a link that opens the original in Gmail, and the message body. Mail that has been filed once is left alone - each message picks up a second label ('Filed to Notion' by default) the moment its page exists, and the search that finds work deliberately excludes that label, so a message is never filed twice however often the workflow runs.
Everything goes into the page's content rather than into database columns, so it works with any database whatever its columns are named. The one column it does write is the title: set 'titleProperty' if yours is not called 'Name'.
Nothing is lost when something goes wrong. A message that cannot be read or filed keeps its label, is reported in the run, and is tried again on the next sweep. Long messages are shortened to fit Notion's limit on a block of text.
To set it up, name your label in the 'gmailLabel' step and paste your database ID into the 'notionDatabaseId' step. Run Notion's 'List databases' action once if you need to find the ID, and remember to share the database with your Notion integration.
Start from a workflow that already works.
Add "File labelled email into a Notion database" to your workspace, connect its apps, and make it yours. No credit card required.
Free plan available · No credit card required
