Skip to main content

Email workflow example

Learn how to design your workflows with email triggers and actions.


Prerequisites

Workflows are part of apps in Actioner. If you have not installed or created any app so far, first create an app from scratch.

To create a new workflow and open your workflow in canvas mode:

  1. Navigate to your app's Wokflows tab and create a new workflow.
  2. Give your workflow a name, provide a description and add tags optionally.

Example workflow: Contact form submissions

In this workflow, we are going to build an automation that creates a ticket in Zendesk, notifies your team in Slack, and replies back to sender through email when an email is received through a contact form. The notification will include the sender's name and the subject and body of the email.

Step 1. Select email trigger

  1. Select Email integration.
  2. On the opening left panel, you can give a new name to your trigger.
  3. Optionally update the email suffix.

Email workflow trigger

  1. Forward an email to the generated address or set up your system or forwarding rules to automatically forward emails.

Step 2. New action: Create a ticket

  1. Add a new node. Select Actions option and then Zendesk from the opening list.
  2. On the opening left panel, you can give a new name to your action.
  3. Select Create ticket in action selection field.
  4. Select your Zendesk connection or create a new connection if you haven't any.
  5. Enter {{event.email.subject}} in Subject field.
  6. Enter {{event.email.body_html}} in Description field.

Email workflow create ticket action

Step 3. New action: Send message to channel

  1. Add a new node. Select Actions option and then Slack from the opening list.
  2. On the opening left panel, you can give a new name to your action.
  3. Select Send message to channel in action selection field.
  4. In channel field, select the channel you want to send notifications to.
  5. Click on Message blocks and add a new markdown block. The opening Markdown block field is the area that you can design how your Slack message looks like. Here you can
    • add markdown elements to style your notification.
    • reference to the values in trigger event inside curlies.
  6. Add below to Markdown block. This will send a simple message to Slack containing the name of sender, subject and the body of the email.
> **From**: {{event.email.from}}
> **To**: {{event.email.to}}
> **Subject**: {{event.email.subject}}
> **Body**: {{event.email.body_text}}

Email workflow send message action

Step 4. New action: Send email

  1. Add a new node. Select Send email option.
  2. On the opening left panel, you can give a new name to your email node.
  3. Enter a suffix for the email that you'll be replying back.
  4. In Name field, provide sender name
  5. Enter {{event.email.from}} in To field. This will make sure that you'll be sending your reply back to the user who sent you an email.
  6. Enter {{event.email.subject}} in Subject field.
  7. Enter below in Content field.
We've received your request, and we will be in touch soon with a reply!
For reference your ticket is identified as # {{nodes.action0.response.body.ticket.id}}
  1. Optionally, switch to More settings and enter parameters for CC, BCC and Reply to fields.

Email workflow send email node