Repository navigation
feat: add Notion action (#42) - #93
Open
raphael-goetz wants to merge 2 commits into
Open
raphael-goetz wants to merge 2 commits into
raphael-goetz wants to merge 2 commits into
Conversation
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>
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/centaurus/-/pipelines/3015137791 Status: Failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
actions/notion-actionTypeScript 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:
notionCreatePage,notionUpdatePage,notionGetPage,notionArchivePage,notionQueryDatabase,notionAppendBlocks,notionSearch.notionCreateRichText,notionCreatePropertyValue(assemble Notion's nested rich-text / property-value shapes).NotionPage,NotionDatabase,NotionBlock,NotionBlockList,NotionQueryResult,NotionSearchResult,NotionRichText,NotionPropertyValue,NotionUser.NotionDatabaseItemCreated,NotionDatabaseItemUpdated,NotionPagePropertyChanged, driven by a lightweight in-process interval poller (Notion has no push webhooks for these events).Why
Closes #42.
How
fetch, zod schemas,@Identifier/@Name/@Schemadata types,@Signature/@Parameterruntime functions).ConfigurationDefinitionon theAction:integration_token(Bearer; default fromNOTION_INTEGRATION_TOKEN) and optionalnotion_version(default2022-06-28).RuntimeEventclasses (@EventSettingfordatabaseId/propertyName);src/poller.tsiterates the action's flows, polls the database query endpoint, and executes each flow for the pages that changed since the previous poll.notion-actioninto the.node-actionsCI matrix and listed it in the root README.zod@4.4.3: a fresh install resolves zod 4.6.7, whose schema internals crash the Hercules-vendored JSON-Schema walker inbuildModule()at registration time (passes typecheck/tests but fails when connecting to Aquila). 4.4.3 matches the rest of the repo.@code0-tech/hercules@^1.7.2.Testing
All run with
npm cito mirror CI (cd actions/notion-action):npm run typecheck— cleannpm run test— 11 passednpm run build— clean (the Docker CI step)buildModule()smoke test (what the SDK does on connect): registers 9 data types, 9 functions, 3 events.🤖 Generated with Claude Code