digdag-hangouts-chat is a plugin sending messages to Hangouts Chat. It can customize json templates for building messages.
DEMO:
SUCCESS | FAILED |
---|---|
- Can use the
hangouts>
opetaror - Easy to use
- Flexible templates
- Digdag
- Hangouts Chat
- Webhook URL (Incoming WebHooks)
Also, you can see expamle workflow at sample directory.
- Create workflow file (e.g. hangouts.dig)
_export:
plugin:
repositories:
- https://jitpack.io
# - file://${repos}
dependencies:
- com.github.tamanyan:digdag-hangouts-chat:0.1.5
# - io.digdag.plugin:digdag-hangouts-chat:0.1.5
# Set Reqired params
webhook_url: https://chat.googleapis.com/v1/spaces/XXXXXXXXXXXXXXX/messages?key=XXXXXXXXXXXXX
# Set Option params
workflow_name: Hangouts Workflow
ENV: develop
+step1-1:
echo>: "Next will be success!"
+step1-2:
hangouts>: success_template.json
+step2-1:
echo>: "Next will be failed..."
+step2-2:
sh>: exit 1
_error:
hangouts>: failed_template.json
- Create templates for Hangouts Message (e.g. success_template.json)
{
"cards": [
{
"sections": [
{
"widgets": [
{
"keyValue": {
"topLabel": "Workflow Name",
"content": "${workflow_name}",
"contentMultiline": "false"
}
},
{
"keyValue": {
"topLabel": "Task Name",
"content": "${task_name}"
}
},
{
"keyValue": {
"topLabel": "Message",
"content": "Workflow executed successfully",
"contentMultiline": "true"
}
}
]
}
]
}
]
}
- Runs workflow
$ digdag run -a hangouts.dig
You can see documentations about Hangout Card formatting Message
if you are interested in customizing messages.