+
+

Build a Composer Flow

After you collect the information described in the preparation checklist, you can then build, activate, and monitor your flows. Building a flow involves creating a new flow or cloning an existing flow; adding and testing a trigger; adding and testing each action to be performed by the flow, in the order that you want each action performed; and finally testing the completed new flow before activating it.

Test each trigger and action as you add it to your flow.

Note that flows are private and cannot be shared.

Create a Flow

You can create a new flow or clone an existing flow.

Create a New Flow

To create a new flow:

  1. From the Composer Home page, click Create new flow.
    Your flow is named automatically.

  2. To change the name automatically created for your new flow, click the pencil icon next to Untitled Flow and create a custom name using any of the characters A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

  3. Click Save.

Now you are ready to create a flow trigger.

Clone an Existing Flow

To clone an existing flow:

  1. From the sidebar, click Flows.

  2. On the Flows page, click the name of the flow you want to clone.

  3. Click Clone.

    Composer copies the existing flow and opens the copy in the Flow Details page. Notice that the flow is named Copy of original flow name.

  4. If you want to rename the flow, click the pencil icon next to Copy of original flow name and use any of the characters A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

  5. Click Save.

Refresh a Flow

When building a flow, you may need to refresh the flow to view updated data at either the object level or the field level.

To refresh a object:

  1. Open the flow.

  2. Click the refresh icon in the upper right corner of the trigger or action card that you want to refresh.

    Refreshing an object The cache for the object type is cleared and the new data is retrieved.

To refresh a field:

  1. Open the flow.

  2. Click the refresh icon in the bottom left corner of the trigger or action card.

    Refreshing a field The cache for the field is cleared. The new value providers for the field are retrieved.

Create a Flow Trigger

After you create or clone a flow, define the trigger: the event or time interval that starts the flow. A trigger step is required to test or activate your flow.

To define a trigger based on an event:

  1. Open a flow if it is not already open. The What Should Start This Flow? dialog is displayed.

    What Should Start This Flow dialog

  2. Select the connector where the triggering event occurs. Your existing connections are displayed.

    List of connections

    You can choose an existing connection or create a new one:

    • Click an existing connection to select it.

    • Click Add new connector name Connection to create a new connection and select it.
      You can rename or delete connections from this dialog by clicking the gear icon.

  3. After you choose a connection, the trigger step displays:

    Trigger step

    Your trigger is named automatically. All triggers are named by combining the event or operation with the system name. For example, "On new record in Salesforce".

    • Optionally, you can rename the trigger. Valid characters: A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

    • Choose an event that starts the flow. Supply additional information as requested.

    • Click Save.

Change a Connection

You can change connections in a trigger or action. For example, you can create a flow using connections to a Salesforce sandbox org, and then after your flow testing is complete, you can change the connection in your trigger and actions to use a production org.

You can only change to a connection accessing the same system type. You can’t change a Workday connection to a Google Sheets connection, for example.

To change a connection:

  1. Open the flow.

  2. Click the change icon in the trigger or action that connects to a sandbox:

    Change the connection control
  3. Choose a new connection and click Save.

Repair a Connection

If your OAuth connection is lost, you can repair the connection by refreshing the access token.

To repair a connection:

  1. Open the flow.

  2. Click Edit.

  3. Click the change icon in the trigger or action that requires repair, and then click Change Connection.

  4. Click Repair.

Schedule a Flow

If you don’t choose a connection, you can schedule a flow to start at regular intervals.

To create a flow control:

  1. In a new flow, from the What Should Start This Flow? dialog, look in the Flow Control section and click Scheduler.

    What Should Start This Flow dialog

  2. Choose one of the time intervals, from 15 minutes to 30 days.

    New trigger with time interval
  3. Click Save.
    After creating the trigger, add one or more actions to the flow. To apply logic to an action, prepend it with an If/Else block or For Each loop.

Create an Action

