Send a message to Slack
Purely for demonstration purposes, this task illustrates how one might set up a script to send Slack messages. As written, this task requires a Slack incoming webhook URL - learn how to generate this. Then, learn more about sending to Slack with Mechanic.
Try this taskWhen it runs
Occurs when a user manually triggers the task
What you choose
Slack incoming webhook URL
Documentation
Purely for demonstration purposes, this task illustrates how one might set up a script to send Slack messages. As written, this task requires a Slack incoming webhook URL - learn how to generate this. Then, learn more about sending to Slack with Mechanic.
Task code and subscriptions
You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.
Subscriptions
mechanic/user/trigger
How task subscriptions work
Option types and flags
- Slack incoming webhook URL (required)
Task code
{% action "http" %}
{
"method": "post",
"url": {{ options.slack_incoming_webhook_url__required | json }},
"body": {
"text": "hello, world!"
}
}
{% endaction %}
Mechanic Liquid reference