Notion

The Notion steps connect your workflows to your Notion databases:

  • The Notion trigger starts a workflow when a page is added to a database, or when a property changes.
  • Notion - Write page creates a new page in a database or updates an existing one. It can also attach generated documents.
  • Notion - Find pages reads the pages that match your conditions.

Use them to generate a contract when a deal moves to "Won", log every document in a database, or pull project data into a report.

Example

A consulting firm tracks deals in a Notion database. The workflow:

  1. Starts with the Notion trigger: Property changed, property Stage, only when Stage is Won.
  2. Generates a service agreement from the page properties with a Document step.
  3. Uses Write page with Update page and the condition Deal ID is Deal ID to attach the agreement to the deal's Contract files property.

Connect your account

  1. Add a Notion step and click Sign in under Account.
  2. Sign in to Notion. Choose the pages and databases TemplateDocs may access and allow access.
  3. You return to the workflow editor with the account selected.

Only the databases you share appear in the Database list. To share more later, share them with the integration in Notion, or open the account menu (the three dots next to the account) and choose Reconnect.

Trigger

Settings

SettingDescription
Account and DatabaseThe database to listen to.
Start whenPage added starts the workflow when a page is added to the database. Property changed starts it when a property of a page changes.
Property (for Property changed)The property to watch.
Pages must match (optional)Conditions the page must match to start a run, for example a status of Won. Without conditions, every event starts a run.
Include new pages (for Property changed)A new page also starts a run when it is created with the property set and matches the conditions. The output Event Type in this case is PageCreated.
Linked Records (optional)Include related pages from your workspace. For example, when a project changes, you can automatically include its related client and tasks. Up to 25 linked pages are retrieved per relation property (so a single project can link to up to 25 clients and 25 tasks).

Behavior

  • The trigger listens only while the workflow is published. Draft changes apply after you publish again.
  • To test before publishing, click Test in the workflow editor. You pick a page from the database, and the workflow runs with it.
  • Changes made by the workflow itself (for example, by a Write page step) do not start the workflow again.

Output variables

  • Page - The page the event is about: its Page ID, Page URL, one value per property, and the selected linked pages.
  • Event Type - Whether the page was added or its properties changed.
  • Event Time - When the change happened.
  • Changed Properties - The names of the properties that changed. Empty for a new page.
  • Database Name / Database URL - The database the page is in.

Write page

Settings

SettingDescription
Account and DatabaseWhere to write.
ActionCreate page adds a new page. Update page changes an existing page.
Property valuesA value for each property you want to set. Type @ to insert variables or formulas. Date properties also let you pick a date or a date relative to today. Empty properties are left as they are.

The step can write title, text, number, select, multi-select, status, date, checkbox, URL, email and phone properties. Properties such as relations, people, formulas and rollups cannot be written.

Files properties show an Add Attachment button. Pick a document generated earlier in the workflow and set its file name. When updating a page, the uploaded documents replace the files already in that property.

Updating a page

With Update page, you also set:

SettingDescription
Page to updateConditions that find the page, for example "Client ID is Client ID". Exactly one page must match. If more than one page matches, the step fails.
If no page matchesFail the step, Create the page, or Skip the step. A created page also gets the values from your is conditions, unless you set those properties yourself.

Output variables

  • Page ID / Page URL - The page that was written.
  • Database Name / Database URL - The database the page is in.
  • Operation - Created, Updated or Skipped.

Example: update the page matching the trigger's Deal ID and attach the generated service agreement to its Contract property.

Update an existing Notion deal page matched by Deal ID and attach the service agreement to its Contract property.

Find pages

Settings

SettingDescription
Account and DatabaseWhere to search.
ConditionsClick Add condition and choose a property, a comparison (such as is, contains, is empty or is after) and a value. Choose All conditions or Any condition. With no conditions, every page is returned. Formula, rollup and files properties cannot be used in conditions.
SortingClick Add sort to order the pages by one or more properties.
Maximum pagesUp to 1,000 pages. The default is 100.
When more pages matchFail the step or Return the first matching pages.

If no pages match, the step still succeeds and returns an empty list.

Output variables

  • Pages - The matching pages. Each page has a Page ID, a Page URL and one value per property.
  • Page Count - The number of pages returned.
  • Has More - true if more pages matched than the maximum.
  • Database Name / Database URL - The database that was searched.

Credits

The Notion trigger is free (0 credits). Each Notion step that runs (Write page or Find pages) costs 1 credit. See Credits.