Skip to content

Instantly share code, notes, and snippets.

@tuckner
Last active October 5, 2022 18:21
Show Gist options
  • Save tuckner/c03f585627bba6f307e27e4dcdddb55c to your computer and use it in GitHub Desktop.
Save tuckner/c03f585627bba6f307e27e4dcdddb55c to your computer and use it in GitHub Desktop.
{
"schema_version": 4,
"standard_lib_version": 3,
"name": "Email to Slack",
"description": null,
"guid": "3a9a110fa1a7e843b9230c693ff72c01",
"slug": "email_to_slack",
"exported_at": "2022-10-05T18:20:33Z",
"agents": [
{
"type": "Agents::IMAPAgent",
"name": "Receive Email Action",
"disabled": false,
"guid": "e3541c287b01117ba032e7bd78c8b1e8",
"options": {
"mode": "email"
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"width": null
},
{
"type": "Agents::EventTransformationAgent",
"name": "Form Message",
"disabled": false,
"guid": "c999bbe23f23dd0a45192141e70ca264",
"options": {
"mode": "message_only",
"loop": false,
"payload": {
"message": "<<STRIP_HTML(REPLACE(receive_email_action.body, '<br>', '\n>'))>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"width": null,
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Post Message to a Slack Channel using a Channel ID",
"disabled": false,
"guid": "a90d800686506a0cf5f9ff122d32b5e1",
"options": {
"url": "https://slack.com/api/chat.postMessage",
"content_type": "json",
"method": "post",
"payload": {
"channel": "slack-channel-name",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Email Received"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Email from: <<receive_email_action.from>>* "
}
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Body:*\n\n><<form_message.message>>"
}
]
},
{
"type": "divider"
}
]
},
"headers": {
"Authorization": "Bearer <<CREDENTIAL.slack>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"width": null,
"schedule": null
}
],
"diagram_notes": [],
"links": [
{
"source": 0,
"receiver": 1
},
{
"source": 1,
"receiver": 2
}
],
"diagram_layout": "{\"e3541c287b01117ba032e7bd78c8b1e8\":[450,150],\"c999bbe23f23dd0a45192141e70ca264\":[450,225],\"a90d800686506a0cf5f9ff122d32b5e1\":[450,300]}",
"send_to_story_enabled": false,
"entry_agent_guid": null,
"exit_agent_guids": [],
"exit_agent_guid": null,
"keep_events_for": 604800,
"reporting_status": true,
"send_to_stories": [],
"form": null,
"forms": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment