Cross-Provider Workflow

Notion Publish Page to SendGrid Email and Slack Notify

Version 1.0.0

Publish a content page in Notion, email subscribers via SendGrid, then notify Slack.

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

Providers Orchestrated

notion sendgrid slack

Workflows

notion-publish-email-slack
Publish a Notion page, email via SendGrid, notify Slack.
Creates a Notion content page, emails subscribers an announcement via SendGrid, then posts a Slack message that the page is live.
3 steps inputs: notionDatabaseId, slackChannel, subscriberEmail, title outputs: emailStatus, messageTs, pageId
1
publish-page
$sourceDescriptions.notionApi.createPage
Create the content page in the Notion database.
2
email-subscribers
$sourceDescriptions.sendgridApi.SendMail
Email subscribers an announcement via SendGrid.
3
notify-slack
$sourceDescriptions.slackChatApi.postChatPostmessage
Notify Slack that the page is live.

Source API Descriptions

Arazzo Workflow Specification

soc-notion-publish-page-sendgrid-email-slack-notify-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Notion Publish Page to SendGrid Email and Slack Notify
  summary: Publish a content page in Notion, email subscribers via SendGrid, then notify Slack.
  description: >-
    A publishing workflow that creates a content page in a Notion database,
    emails subscribers an announcement through SendGrid Mail Send, and notifies a
    Slack channel that the page is live. Demonstrates fanning a single editorial
    publish out to an email audience and a team channel in one 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: sendgridApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/tsg_mail_v3.yaml
    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-publish-email-slack
    summary: Publish a Notion page, email via SendGrid, notify Slack.
    description: >-
      Creates a Notion content page, emails subscribers an announcement via
      SendGrid, then posts a Slack message that the page is live.
    inputs:
      type: object
      properties:
        notionDatabaseId:
          type: string
        title:
          type: string
        subscriberEmail:
          type: string
        slackChannel:
          type: string
    steps:
      - stepId: publish-page
        description: Create the content page in the Notion database.
        operationId: $sourceDescriptions.notionApi.createPage
        requestBody:
          contentType: application/json
          payload:
            parent:
              database_id: $inputs.notionDatabaseId
            properties:
              Name:
                title:
                  - text:
                      content: $inputs.title
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          pageId: $response.body#/id
          pageUrl: $response.body#/url
      - stepId: email-subscribers
        description: Email subscribers an announcement via SendGrid.
        operationId: $sourceDescriptions.sendgridApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.subscriberEmail
                subject: New post published
            from:
              email: [email protected]
            content:
              - type: text/plain
                value: Read our new post $inputs.title at $steps.publish-page.outputs.pageUrl
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          emailStatus: $statusCode
      - stepId: notify-slack
        description: Notify Slack that the page is live.
        operationId: $sourceDescriptions.slackChatApi.postChatPostmessage
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            channel: $inputs.slackChannel
            text: Published $inputs.title $steps.publish-page.outputs.pageUrl
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
    outputs:
      pageId: $steps.publish-page.outputs.pageId
      emailStatus: $steps.email-subscribers.outputs.emailStatus
      messageTs: $steps.notify-slack.outputs.messageTs