Tutorial

Workflow Basics Tutorial

Email each new website lead right away, wait a day, then make a task to call them back.

Chapters

1. Start a Workflow

Application:CRM, on the web
Who is this for:A company admin
Time:5 minutes

A workflow does work for you when something happens. In this tutorial, Rivera Plumbing builds one for each new lead from its website form:

  1. Email the person a thank-you right away.
  2. Wait one day.
  3. Create a task to call them back.

Every workflow starts with a trigger. The trigger is the event that starts it.

Create the workflow

  1. In the menu on the left, click Workflows.
  2. Click Create, then Create from scratch.
The Workflows page Create from scratch

The editor opens. The steps you can add are on the left. You build the workflow in the middle. Settings for the step you click show on the right.

  1. At the top left, type a name, such as Website lead follow-up.
The empty workflow editor

Add the trigger

  1. Drag Trigger from the left onto the middle.
  2. On the right, under Operation, click Entity Event. This starts the workflow when a record changes.
  3. Set Object to Lead and Event to Created.
  4. Under Filter conditions, click Add condition. Pick Source widget, then is, then your form, Request a visit form.

Now the workflow runs only for leads from that form. Leads you type in yourself do not start it.

The trigger settings

2. Add the Steps

Application:CRM, on the web
Who is this for:A company admin
Time:10 minutes

Each step runs after the one before it. You connect them with Next nodes: on each step, pick the step that comes after it.

Step 1: Send an email

  1. In the search box on the left, type Email. Drag Email onto the middle.
  2. Click the Trigger. In Next nodes, pick Email. A line now joins them.
  3. Click the Email step and fill in the right side:
Field What to enter
To {{ trigger.data.instance_payload.email }}. This is the email of the new lead.
Subject Thanks for contacting Rivera Plumbing
Body Your message. Type {{first_name}} where the person's first name should go.
Sender Email Your email. Replies come back to it.
Sender Name Your name.
The Email step

Words in double curly brackets are filled in for each lead. {{first_name}} becomes Ben for Ben Walker.

Step 2: Wait one day

  1. Search for Delay and drag it onto the middle.
  2. Set Duration to 1 and Unit to Days.
  3. Click the Email step. In Next nodes, pick Delay.
The Delay step

Step 3: Create a task

  1. Search for Task and drag it onto the middle.
  2. Fill in the right side:
Field What to enter
Title Call {{first_name}} to book the visit
Assigned User Who should make the call.
Due Date {{ current_date }}. The task is due on the day it is made.
Subject Type Lead
Subject ID {{ trigger.data.instance_payload.id }}. The task then shows on the lead's record.
  1. Click the Delay step. In Next nodes, pick Task.
The Task step

Tidy up

Click Auto-arrange at the top. The steps line up from left to right.

The finished workflow

A step with a warning sign is missing something. Click it and fill in the fields marked with *.

3. Save, Turn On and Test

Application:CRM, on the web
Who is this for:A company admin
Time:5 minutes

A workflow acts for you, so it needs a key to your account. Then you save it, publish it, and test it with a real form.

Give the workflow a key

The key is called an access token. It decides what the workflow may do.

  1. Click an empty part of the middle. Workflow Info shows on the right.
  2. Under Authorization, open Select token and click Create.
The empty token list
  1. Click CRM Access Token.
Pick a token template
  1. Change the title to Website lead workflow.
  2. Scroll down to Tasks and tick Create and Read. The workflow needs them to make the call-back task.
  3. Click Create. The token is now selected.
Allowing tasks
  1. Turn on Log executions. Then you can see each run later.
The token and logging set

Save and publish

  1. Click Save. The workflow is saved as a Draft. A draft does not run.
The saved draft
  1. Click Publish. The Draft tag goes away, and Enabled is on.
The published workflow

Test it

  1. Open your website form and send it as a customer. Use an email address you can read.
  2. Within a minute the thank-you email arrives.
  3. In the workflow, click Executions. Each run shows with its time and result.
The Executions list

The task shows on the lead's record one day later.

Stop or change the workflow

  • To stop it for a while, turn off Enabled under Workflow Info and click Save.
  • To change it, edit the steps, click Save, then Publish again.

This is the end of the Workflow basics tutorial.

All tutorials