{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiftvp3u2bos737vphwibdfevvdx2afra6z7mxcyecv4cqodk2ojye",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mpdvye7nue42"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreidu4aasxjw2d6d3l7gunnz2b74z5wimiewj3avj4shgq7guvvqtee"
},
"mimeType": "image/webp",
"size": 75798
},
"path": "/pirateprentice/n8n-notion-node-read-create-update-and-search-database-pages-free-json-1ho3",
"publishedAt": "2026-06-28T11:23:15.000Z",
"site": "https://dev.to",
"tags": [
"n8n",
"automation",
"nocode",
"productivity",
"https://www.notion.so/my-integrations",
"done-for-you workflow JSON bundles on Gumroad",
"HTTP Request node",
"AI Agent node"
],
"textContent": "If you manage projects, content, or customer data in Notion, the n8n Notion node lets you automate every interaction — no manual copy-paste, no Zapier fees, no code required.\n\nThis guide covers everything: connecting Notion to n8n, understanding the node's operations, reading and creating database pages, filtering queries, updating properties, and common gotchas. A free workflow JSON is included at the end.\n\n## Prerequisites\n\n * n8n (self-hosted or cloud)\n * A Notion account with at least one database\n * A Notion integration token (we'll create one below)\n\n\n\n## Step 1: Create a Notion Integration\n\n 1. Go to https://www.notion.so/my-integrations\n 2. Click **+ New integration**\n 3. Give it a name (e.g., \"n8n Automation\")\n 4. Select the workspace\n 5. Set capabilities: **Read content** , **Update content** , **Insert content** — enable all three\n 6. Click **Submit**\n 7. Copy the **Internal Integration Token** (starts with `ntn_` or `secret_`)\n\n\n\n> ⚠️ The token only has access to pages you explicitly share with it. Don't forget Step 2.\n\n## Step 2: Share Your Database with the Integration\n\n 1. Open your Notion database\n 2. Click **...** (top-right) → **Add connections**\n 3. Search for your integration name and select it\n 4. Click **Confirm**\n\n\n\nWithout this step, every API call returns a 404 — even with a valid token.\n\n## Step 3: Add the Credential in n8n\n\n 1. In n8n, go to **Credentials → New**\n 2. Search for **Notion API**\n 3. Paste your Internal Integration Token\n 4. Save and test — you should see \"Connection tested successfully\"\n\n\n\n## The n8n Notion Node: Operations Overview\n\nThe Notion node has two resource types:\n\nResource | Operations\n---|---\n**Database Page** | Create, Get, Get Many, Update\n**Block** | Append, Get Children\n\n## For most automation use cases, you'll live in **Database Page**.\n\n## Operation: Get Many (Query a Database)\n\nThis is your go-to for reading data — it's the equivalent of Notion's \"Filter\" view.\n\n**Required fields:**\n\n * **Database ID** : The 32-character ID from your database URL\n * URL pattern: `notion.so/[workspace]/[DATABASE_ID]?v=...`\n * Or share the page and copy the last segment before `?`\n\n\n\n**Finding the Database ID:**\n\n\n\n https://www.notion.so/myworkspace/abc123def456789012345678901234ab?v=xyz\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n This 32-char string is your Database ID\n (n8n also accepts dashes: abc123de-f456-7890-1234-5678901234ab)\n\n\n**Filters:**\nClick **Add Filter** to narrow results:\n\n\n\n {\n \"property\": \"Status\",\n \"select\": {\n \"equals\": \"In Progress\"\n }\n }\n\n\nCommon filter types by property:\n\nProperty type | Filter key | Example value\n---|---|---\nText / Title | `rich_text` | `{\"contains\": \"invoice\"}`\nSelect | `select` | `{\"equals\": \"Done\"}`\nCheckbox | `checkbox` | `{\"equals\": true}`\nDate | `date` | `{\"on_or_after\": \"2026-01-01\"}`\nNumber | `number` | `{\"greater_than\": 100}`\nMulti-select | `multi_select` | `{\"contains\": \"Marketing\"}`\n\n**Compound filters (AND/OR):**\nUse the **Add Compound Filter** option or pass raw JSON:\n\n\n\n {\n \"and\": [\n { \"property\": \"Status\", \"select\": { \"equals\": \"In Progress\" } },\n { \"property\": \"Priority\", \"select\": { \"equals\": \"High\" } }\n ]\n }\n\n\n**Return All vs. Limit:**\n\n * Toggle **Return All** on to paginate automatically (Notion returns max 100 per page)\n * Leave it off and set **Page Size** for explicit limits\n\n\n\n**Sort:**\nAdd sorts under the **Sort** section:\n\n\n\n [\n { \"property\": \"Due Date\", \"direction\": \"ascending\" }\n ]\n\n\n## Operation: Get (Single Page)\n\nFetch one page when you already have the **Page ID**.\n\n**Page ID:** Same format as Database ID — 32 hex chars. You get these from:\n\n * A \"Get Many\" node's output (`{{ $json.id }}`)\n * The page's URL\n * A webhook payload from Notion (if you're using Notion's webhook beta)\n\n\n\n## Operation: Create\n\nAdd a new row to a Notion database.\n\n**Required:**\n\n * **Database ID**\n * At least one property value (usually the **Title** / Name column)\n\n\n\n**Mapping properties:**\n\nClick **Add Property** and match property names exactly as they appear in your database:\n\nNotion property type | n8n field type to select\n---|---\nTitle | Title\nText | Rich Text\nSelect | Select\nMulti-select | Multi Select\nDate | Date\nCheckbox | Checkbox\nNumber | Number\nURL | URL\nEmail | Email\nPhone | Phone Number\nRelation | Relation\n\n> ⚠️ **Common gotcha:** Property names are case-sensitive and must match exactly. \"name\" ≠ \"Name\".\n> **Example: Create a page with Title + Status + Due Date**\n\nIn the n8n UI:\n\n 1. Resource: **Database Page**\n 2. Operation: **Create**\n 3. Database ID: `your-database-id`\n 4. Add Property: **Name** (Title) → `{{ $json.task_name }}`\n 5. Add Property: **Status** (Select) → `In Progress`\n 6. Add Property: **Due Date** (Date) → `{{ $json.due_date }}`\n\n\n\n## Operation: Update\n\nChange properties on an existing page. Requires the **Page ID**.\n\n * Only the properties you specify are changed; everything else stays as-is\n * To clear a value, set it to an empty string or null depending on the type\n * To archive a page (equivalent to \"delete\" in Notion), enable the **Archive** toggle\n\n\n\n**Archiving a page:**\nTurn on the **Archive** toggle in the Update operation. This moves the page to trash in Notion — it's the closest thing to deletion the API supports.\n\n## Blocks: Append Block Children\n\nUse this to add content _inside_ a page (paragraphs, headings, bullets, code blocks) rather than just updating properties.\n\n**Use case:** You've created a page record (database row), and now you want to write a summary, meeting notes, or AI-generated content into the page body.\n\n**Block types supported:**\n\n * `paragraph`\n * `heading_1`, `heading_2`, `heading_3`\n * `bulleted_list_item`\n * `numbered_list_item`\n * `to_do`\n * `code`\n * `quote`\n * `divider`\n\n\n\n**Example block JSON:**\n\n\n\n [\n {\n \"object\": \"block\",\n \"type\": \"heading_2\",\n \"heading_2\": {\n \"rich_text\": [{ \"type\": \"text\", \"text\": { \"content\": \"Summary\" } }]\n }\n },\n {\n \"object\": \"block\",\n \"type\": \"paragraph\",\n \"paragraph\": {\n \"rich_text\": [{ \"type\": \"text\", \"text\": { \"content\": \"{{ $json.ai_summary }}\" } }]\n }\n }\n ]\n\n\n## Common Patterns\n\n### Pattern 1: Form → Notion Database\n\nWebhook (Typeform/Tally) → Set node (map fields) → Notion Create\n\nIdeal for: lead capture, application intake, event registrations.\n\n### Pattern 2: Notion → Email Digest\n\nSchedule Trigger (daily 8am) → Notion Get Many (filter: Status = \"In Progress\", Due Date = today) → Loop → Gmail/Resend (send row as email)\n\nIdeal for: daily standup digest, task reminders.\n\n### Pattern 3: Update Notion from External Event\n\nWebhook (Stripe payment) → Notion Get Many (filter: Email = `{{ $json.email }}`) → IF (found?) → Notion Update (set Status = \"Paid\")\n\nIdeal for: syncing payment status, order fulfillment tracking.\n\n### Pattern 4: AI Enrichment Pipeline\n\nNotion Get Many (filter: AI Summary is empty) → OpenAI (summarize) → Notion Update (write summary back) + Notion Append Block (add body content)\n\nIdeal for: auto-generating summaries, research notes, content briefs.\n\n## Gotchas & Fixes\n\nProblem | Cause | Fix\n---|---|---\n404 on every call | Database not shared with integration | Share the database with your integration (Step 2)\n\"Could not find database\" | Wrong Database ID format | Remove dashes or use the 32-char hex string directly\nProperty not updating | Name mismatch (case-sensitive) | Copy property name exactly from Notion\nDate not saving | Wrong format | Use ISO 8601: `2026-06-28` or `2026-06-28T09:00:00Z`\nRelation not linking | Wrong page ID format | Use the 32-char page ID without dashes for relation fields\n\"Insufficient permissions\" | Integration lacks capability | Re-check integration capabilities at notion.so/my-integrations\n400 on checkbox | Sending string \"true\" | Send boolean `true`, not the string\nArchived pages appear in queries | Default filter includes archived | Add filter: `\"is_not_empty\"` on a key property, or use `archived: false`\n\n## Free Workflow JSON: Notion Task Digest\n\nThis workflow runs every morning at 8am, queries a Notion database for tasks due today, and sends you an email summary.\n\n**Setup:**\n\n 1. Import the JSON into n8n (Settings → Import Workflow)\n 2. Set your Notion Database ID in the Notion node\n 3. Set your email in the Gmail/Resend node\n 4. Activate\n\n\n\n\n {\n \"name\": \"Notion Daily Task Digest\",\n \"nodes\": [\n {\n \"parameters\": { \"rule\": { \"interval\": [{ \"field\": \"hours\", \"hoursInterval\": 24 }] } },\n \"name\": \"Schedule Trigger\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"typeVersion\": 1,\n \"position\": [240, 300]\n },\n {\n \"parameters\": {\n \"resource\": \"databasePage\",\n \"operation\": \"getAll\",\n \"databaseId\": \"YOUR_DATABASE_ID_HERE\",\n \"returnAll\": true,\n \"filterType\": \"json\",\n \"filterJson\": \"{\\\"and\\\":[{\\\"property\\\":\\\"Due Date\\\",\\\"date\\\":{\\\"equals\\\":\\\"{{ $now.toISO().substring(0,10) }}\\\"}},{\\\"property\\\":\\\"Status\\\",\\\"select\\\":{\\\"does_not_equal\\\":\\\"Done\\\"}}]}\"\n },\n \"name\": \"Get Today Tasks\",\n \"type\": \"n8n-nodes-base.notion\",\n \"typeVersion\": 2,\n \"position\": [460, 300]\n },\n {\n \"parameters\": {\n \"jsCode\": \"const items = $input.all();\\nif (items.length === 0) return [{ json: { subject: 'No tasks due today', body: 'Your Notion board is clear for today.' } }];\\nconst lines = items.map(i => `- ${i.json.properties?.Name?.title?.[0]?.plain_text ?? 'Untitled'}`);\\nreturn [{ json: { subject: `Today's Tasks (${items.length})`, body: lines.join('\\\\n') } }];\"\n },\n \"name\": \"Build Digest\",\n \"type\": \"n8n-nodes-base.code\",\n \"typeVersion\": 2,\n \"position\": [680, 300]\n },\n {\n \"parameters\": {\n \"sendTo\": \"you@example.com\",\n \"subject\": \"={{ $json.subject }}\",\n \"message\": \"={{ $json.body }}\",\n \"options\": {}\n },\n \"name\": \"Send Email\",\n \"type\": \"n8n-nodes-base.gmail\",\n \"typeVersion\": 2,\n \"position\": [900, 300]\n }\n ],\n \"connections\": {\n \"Schedule Trigger\": { \"main\": [[{ \"node\": \"Get Today Tasks\", \"type\": \"main\", \"index\": 0 }]] },\n \"Get Today Tasks\": { \"main\": [[{ \"node\": \"Build Digest\", \"type\": \"main\", \"index\": 0 }]] },\n \"Build Digest\": { \"main\": [[{ \"node\": \"Send Email\", \"type\": \"main\", \"index\": 0 }]] }\n }\n }\n\n\n**Want more pre-built n8n workflow packs?** I sell done-for-you workflow JSON bundles on Gumroad — automation patterns for lead capture, Stripe payments, email sequences, and more. Each pack includes documented JSON + setup walkthrough.\n\n## Summary\n\n * **Get Many** : query with filters + sorts — your primary read operation\n * **Get** : fetch a single page by ID\n * **Create** : add a new database row with typed property values\n * **Update** : modify specific properties on an existing page (by page ID)\n * **Append Block Children** : write content _inside_ a page body\n * Share your database with the integration before any API call\n * Property names are case-sensitive; Database IDs can include or omit dashes\n * Use the Code node to build digest text, conditional logic, or dynamic filter JSON\n\n\n\nThe Notion node pairs especially well with the HTTP Request node for anything not natively supported, and with the AI Agent node for enrichment pipelines.",
"title": "n8n Notion Node: Read, Create, Update, and Search Database Pages (+ Free JSON)"
}