forked from lightward/mechanic-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
send-a-message-to-slack.json
19 lines (19 loc) · 1.01 KB
/
send-a-message-to-slack.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"docs": "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](https://api.slack.com/incoming-webhooks#getting-started). Then, [learn more about sending to Slack with Mechanic](https://help.usemechanic.com/en/articles/3297438-can-i-send-messages-to-slack).",
"halt_action_run_sequence_on_error": false,
"name": "Send a message to Slack",
"online_store_javascript": null,
"options": {
"slack_incoming_webhook_url__required": null
},
"order_status_javascript": null,
"perform_action_runs_in_sequence": false,
"script": "{% action \"http\" %}\n {\n \"method\": \"post\",\n \"url\": {{ options.slack_incoming_webhook_url__required | json }},\n \"body\": {\n \"text\": \"hello, world!\"\n }\n }\n{% endaction %}",
"subscriptions": [
"mechanic/user/trigger"
],
"subscriptions_template": "mechanic/user/trigger",
"tags": [
"Slack"
]
}