Notion

Create pages, query databases, and manage content in Notion from your Spala flows.

Notion

The Notion addon connects your Spala flows to Notion's API. Query databases, create pages, update properties, and sync data between your application and Notion workspaces.

Installation

1. Enable the Notion addon from the Addons panel
2. Create an integration at notion.so/my-integrations
3. Share the relevant Notion databases/pages with your integration
4. Enter the integration token in the addon configuration

Configuration

Available Steps

Query Database

Queries a Notion database with optional filters and sorting.

Create Page

Creates a new page in a Notion database.

Update Page

Updates properties on an existing Notion page.

Example: Log Errors to Notion

// Error handler in a flow

// Step 1: Create Page (Notion addon)
// databaseId: env.NOTION_ERROR_DB_ID
// properties: {
//   "Error": { title: [{ text: { content: vars.error.message } }] },
//   "Flow": { rich_text: [{ text: { content: vars.flowName } }] },
//   "Status": { select: { name: "Open" } },
//   "Severity": { select: { name: "High" } },
//   "Time": { date: { start: new Date().toISOString() } }
// }

Example: Sync Tasks from Notion

// Scheduled task — runs every 15 minutes

// Step 1: Query Database (Notion addon)
// databaseId: env.NOTION_TASKS_DB_ID
// filter: { property: "Status", select: { equals: "Ready" } }
// Output → vars.tasks
// Step 2: Loop - For each task
//   Step 3: Database Query - Create local task
//   INSERT INTO tasks (notion_id, title, priority, due_date)
//   VALUES (task.id, task.properties.Name.title[0].plain_text,
//           task.properties.Priority.select.name,
//           task.properties.Due.date?.start)
//   ON CONFLICT (notion_id) DO UPDATE SET ...

Notion databases must be explicitly shared with your integration before they can be accessed. In Notion, open the database page, click the three-dot menu, and select "Connect to" to add your integration.

Notion's property format is verbose. Each property type (title, rich_text, select, date, etc.) has its own structure. Refer to the Notion API documentation for the exact format of each property type.

Internal integration token from notion.so/my-integrations.
The Notion database ID.
Filter object following the Notion filter syntax.
Array of sort objects (e.g., [{ property: "Created", direction: "descending" }]).
Number of results per page (default: 100, max: 100).
The parent database ID.
Page properties matching the database schema.
Array of block objects for the page input.
The Notion page ID.
Properties to update.
Addons Overview
/addons
Browse available addons
Installing Addons
/addons/installing
Enable and configure addons in your project