Workflows may display different text within an Action depending on certain conditions. Only some Actions allow this so-called conditional text to be inserted in them. This article discusses conditional text in more detail.
Table of Contents
Understanding Conditional Text
Conditional text, as its name implies, appears in a Workflow when certain conditions are met. These conditions are often based on data contained in square brackets that you call within the Action. Once you have applied the conditions, you can then decide on which text to show or hide.
Only some Actions allow conditional text to be inserted in them. These Actions are the following:
When defining conditional text within an Action, you need to create one (1) or more IF statements and an ELSE statement. The conditions are defined within these statements. When met, the corresponding texts contained within the statements are displayed in the workflow.
Conditional text is enclosed in curly brackets, in contrast to the data stored in Square Brackets that can be saved for later use in an Autto workflow (see Working with Square Brackets).
Conditional text is different from the Condition action, which is used to branch a workflow. However, the concept of Conditional text will be clearer to you if you know how branching in Autto works.
Conditional text is inserted using the Rich Text Editor that can be found in the Actions that allow them.
Adding Conditional Text to an Action
In this section, we present a step-by-step tutorial to add conditional text to a Page action. To ensure that you will understand the concept of conditional text, this tutorial will add three (3) IF statements as well as an IF statement to the Action. We will then run the unfinished workflow to see how conditional text works.
Before we start, create a Form action with a multiple-choice question and a Yes/No question. For the Multiple-choice question, ask if the contractor is a Company or Freelancer. For the Yes/No question, ask if it is a weekend when the form is filled up. Ensure that, for both questions, the answers are saved into square brackets.
Let us now start designing our Workflow:
- Drag any Action that allows conditional text to the canvas of the Workflow Editor.
- Position your cursor over the action, then click the Edit icon when it appears.
- On the Action Editor, navigate down to the Rich Text Editor, then click the Insert condition icon on the menu.
- On the Condition Editor, click the IF section, select the square bracket for the Multiple-Choice question in the Form action we created prior to the tutorial, then select Company. For the Yes/No question, select Yes. Finally, on the box at the bottom, enter the phrase Company weekend text appears here, then click Done. Our first IF statement should look like the screenshot below.
NOTE: Click the rightmost icon on the Text Editor's toolbar to use square brackets within the conditional text.
- Click the Add button on the top-right of the Condition Editor and add another IF statement, essentially repeating Step 4. This time, the IF statement should look like the screenshot below.
- Repeat Step 5 and add another IF condition. This last IF statement should look like the screenshot below.
- Click the ELSE section, then enter the text for the ELSE statement on the box at the bottom. See the screenshot below for an example.
- Click Done to save your changes and close the Condition Editor. If you make a mistake when setting up your Conditional text, just click the text on the Action Editor to display the Condition Editor again. The Page action should look like the screenshot below when completed.
Preview the unfinished workflow at this point. Run the preview four (4) times, each time going through the different conditions, so that you will see how the conditional text on the Page action works.
NOTE: You can substitute an Email action for the Page action in our example to view how the conditional text appears in a sent email.