All workflows
Gmail logoNotion logo

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.

Every hour2 apps5 steps

Apps it connects

Authenticate each one once and the workflow is ready to run.

What it does

Each integration step this workflow runs, in order, what it is for, and the conditions and loops that decide when it runs.

  1. 1GmailCreate labelCreates the 'Filed to Notion' label on the first run, or carries on with the one already there.
  2. 2GmailList emailsSearches for messages carrying your chosen label but not the filed label, so nothing already filed is picked up again.
  3. For each email

    1. 3GmailGet message headersReads each message's headers to find the date it was sent, filing it without one if that cannot be read.
    2. 4NotionCreate pageCreates one page per message, titled with the subject, holding the sender, sent date, a link to the original and the body.
    3. 5GmailAdd label to messageAdds the 'Filed to Notion' label to each message once its page exists, so it is never filed a second time.

How it works

What happens on each run, in plain English.

Every hour, the mail in your Gmail account carrying a label you choose is collected and turned into pages in a Notion database, one page per message. The subject becomes the page title, and the page holds who sent it, when it was sent, a link that opens the original in Gmail, and the message body.

Once a page exists, the message picks up a second label, 'Filed to Notion', and the search that finds work deliberately leaves out anything carrying it, so a message is never filed twice however often the workflow runs. Everything goes into the page content rather than database columns, so it works with any database whatever its columns are called; the only column written is the title. 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.

You need a Gmail label to watch and a Notion database shared with your Notion integration.

gmailnotionemailfilinghourlyno duplicates

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.

Free plan, no credit card