Actionsflow trigger slack
npm install @actionsflow/trigger-slack@actionsflow/trigger-slackThis is a slack trigger of Actionsflow. slack trigger is triggered when new messages of slack channel are detected.
> This is an official trigger, you don't need to install it manually.
We used Slack Outgoing Webhook to implement this trigger. So, you should add Outgoing Webhook to your Slack workspace, and set https://webhook.actionsflow.workers.dev/ as your webhook URL(s)
> You can configure the Channel or Trigger Word you want to watch at there.
``yaml`
on:
slack:
There is nothing can be specified. You can use General Config for Actionsflow Trigger for more customization.
This trigger's outputs will be the item of the slack message, you can see it here
An outputs example:
`json`
{
"token": "PLX28DPdb2XzXDGc6Xf717Sg",
"team_id": "T01AGF6RZ0V",
"team_domain": "actionsflow",
"service_id": "1359908388851",
"channel_id": "C01A4RQM3RD",
"channel_name": "trigger-test",
"timestamp": "1599951957.000800",
"user_id": "U01A4RGKEET",
"user_name": "theowenyoung",
"text": "test"
}
You can use the outputs like this:
`yaml``
on:
slack:
jobs:
print:
name: Print
runs-on: ubuntu-latest
steps:
- name: Print Outputs
env:
slack_text: ${{ on.slack.outputs.text }}
run: |
echo slack text: $slack_text