Skip to main content

Automated workflow example

Learn how to design automated workflows with event triggers.


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: Notify sales team when a deal is updated

In this workflow, we are going to build an automation that notifies sales team in Slack when a deal is updated in HubSpot. The notification will include the deal's name and the changed property and what value the new property is.

Step 1. Select your trigger (Deal property changed HubSpot event)

  1. Select HubSpot integration.
  2. On the opening left panel, you can give a new name to your trigger.
  3. Select Deal property changed event in trigger selection field.
  4. Select your HubSpot connection.

Automated workflow trigger

Step 2. Select your action (Send message to channel Slack action)

  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. Select your Slack connection.
  5. In channel field, select the channel you want to send notifications to.
  6. 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.
  7. Add below to Markdown block. This will send a simple message to Slack containing the name of the deal, the name of the updated property and its value.
Deal is updated!
> **Deal name**: {{event.body.deal.properties.dealname}}
> **Updated property**: {{event.body.propertyName}}
> **New value**:{{event.body.propertyValue}}

Automated workflow send message action

Example workflow extended: Notify sales team when a deal is closed

This workflow will work very similar to the above one, but this time we'll only send notification when the stage of the deal is updated to Closed win or closed lost.

event.body.propertyName in the event payload receieved from HubSpot shows the name of the field that is updated while event.body.propertyValue shows the value of the updated property.

We'll apply a condition to our trigger to only work when

  • event.body.propertyName equals to dealstage
  • AND event.body.propertyValue is one of closedwon or closedlost.
  1. Select your trigger node and click on Trigger conditions on the opening left panel.

  2. Select All conditions below option and add a new rule as below:

keyoperatorvalue
event.body.propertyNameequalsdealstage
event.body.propertyValueis one ofclosedwon
closedlost

Automated workflow trigger conditions

  1. You can update your Slack message as below:
Deal is closed!
> **Deal name**: {{event.body.deal.properties.dealname}}

Automated workflow send message action update

Example workflow extended: Notify different channels depending on the result

This time we'll send message to different channels depending on the deal is closed with a win or loss.

  1. After the trigger, add a new node by selecting Operators and then Condition.

  2. Add a new rule as below. Since it is only one rule, you can select either One or more conditions below or All conditions below option.

keyoperatorvalue
event.body.propertyValueequalsclosedwon

Automated workflow condition node

  1. Move the Slack send message action to true path of the condition. Automated workflow Slack action moved

  2. You can update your Slack message as below:

Deal is won :tada:
> **Deal name**: {{event.body.deal.properties.dealname}}

Automated workflow Slack message in true path

  1. Go to false path and add a new action by selecting Actions option and then Slack from the opening list.

Automated workflow new Slack action added

  1. We'll be adding the same Send message to channel action here, but with a different message.
Deal is lost :cry:
> **Deal name**: {{event.body.deal.properties.dealname}}

Automated workflow Slack message in false path