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
)Translate 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.*
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__
Remove CRs
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/ateam/{{6.channel_name}}",
"description":"Help {{27.user.real_name}} in #foundation-mission thread https://{{6.team_domain}}.slack.com/archives/{{6.channel_id}}/p{{6.timestamp}}",
"responders":[{
"username":"brian.burnett@meltwater.com",
"type":"user"
}],
"visibleTo":[{
"name":"ateam",
"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.
Router
module in the workflowCredentials
and name it 'Jira (Meltwater)'URL
show the following https://jira.meltwater.com/rest/agile/1.0/board/___team_board_id___/sprint?state=active
Method
a GET
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 (SprintID)
Hey @__your_id_here__
A
/B
/M
Connection
Add your credentials for JIRA hereProject
should be set to your teams by selectionIssue Type
should be set to whatever your team would like to use to capture these messagesSummary
should be set to something that shows where it came from, perhaps consider [channel_name] Help json_requestor_real_name in slack
Issue Type
is set to 'Task'Sprint
Should be set to the sprint you have filtered out will only have one option pesent, the active sprint. You will want to set this to the id
of the sprint iterator that matched the filter.Project
value should be set to your teams projectReporter
can be set to a robot account or your userID if you like. Optionally you can take the email from the real-requestor and add an option to parse out the @meltwater.com
from the email address.Priority
should be set to an agreed upon valueStory Points
can be set to a value sufficient for on-call support or left emptyLabels
can be super helpful for searching, we use the following:
slack
(shows it came from slack)unplanned
(separates planned from unplanned sprint work)channel_name
(So you can search he channel name)Team
should be set to your team (if you use this field)Description
you can set to whatever in reality, we found the following useful:h4.{{27.user.real_name}} ({{now}})
{quote}{{6.text}}{quote}
- *User Timezone*: {{27.user.tz_label}}
- *User Phone*: {{27.user.profile.phone}}
- *Thread*: https://{{6.team_domain}}.slack.com/archives/{{6.channel_id}}/p{{6.timestamp}}
h4.Acceptance Criteria
- Determine path forward
- Ensure documentation if required
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