Skip to content

feat: add Notion action (#42) - #93

Open
raphael-goetz wants to merge 2 commits into
mainfrom
feat/#42-notion-action
Open

raphael-goetz wants to merge 2 commits into
mainfrom
feat/#42-notion-action

Conversation

@raphael-goetz

Copy link
Copy Markdown
Member

What

Adds a new actions/notion-action TypeScript action so flows can read and write Notion databases and pages — turning Notion into a lightweight backing store, task tracker, or knowledge base for automations.

It covers CRUD over the Notion REST API plus polling triggers:

  • Functions: notionCreatePage, notionUpdatePage, notionGetPage, notionArchivePage, notionQueryDatabase, notionAppendBlocks, notionSearch.
  • Builder utils: notionCreateRichText, notionCreatePropertyValue (assemble Notion's nested rich-text / property-value shapes).
  • Data types: NotionPage, NotionDatabase, NotionBlock, NotionBlockList, NotionQueryResult, NotionSearchResult, NotionRichText, NotionPropertyValue, NotionUser.
  • Triggers (polling): NotionDatabaseItemCreated, NotionDatabaseItemUpdated, NotionPagePropertyChanged, driven by a lightweight in-process interval poller (Notion has no push webhooks for these events).

Why

Closes #42.

How

  • Follows the existing twilio/gls action patterns (native fetch, zod schemas, @Identifier/@Name/@Schema data types, @Signature/@Parameter runtime functions).
  • Auth via ConfigurationDefinition on the Action: integration_token (Bearer; default from NOTION_INTEGRATION_TOKEN) and optional notion_version (default 2022-06-28).
  • Triggers are RuntimeEvent classes (@EventSetting for databaseId / propertyName); src/poller.ts iterates the action's flows, polls the database query endpoint, and executes each flow for the pages that changed since the previous poll.
  • Wired notion-action into the .node-actions CI matrix and listed it in the root README.
  • Pinned zod@4.4.3: a fresh install resolves zod 4.6.7, whose schema internals crash the Hercules-vendored JSON-Schema walker in buildModule() at registration time (passes typecheck/tests but fails when connecting to Aquila). 4.4.3 matches the rest of the repo.
  • Uses the latest Hercules: @code0-tech/hercules@^1.7.2.

Testing

All run with npm ci to mirror CI (cd actions/notion-action):

  • npm run typecheck — clean
  • npm run test — 11 passed
  • npm run build — clean (the Docker CI step)
  • Plus a buildModule() smoke test (what the SDK does on connect): registers 9 data types, 9 functions, 3 events.

🤖 Generated with Claude Code

raphael-goetz and others added 2 commits November 1, 2026 18:54
Add a Notion action so flows can read and write Notion databases and
pages. Covers CRUD over the Notion REST API (create/update/get/archive
page, query database, append blocks, search), two builder utils for
Notion's nested rich-text and property-value shapes, nine data types,
and three polling triggers (database item created/updated, page property
changed) driven by a lightweight interval poller that executes the
matching flow for each change.

Auth is configured via an integration_token (Bearer) and an optional
notion_version header, defaulting to the NOTION_INTEGRATION_TOKEN env
var and the pinned 2022-06-28 API version respectively.

Refs #42
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refs #42
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/centaurus/-/pipelines/3015137791

Status: Failed
Duration: 1 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Notion action

1 participant