Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/litencatt/notion-db-pages-payload-for-slack
Generate payload.json from Notion DB pages query result for Slack message
https://github.com/litencatt/notion-db-pages-payload-for-slack
notion notion-database slack-notifications
Last synced: 9 days ago
JSON representation
Generate payload.json from Notion DB pages query result for Slack message
- Host: GitHub
- URL: https://github.com/litencatt/notion-db-pages-payload-for-slack
- Owner: litencatt
- License: mit
- Created: 2023-05-07T05:01:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-04T05:23:17.000Z (over 1 year ago)
- Last Synced: 2024-12-08T01:25:29.616Z (about 2 months ago)
- Topics: notion, notion-database, slack-notifications
- Language: TypeScript
- Homepage:
- Size: 771 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
## Slack send payload generate GitHub Action
Generate a Slack send payload json file from Notion DB query result.### Setup
- Slack
- [Slack Webhook Setup](https://github.com/slackapi/slack-github-action/blob/main/README.md#setup)
- Notion
- [Create Notion Integration](https://developers.notion.com/docs/create-a-notion-integration)### Usage
- This action is supposed to be used with [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action)
- This action generate a payload data file to `./payload.json`
- And then you passing it to `slackapi/slack-github-action`.`payload-file-path`.#### Notion DB pages example
#### Slack Notify message example
```yml
name: Send filtered Notion DB pages action
on:
push:
branches: [ "main" ]
workflow_dispatch:jobs:
notify:
runs-on: ubuntu-lateststeps:
- 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
```