Generate a Slack send payload json file from Notion DB query result.
./payload.json
slackapi/slack-github-action
.payload-file-path
.name: Send filtered Notion DB pages action
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Generate send payload for slack
uses: litencatt/[email protected]
env:
NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }}
NOTION_DB_ID: ${{ secrets.NOTION_DB_ID }}
with:
header: Header
description: Description
filter: |
{
"property": "Select",
"select": {
"equals": "Foo"
}
}
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
payload-file-path: "./payload.json"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK