Skip to content
Guide

How to send webhook data to a Notion database

Turn each incoming webhook into a page in a Notion database: get a URL, match the request's fields to your database's fields, and see every run. No code.

Updated

A Notion database makes a good inbox for things that happen elsewhere: a new order, a sign-up, a bug report. Most of those tools can send a webhook, but Notion has nowhere to receive one. This guide puts a workflow in between: each webhook becomes a page in your database, with the fields filled from the request. No code.

  1. Trigger

    When a webhook is received

    Foliot gives you a URL. Anything POSTed to it starts a run.
  2. Step 1

    Add page to Notion

    Name Trigger → Name, Email Trigger → Email, Status New, Received Trigger → Received at
The workflow you'll build: each webhook becomes a page in your database.

Before you start

  • A Foliot account. The free plan is enough to build and test this.
  • A Notion workspace where you can create an integration.
  • A Notion database with the fields to fill, for example Name (the title), Email (email), Plan (select), Status (status, with a New option added: Foliot only picks options that already exist) and Received (date).
  • Something that sends the webhook. To test, curl or any HTTP client will do.

Create a Notion integration and share the database

Foliot writes to Notion with an internal integration's secret that you paste in. There's no “Add to Notion” button, and the integration only sees the databases you share with it.

  1. Go to notion.so/profile/integrations and create a new internal integration for your workspace, able to read, insert and update content.
  2. Copy its Internal integration secret. It starts with ntn_ and works like a password.
  3. Open the database in Notion, click ⋯ → Connections and add your integration. Skipping this is the most common reason a database won't load.

Set it up in Foliot

1. Create the workflow and pick the webhook trigger

Create a new workflow and choose When a webhook is received. You get a URL like https://usefoliot.com/api/hooks/…. Copy it into the app that sends the webhook, and keep it private: anyone with the URL can start the workflow. If the sender can add a header, open More options → Require a secret and have it send the secret as X-Foliot-Secret; requests without it are refused.

2. Send one sample request

While the workflow is off, requests don't run anything; they're saved as sample data so you can pick fields from them. Click Get sample data, then trigger a test from your app, or send one yourself:

curl -X POST https://usefoliot.com/api/hooks/YOUR-TOKEN \
  -H "Content-Type: application/json" \
  -d '{"name": "Ada Lovelace", "email": "ada@example.com", "plan": "Pro"}'

JSON, form-encoded and plain-text bodies up to 256 KB are accepted. Each body field becomes a chip like Trigger → Email; nested fields show as Trigger → Customer → Email.

3. Add the Notion step

Click + after the trigger and choose Add page to Notion. Then:

  1. Under Notion connection, choose + Add a Notion connection… and paste the secret. Foliot checks it with Notion before saving and stores it encrypted.
  2. Paste the database's link (or its ID) and click Load database. If it has several data sources, pick one.
  3. Fill each field from the data picker, like Trigger → Name, or type a fixed value, like New for the status. For Received, pick Trigger → Received at, the time the request arrived. Leave a field empty to skip it.

4. Test the step, then turn the workflow on

Test this step creates a real page with the sample, and its result has the page's url. If it looks right, switch the workflow on. From then on, every request to the URL creates a page, usually within a few seconds. The sender gets a 202 response straight away and the run happens in the background.

Useful variations

  • Update instead of duplicating: start with Find page in Notion where Email is Trigger → Email, then a Branch on its found: Yes path, Update page in Notion with the page's ID; No path, Add page to Notion. Notion's text match is exact and case-sensitive.
  • Only some webhooks: a Filter such as “Only continue if Trigger → Plan is Pro”. Others end as “Filtered out”.
  • Tell the team: add Post to Slack with the new page's URL from the Notion step. See webhook to Slack.

Good to know

  • Fields that fill in: title, text, number, select, status (existing options only), multi-select (comma-separated), date, checkbox (Yes/No or from data), URL, email and phone. People, relation and files aren't supported yet; formulas, rollups and created or edited times are Notion's own.
  • The step sets database fields only. It doesn't write the page's content below them, so put long text in a text field.
  • The webhook accepts up to 60 requests a minute per workflow. Each request is one run, however many steps: 500 runs a month on the free plan, 10,000 on Pro ($12 a month).
  • Foliot has no Notion triggers: it can write to Notion and look pages up, but can't start when a page changes.

Other ways to do it

  • Notion's API directly. A small endpoint of your own that receives the webhook and calls Notion. Flexible, but you host it and handle Notion's errors and rate limits yourself.
  • Zapier or Make, with a webhook trigger and a Notion action. See Foliot vs Zapier.

Questions

Can Notion receive a webhook directly?

Not into a database. You need something that receives the request and calls Notion's API: your own endpoint, or a workflow like the one in this guide, which creates a page per request.

Why can't Foliot see my database?

Notion integrations only see what's shared with them. Open the database in Notion, click ⋯ → Connections, add your integration, then click Load database again.

Which Notion fields can a webhook fill in?

Title, text, number, select, status (existing options only), multi-select, date, checkbox, URL, email and phone. People, relation and files aren't supported yet, and the step doesn't write page content.

Is it free?

Foliot's free plan includes 500 runs a month and 5 active workflows. Each webhook is one run, however many steps. Pro is $12 a month for 10,000 runs.