Cross-Provider Workflow

Notion Database Query to Slack

Version 1.0.0

Query a Notion database, then post the top result to Slack.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

notion slack

Workflows

notion-query-to-slack
Query a Notion database, then post the top result url to Slack.
Queries a Notion database and posts the url of the first matching page to a Slack channel.
2 steps inputs: databaseId, slackChannel outputs: messageTs, topPageUrl
1
query-database
$sourceDescriptions.notionApi.queryDatabase
Query the Notion database for matching pages.
2
post-to-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Post the top result url to the Slack channel.

Source API Descriptions

Arazzo Workflow Specification

prod-notion-database-query-to-slack-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Notion Database Query to Slack
  summary: Query a Notion database, then post the top result to Slack.
  description: >-
    A productivity and internal-ops workflow that queries a Notion database and
    posts a summary of the top matching page to a Slack channel, surfacing
    knowledge-base content to the team. Demonstrates chaining a knowledge-base
    provider and a messaging provider in a single Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: notionApi
    url: https://raw.githubusercontent.com/api-evangelist/notion/refs/heads/main/openapi/notion-openapi.yml
    type: openapi
  - name: slackChatApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: notion-query-to-slack
    summary: Query a Notion database, then post the top result url to Slack.
    description: >-
      Queries a Notion database and posts the url of the first matching page to a
      Slack channel.
    inputs:
      type: object
      properties:
        databaseId:
          type: string
        slackChannel:
          type: string
    steps:
      - stepId: query-database
        description: Query the Notion database for matching pages.
        operationId: $sourceDescriptions.notionApi.queryDatabase
        parameters:
          - name: database_id
            in: path
            value: $inputs.databaseId
        requestBody:
          contentType: application/json
          payload:
            page_size: 1
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          topPageUrl: $response.body#/results/0/url
      - stepId: post-to-slack
        description: Post the top result url to the Slack channel.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        requestBody:
          contentType: application/json
          payload:
            channel: $inputs.slackChannel
            text: $steps.query-database.outputs.topPageUrl
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
    outputs:
      topPageUrl: $steps.query-database.outputs.topPageUrl
      messageTs: $steps.post-to-slack.outputs.messageTs