cold-electrician-89990
02/08/2022, 9:19 PM"text":"<mailto:<mailto:brent@bluecore.com|brent@bluecore.com>|<mailto:brent@bluecore.com|brent@bluecore.com>>",
great-beach-70934
{
"agents": [
{
"disabled": false,
"name": "Extract Email Addresses Using Regex",
"options": "{\"mode\":\"extract\",\"matchers\":[{\"path\":\"{{receive_from_slack.body.text}}\",\"regexp\":\"\\\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,4}\\\\b\",\"to\":\"emails\"}]}",
"position": {
"x": -405,
"y": -1680
},
"type": "eventTransformation"
}
],
"links": [],
"diagramNotes": []
}
Only thing to watch out for there is that this action will find 2 matches, so later on when you want to use the address, just specify the first
one and you should be good to go. That will be something like:
extract_email_addresses_using_regex.emails.first
adorable-photographer-66555
split
Liquid filter on |
, cast it as_object
, then in a subsequent action call the array of the split string .last | remove: ">"
adorable-photographer-66555
{
"agents": [
{
"disabled": false,
"name": "Var",
"options": "{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"text\":\"<mailto:brent@bluecore.com|brent@bluecore.com>\"}}",
"position": {
"x": 555,
"y": 315
},
"type": "eventTransformation"
},
{
"disabled": false,
"name": "Split",
"options": "{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"message\":\"{{var.text | split: \\\"|\\\" | as_object}}\"}}",
"position": {
"x": 555,
"y": 420
},
"type": "eventTransformation"
},
{
"disabled": false,
"name": "Isolate Email Address",
"options": "{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"message\":\"{{split.message.last | remove: \\\">\\\"}}\"}}",
"position": {
"x": 555,
"y": 525
},
"type": "eventTransformation"
}
],
"links": [
{
"sourceIdentifier": 0,
"receiverIdentifier": 1
},
{
"sourceIdentifier": 1,
"receiverIdentifier": 2
}
],
"diagramNotes": []
}
cold-electrician-89990
02/08/2022, 9:34 PMalert-machine-38213
04/07/2022, 11:49 PMgreat-beach-70934