opsbeginner8 min setupby Mantle

Weekly Notion database digest to Slack

Query a Notion database on a schedule and post what it holds into a Slack channel.

Fridays 16:00Query the databaPost the digest

Drag to pan, pinch to zoom. This is the real graph the template installs.

Purpose

Query a Notion database on a schedule and post what it holds into a Slack channel.

How it works

What it does

  • Runs every Friday at 16:00.
  • Queries a Notion database, most recently edited first, capped at 25 pages.
  • Posts the count and the pages to a Slack channel.

Validation

This template is contract-validated: the unit suite checks every node type, every config key and the whole graph against the same rules a saved workflow passes. It has not been run against the live provider — the ids, names and columns below are placeholders to replace with your own.

Nodes 3

  1. 01Fridays 16:00trigger.scheduleTrigger
  2. 02Query the databasenotion.query_databaseApp
  3. 03Post the digestslack.post_messageApp
View template JSON
{
  "format": "mantle-workflow/v1",
  "id": "notion-weekly-digest-slack",
  "name": "Weekly Notion database digest to Slack",
  "graph": {
    "nodes": [
      {
        "id": "cron",
        "type": "trigger.schedule",
        "label": "Fridays 16:00",
        "config": {
          "cron_expr": "0 16 * * 5",
          "timezone": "UTC"
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 60,
          "y": 220
        }
      },
      {
        "id": "query",
        "type": "notion.query_database",
        "label": "Query the database",
        "config": {
          "database_id": "00000000000000000000000000000000",
          "sorts": [
            {
              "timestamp": "last_edited_time",
              "direction": "descending"
            }
          ],
          "page_size": 25
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 380,
          "y": 220
        }
      },
      {
        "id": "post",
        "type": "slack.post_message",
        "label": "Post the digest",
        "config": {
          "channel": "#weekly",
          "text": "*This week in Notion* — {{ steps.query.count }} page(s) updated.\n```{{ steps.query.results }}```"
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 700,
          "y": 220
        }
      }
    ],
    "edges": [
      {
        "from": "cron",
        "to": "query"
      },
      {
        "from": "query",
        "to": "post"
      }
    ]
  }
}

Requirements

The connections and permissions each step needs, from the node contracts in the catalog.

  • NotionAPI key

    Used by Query the database.

    Credential: the integration token, or {"token": "…"}

    • Share the database with your integration in Notion first, or the query returns 'Could not find database'.
  • SlackAPI key

    Used by Post the digest.

    Credential: the bot token (xoxb-…), or {"token": "xoxb-…"}

    • The bot must be a member of a private channel before it can post there (Slack error not_in_channel otherwise).

Setup

  • Set database_id and share the database with your Notion integration.
  • Add a filter (Notion's own filter object) to narrow the digest — for example only pages whose Status is In progress.
  • Pick Notion and Slack connections and set the channel.

Sample input and output

Synthetic examples: node-contract samples or placeholders, never customer data.

Input

Runs on the cron schedule 0 16 * * 5 (UTC). There is no incoming payload: the first step fetches the data.

Output

Post the digest slack.post_message

{
  "channel": "",
  "ok": true,
  "ts": ""
}

Failure handling

What the graph does when a step fails, read from its retry settings, error branches and error policies.

  • A step that fails, after any retries, fails the run. The failed step is kept with its input and error.

See it run, then make it yours.

Templates install as drafts. Edit any step, and Workflow Health re-checks the graph on every save.