To create an action:

  1. After the trigger in your flow, click the large plus sign to open the Add Action dialog.

  2. Click or create a connection for the action.

    For example, if your trigger is "new records created in Salesforce," and you want your action to be "copy new record to a Google Sheet," then you would choose or create a Google Sheet connection.

  3. Select an action, and any other values displayed. What you have to specify for an action depends on system type you are connected to for the action.

  4. If you want to edit a field, and that field is enabled for a custom expression, click the pencil icon.
    Note that you can only enter text or select a single data pill for a field. If you want to enter a complex expression (including functions, math operators, concatenation of text, and special tokens), you must use the Custom Expression Editor.

  5. Click Save.

When there are null values in custom expressions and are:

  • Fields without attributes, the null value is ignored. If the value in a required field, an error message occurs. If the value is in an optional field, the value is ignored and not sent to the connector.

  • Fields with attributes, the value is ignored and not sent to the connector.

Create a Flow Control

If you need to perform some logic before an action, select a flow control first:

  1. After the trigger in your flow, click the large plus sign to open the Add Action dialog.

  2. Click either If/Else Block or For Each. An If/Else block is good when you need to do different actions depending on one or more conditions. A For Each loop is good for processing a set of records.

  3. Complete the flow control, which usually includes adding an action.

  4. Click Save.

Add an If/Else Block

You can create an If/Else block to set conditions and execute actions only when specific criteria are met. This enables you to create flows that cover more than one linear branch, without the need to create separate flows.

Branches are logic-based steps that run vertically in a flow. You can add multiple steps inside each branch. Each branch is then executed in sequential order.

When adding decision steps, the values in the Field list are populated based on values selected when you designate the previous steps of your flow. After the Field value is selected, all compatible value options appear in the Operator list. If the selected Operator requires a second data pill to complete the condition, then the Value field is enabled and the list is populated based on the values you selected when defining the trigger. In the Value field, you can either enter a value manually or you can set it using the existing data from your flow.

For the purposes of comparing flows, if you initiate a date comparison when building a flow and there is no value in one of the date fields, the missing value is updated to 0001-01-01 by default.

The following operators are supported when building conditions in an If/Else block:

Function Supported Data Type Value Required? Notes

Equals/Does not equal

All

Yes

The value in this field is case-sensitive for strings.

Contains/Does not contain

Array, String

Yes

None

Greater than/Less than

Date, Number

Yes

In the Date field, the Greater than value is equal to a later date and the Less than value is equal to an earlier date.

Greater than or equal/Less than or equal

Date, Number

Yes

In the Date field, the Greater than or equal value is equal to a later date or the current date and the Less than or equal value is equal to an earlier date or the current date.

Is empty/Is not empty

Array, String, Object

No

None

Starts with/Ends with

String

Yes

A string value for this field is required.

Is true/Is false

Boolean

No

None

Is present/Is not present

All

No

If the value in this field is null or if there is no value selected, then the value in this field is set to Not present by default.

To create an If/Else block:

  1. Click the plus sign after the trigger or the last action in your flow.

  2. Click Add Action.

  3. Click If/Else Block to define the first branch.

  4. Enter the requested criteria.

  5. Click + to add an action to that branch. Every branch must have an action, also called a step.

  6. If you want to add another branch, click Add If and repeat the previous steps for every If/Else branch you create.

  7. If you want to set criteria for how the flow executes if none of the criteria for the existing branches are met, click Add Else and repeat the previous steps for the final branch.

  8. If you want to add additional conditions to your If/Else block, click Add condition.

  9. After you add all the branches, click Save.

Create a For Each Loop

To create a For Each Loop:

  1. Click the plus sign after the trigger or the last action in your flow.

  2. Click Add Action.

  3. Click For Each.

  4. Choose a data pill from the Input list. You must have a trigger or action that returns a set of records or there won’t be anything to choose here.

  5. Click the plus sign to add an action.

  6. After you complete the action, click Save.

You can add logic and actions in different patterns, depending on what your flow needs to do.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!