So the goal here is to be able to create a toolset that will be re-usable based on the reporting webhook from slack and split-processing it both into an OpsGenie Page for those that would like to have advanced notification and into a specially format
This step will create the automation pipeline in order of operation.
In integromat, create a new senario and add a webhook trigger:
?
bubble to define the triggering action.INSTANT
trigger that will execute whenever integromat receives data.Slack - Outgoing Webhook
so you will know what will be sending data inbound.3
URL(s)
list (one per line) found in the #fou-drone-service outgoing webhook and add your local user-id in a Hey <@__user_id__>
CSV match listURL(s)
list (one per line) found in the #fou-grafana-service outgoing webhook and add your local user-id in a Hey <@__user_id__>
CSV match listURL(s)
list (one per line) found in the #foundation-mission outgoing webhook and add your local user-id in a Hey <@__user_id__>
CSV match listChannel
should be set to a single chatroom you want to monitorTrigger Word(S)
match from the beginning of the line, so we really have no choice but to watch tails threaded ping since that will always hold the format of ^Hey <@__oncall_user__> ! <@__requestor__> said: __original_message_
(EX: Hey <@UA7T176Y5>
)URL(s)
should contain the webhook URL you created in step 1.1.Token
used for verification / anti-spam if you need it, I don't use this feature yetDescriptive Label
Should be something similar to Team: channel-name
(EX: A-Team: fou-drone-service
)Customize Name
Should reflect the service Integromat: Team
(EX: Integromat: A-Team
)Cuztomize Icon
If you want the actual logo you can use https://logo.clearbit.com/integromat.comTranslate User IDs
Make sure you take the global ID's and shift them to the local workspace ones (easier to parse)Hey @__your_id_here__
Pattern
to .*!\s+<@(.*)>\s+said.*
(will match all 'Tails' pings)Case sensitive
option is only one selected.Text
box to the text
field from the webhookuser
fieldURL
should be set to the value you copied with the 'user' parameter edited to be the drop-in $1
from the previous matchSlack (Real Requestor)
Data structure
field empty so that it is dynamicJSON string
segment is populated with the Data
from the HTTP call in the prior step.JSON (Requestor)
Hey @__your_id_here__
JSON (Requestor)
module in the workflowShow advanced settings
checkboxEvaluate all states as errors
checkbox is checkedURL
should be set to https://api.opsgenie.com/v2/alerts
Method
should be set to POST
Body type
should be set to Raw
Content type
should be set to JSON (application/json)
Headers
should be set to a team-owned API integration in OpsGenie
+
Name
to Authorization
Value
to GenieKey __copied_api_key_from_opsgenie__
Reject connections that are using unverified certs
Disable serialization of multiple same query string keys as arrays
Requet compressed content
Request content
should be set to:{
"message": "Slack Alert ({{6.channel_name}})",
"alias": "slack/__opsgenie_team__/{{6.channel_name}}",
"description":"Help {{27.user.real_name}} in #{{6.channel_name}} thread https://{{6.team_domain}}.slack.com/archives/{{6.channel_id}}/p{{6.timestamp}}",
"responders":[{
"username":"__your_email_address__",
"type":"user"
}],
"visibleTo":[{
"name":"__opsgenie_team__",
"type":"team"
}],
"tags": [
"slack",
"mention",
"{{6.channel_name}}"
],
"entity":"{{ifempty(27.user.profile.email; 27.user.real_name)}}"
}
Once you are done adding the HTML above, there are a couple steps to remember.
To ensure that nobody else is sending you messages you don't want...
user_id
of the webhook equals UB6SQ901L
(the tails uid)trigger_word
of the webhook contains your own personal uid