Notion steps: add, find and update a page
Add a page to a Notion database, find a page by a field, and update a page's fields, with an internal integration secret. Field types, outputs and limits.
Updated
Four steps work with a Notion database: Add page creates a page in it, Find page looks one up by a field, Find pages lists every page that matches, and Update page changes a page's fields. To start a workflow when a page is added, see the Notion trigger.
How to set it up
- In Notion, create an internal integration at notion.so/profile/integrations and copy its Internal integration secret (it starts with
ntn_). - Open each database the workflow should use, click ⋯ → Connections and add the integration. Skipping this is the most common reason a database won't load.
- In Foliot, add the step, choose + Add a Notion connection… and paste the secret. It's checked with Notion and stored encrypted. If you regenerate the secret later, paste the new one with Replace secret on the Connections page: the steps using it keep working, and a connection Notion stops accepting shows Needs reconnecting and emails you once.
- Paste the database's link or ID and click Load database. Then fill in the fields below, inserting data with + Data, and Test this step.
Add page to Notion
- One value per field. Leave a field empty to skip it.
- Field types it fills: title, text, number, select, status (existing options only), multi-select (names separated by commas), date, checkbox (Yes or No), URL, email and phone. A time without an offset is read in the workflow's timezone.
- Not supported yet: people, relation, files and a few others; the step lists them. Formulas, rollups and created or edited times are Notion's own.
- Output: the page's
idandurl.
Find page in Notion
- Finds the oldest page (by created time) whose field equals a value exactly. Notion's text match is case-sensitive.
- Output: the page's fields by name,
id,urlandfound: true, orfound: false. Not finding a page isn't a failure. - Find pages has the same settings but gives every matching page, oldest first, as a list,
pages(up to 100), pluscount; leave the value empty for every page. Loop over it with For each. No match gives an empty list, not a failure.
Update page in Notion
- Needs the page's link or ID, usually the
idfrom Find page, and at least one field. Empty fields are kept as they are.
Limits
- The steps set database fields only. They don't write a page's content (the blocks below the fields).
- No Notion triggers: a workflow can't start when a page changes.
- Creating or updating a page is retried only when the request certainly didn't reach Notion. After a timeout or a Notion server error the run fails and asks you to check the database, then re-run, so you never get a duplicate page.
- The pages live in your Notion workspace, not in Foliot.