Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ include:
- stripe-action
- smtp-action
- github-action
- notion-action

.rust-actions:
- cron-action
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The "central" place for all actions — a monorepo containing integrations provi
| [GLS](docs/Actions/GLS/overview.md) | GLS ShipIT integration for creating and managing shipments |
| [Stripe](actions/stripe-action/README.md) | Stripe payments integration for managing customers, payment intents and refunds |
| SMTP | Send emails (with attachments) through any SMTP server via nodemailer |
| [Notion](actions/notion-action/README.md) | Notion integration for creating, updating, querying, and archiving pages, appending blocks, and search |
## ENV

All actions share the following base environment variables, which connect them to the Hercules/Aquila infrastructure:
Expand Down
3 changes: 3 additions & 0 deletions actions/notion-action/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
node_modules/
dist/
13 changes: 13 additions & 0 deletions actions/notion-action/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:24.10.0-alpine

WORKDIR /app

COPY package.json package-lock.json* ./

RUN npm ci

COPY . .

RUN npm run build

CMD ["npm", "run", "start"]
42 changes: 42 additions & 0 deletions actions/notion-action/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Notion action

Hercules action for [Notion](https://developers.notion.com/). It turns Notion
into a lightweight backing store, task tracker, or knowledge base for flows:
create and update pages in a database, query and search, append block content,
and trigger flows when watched database items change.

## Configuration

Set on the action via its configuration definitions:

| Identifier | Type | Description |
|---------------------|---------------|---------------------------------------------------------------------|
| `integration_token` | TEXT | Internal-integration token (used as the `Bearer` token). |
| `notion_version` | TEXT (opt.) | `Notion-Version` header. Defaults to `2022-06-28`. |

The `integration_token` default is read from the `NOTION_INTEGRATION_TOKEN`
environment variable when present.

## Functions

| Function | Returns |
|-------------------------|------------------------|
| `notionCreatePage` | `NOTION_PAGE` |
| `notionUpdatePage` | `NOTION_PAGE` |
| `notionGetPage` | `NOTION_PAGE` |
| `notionArchivePage` | `boolean` |
| `notionQueryDatabase` | `NOTION_QUERY_RESULT` |
| `notionAppendBlocks` | `NOTION_BLOCK_LIST` |
| `notionSearch` | `NOTION_SEARCH_RESULT` |

Utility builders `notionCreateRichText` and `notionCreatePropertyValue` help
assemble Notion's nested rich-text and property-value shapes.

## Triggers

Notion has no push webhooks for most events, so triggers poll the API on an
interval (default 60s, override with `NOTION_POLL_INTERVAL_MS`):

- `NotionDatabaseItemCreated` — a new page appears in a watched database.
- `NotionDatabaseItemUpdated` — a page in a watched database is edited.
- `NotionPagePropertyChanged` — a watched property of a page changes value.
10 changes: 10 additions & 0 deletions actions/notion-action/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "notion",
"identifier": "notion-action",
"description": "Notion integration: create, update, query, and archive pages, append blocks, and search workspaces via the Notion API.",
"deployment": {
"docker": {
"image": "ghcr.io/code0-tech/centaurus/ci-builds/notion-action"
}
}
}
Loading
Loading