build it in 30 minutesby updated 6 min read

Wire Your Inbox to Notion in 30 Minutes (n8n)

An n8n build that sorts new Gmail with an AI model, files the messages that need you in a Notion database with a one-line summary, and labels everything else.

The build runs on n8n Cloud. A Gmail Trigger node picks up new messages, an Information Extractor node with an AI chat model returns a category, an importance score and a one-sentence summary, an If node sends the important ones to a Notion database, and a Gmail node labels the rest.

Most inboxes mix a handful of messages that need an answer this week with newsletters, receipts and notifications. This build sorts new Gmail messages as they arrive. An AI model reads each one and gives it a category, an importance score from 1 to 5 and a one-sentence summary. Messages that need you go into a Notion database you can sort each morning. The rest get a Gmail label, so you can check them later. No step replies to anyone or deletes anything.

What the 30 minutes assumes

The build fits in about half an hour of setup when these are already true:

  • You use n8n Cloud. It has a free trial with Pro features for 14 days, and on Cloud the Gmail node and the Gmail Trigger connect through Sign in with Google, with no setup in the Google Cloud Console. Self-hosted n8n needs your own OAuth app first: a Google Cloud project, the Gmail API turned on, a consent screen and a client ID. n8n's Google credentials page also notes that for an External app left in Testing mode, consent and tokens expire after seven days.
  • You own the Notion workspace. Notion's docs say only a workspace owner can create a connection.
  • You have an AI model ready. On n8n Cloud, the Anthropic Chat Model node can run on n8n's Gateway credits, so you don't need an Anthropic account to start. Your own Anthropic API key works too.

If you're still choosing a tool, the Zapier vs Make vs n8n guide compares how each one counts usage and where each can run.

Step 1: Build the Notion database

Create a Notion database called Inbox Triage with these properties:

  • Subject (title)
  • From (text)
  • Category (select)
  • Importance (number)
  • Summary (text)
  • Needs reply (checkbox)
  • Received (date)

Then give n8n access to it. In Notion's developer portal, create an internal connection and copy its API token into an n8n Notion credential. Notion's API docs now say "connection" where they used to say "integration", and n8n's credential screen still asks for an Internal Integration Secret, so both names mean the same thing here. A connection can only reach pages shared with it. Open the database, click the three-dot menu at the top right, scroll to Add connections and pick yours.

Step 2: Add the Gmail Trigger

Create a workflow and add the Gmail Trigger node. It has one event, Message Received, and it checks Gmail on the schedule you set in Poll Times. Four settings matter:

  • Label Names or IDs: while you test, limit the trigger to one label, such as ai-triage, and add that label to a few messages by hand. Remove the filter once the results look right.
  • Search: takes Gmail search filters, such as from:, if you want to narrow the trigger further.
  • Read Status: keep the default, unread emails only.
  • Simplify: turn it off. The simplified output has the message IDs, the labels and the headers (From, To, CC, BCC and Subject). The AI step needs the body as well.

By default the trigger fetches up to 10 emails per poll. You can raise Max Emails per Poll to 50, and any extra unread emails come through on the next poll.

Step 3: Classify with the Information Extractor

Add an Information Extractor node after the trigger and attach the Anthropic Chat Model node as its model. In the Text field, map the sender, subject and body from the trigger's output. Set Schema Type to Generate From JSON Example and paste:

{
  "category": "client",
  "importance": 4,
  "needs_reply": true,
  "summary": "Client asks to move Thursday's review to Friday morning."
}

n8n builds the schema from the property names and types, ignores the example values and treats every field as required. Then open System Prompt Template and add your rules:

You sort business email for a small firm.
category: one of client, prospect, vendor, newsletter, internal, other.
importance: 1 to 5. Use 4 or 5 only when the sender expects an answer
or an action from the firm this week.
needs_reply: true only if the sender asks a question or asks for something.
summary: one sentence, at most 20 words, using only facts in the email.

n8n appends its own format instructions to that prompt, so you don't need to ask for JSON.

Step 4: Branch on importance

Add an If node with one condition: importance is greater than or equal to 4. The true branch goes to Notion and the false branch goes to Gmail. If you'd rather see every message that needs a reply, add a second condition on needs_reply and combine the two with OR.

Step 5: Write to Notion

On the true branch, add a Notion node with the Database Page resource and the Create operation. Pick the Inbox Triage database and map each property to a field from the earlier nodes, with Received mapped to the email's date. Notion's API limits a single rich text value to 2,000 characters, which is one more reason to keep the summary to a sentence.

Step 6: Label the rest

On the false branch, add a Gmail node with the Add Label to a message operation. Use the message ID from the trigger and a label such as triaged. Add a second Gmail node with Mark as Read if you want those messages out of your unread count. Leave them in the inbox for the first week, so you can check what the model decided before you trust it.

Step 7: Test, then publish

Run the workflow on three labeled test messages: a client asking a question, a newsletter and a receipt. The first should land in Notion with a sensible summary, and the other two should get the triaged label. When the results look right, remove the test label filter and publish the workflow, so the trigger runs on its own.

Limits worth knowing

  • Notion allows 180 requests per minute for each connection, an average of 3 per second, on plans other than Business and Enterprise, which get 600 per minute. Over that, the API returns HTTP 429 with a Retry-After header that gives the wait in seconds. Day-to-day mail is far below the limit, but a backfill of old messages can reach it.
  • Each message goes to the model provider. Anthropic's commercial terms say Anthropic "may not train models on Customer Content from Services." Check your own client agreements before you send client email to any outside service.
  • The model will misjudge a message now and then. Treat the Notion database as a reading list. The original email is still in Gmail.

What to add next

  • A Notion view filtered to Needs reply and sorted by Importance.
  • Separate views for clients and prospects, using the Category property.
  • A weekly count by category, to see where your mail comes from.

Build the basic version first, and run it for a week before you add anything.

Sources

  1. n8n docs, Gmail Trigger node (Message Received, Poll Times, Simplify, Max Emails per Poll, filters) (checked 2026-12-02)
  2. n8n docs, Gmail node message operations (Add Label to a message, Mark as Read) (checked 2026-12-02)
  3. n8n docs, Google OAuth2 single service (managed Sign in with Google on n8n Cloud, Testing-mode tokens expire after seven days) (checked 2026-12-02)
  4. n8n docs, Choose how to use n8n (Cloud free trial with Pro features for 14 days) (checked 2026-12-02)
  5. n8n docs, Information Extractor node (Schema Type, Generate From JSON Example, System Prompt Template) (checked 2026-12-02)
  6. n8n docs, Anthropic Chat Model node (Gateway credits on n8n Cloud) (checked 2026-12-02)
  7. n8n docs, Notion node (Database Page: Create) (checked 2026-12-02)
  8. Notion developer docs, Authorization (internal connections, workspace owner required, Add connections) (checked 2026-12-02)
  9. Notion developer docs, Request limits (180 requests per minute, 2,000-character rich text) (checked 2026-12-02)
  10. Anthropic, Commercial Terms of Service, section B (no training on Customer Content) (checked 2026-12-02)
n8nnotionemailautomationtutorial30 min build
go deeper

Worked steps, FAQs and resources on this topic.

read the guide
the list

Get the next one.

Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.

ready to ship?

Let's build yours.

Reading is the easy part. We do the work. Tell us what's broken and we'll tell you straight up whether we can help.

let's talk