A Flow is a series of cards. In a Flow, the first card will always be an Event. An Event must always precede Actions. In any Flow, there is only one Event card.
Every card after an Event is an Action. An action defines a task that your Flow performs.
When an Event occurs within your Flow, the Flow performs actions, one by one, from left to right.
There are two types of Actions within Workflows: Application Actions, which pertain to the specific cloud application you are working with, and Function Actions, which allow you to control or manipulate data being returned from your Application Actions.
Working with Applications
The way Workflows works with your applications is through Events and Actions, such as Gmail, Salesforce, or Smartsheet.
An application may contain many different unique Events and Actions. You can use these unique Events and Actions to build Flows.
There are three types of events: Application Events, Scheduled Events, and On Demand Events. When a Flow will execute depends on the Event specified.
With an Application Event, you can monitor for changes within your cloud application. When a change has been detected, the Flow will execute. Scheduled Events allow you to execute a Flow at a given interval. On Demand Events allow you to activate a Flow internally or externally, depending on your needs.
Examples of available Events:
Application: When a new Customer is created in Salesforce,
Scheduled: Every hour on the hour, execute this Flow,
On Demand: Execute this Flow after a customer has filled out a webform or called an API endpoint
Actions allow the Flow to tell the cloud application to do something.
Send an email through Gmail,
Update a contact in Salesforce,
Modify a row in Smartsheet.
Each application has a unique set of Events and Actions, according to the capabilities of the cloud application.
The ability for an Action card to accept input, and then return a different output, is one of the most powerful features of Workflows.
Each Card represents one specific step in a Flow. Within a Card, there are two types of fields: input and output. Input fields accept values. Output fields are values that a card produces which can be used by subsequent cards.
Here are a few examples of Action cards from Workflows:
Each of these three cards is an Action from a specific application. In this case, it’s an Action card from the Twilio application, an Action card from the Twitter application, and an Action card from the Gmail application.
The Twilio Action card contains two input fields: to, and body. It also contains two output fields: sid and dateCreated.
Types of Actions
Remember: Flows are just Actions and Events. However, there are two categories of Actions: Application Actions and Function Actions.
We’ve covered Application Actions, but we’ve yet to touch on the topic of Functions.
A Function is a card that allows you to interact with, change, or control the data in your Flow. Typically, a Function card is placed between Action cards.
Categories of Function cards include (but are not limited to):
True/False: evaluate values based on true or false conditions,
Flow Control: manage and manipulate the structure of your Flow,
Date & Time: parse and manipulate times and dates,
List: create and iterate over lists of items,
Number: perform mathematical operations,
Text: build, modify, and parse text.
Example: a simple Flow that uses Functions might use a card within the Branching category of Functions, Continue If, to determine whether or not a Flow should continue, based on a specific condition.
Or, the function Compose within the Text category, which allows you to compose a new message that contains output fields from other cards.
Functions such as these can be chained together to create complex interactions between your cards, providing a useful paradigm that allows you to create powerful Flows.
The diagram below represents almost all the building blocks necessary to create complex Flows.
Let’s unpack this diagram, step-by-step:
An Event card from a specific application generates a set of outputs, Output A through Output G.
Output B and Output F from the Event card are used as inputs for Action card #1. As a result, Action card #1 generates Output X, Y, and Z.
Output G from the Event card, and Output Y from Action card #1, are used as inputs to Action card #2.
Every element inside of a Flow is a card. Every card is one of three things: Event or Action. When thinking about how to design a Flow, it’s useful to remember this.
Flows are just series of inputs and outputs. Something goes in, something comes out.
In Flow Structure, you can learn about Types inside Designer. This is a fundamental concept that will help you understand how data is manipulated and moved during its lifecycle.