Skip to main content

Use Values, Lookups, Loops, and Waits

These building blocks let a workflow use real data: a customer's balance, a list of unpaid invoices, or a payment that arrives a few days later.

Use a value from an earlier step​

Values are written in double braces. There are three kinds:

  • The trigger's fields, such as {{GuestName}}.
  • Results of steps before it, as {{steps.name.field}}. The name is the step's result name, or its name in lower case with underscores.
  • Company values, such as {{vars.FinanceEmail}} and {{_run.Today}}.
  1. Open a step. At the top of its settings, Values you can use shows tags: blue for the trigger, purple for earlier steps, green for company values.
  2. Click in the box you want to fill. The bar says Adding to that box and puts the most useful tags first (addresses for a To box, phone numbers for an SMS, files for Attach files).
  3. Click a tag to add it where your cursor is. All values... opens the full list with search.

If a value is misspelled, or comes from a step that runs later, saving warns you, and Runs lists it under Empty values. Text from AI or a customer is shown as written and cannot add links or formatting to your email.

Look up a record​

  1. Add Find record. Choose the record; the list comes from your licensed modules.
  2. Add at least one match. A customer's balance needs the customer id or exact name. An item's stock needs the item id or SKU, and you can match the warehouse too.
  3. Optionally sort and set how many (1 to 50). Name the result, for example partyBalance. Later steps read {{steps.partyBalance.Record.AvailableCredit}} and {{steps.partyBalance.Found}}.
  4. Add an IF when the next step should run only sometimes, for example to ask for approval when an order is over the available credit.

A lookup only reads, and never sees another company's records. Available credit is the credit limit minus what the customer still owes. Stock available is on hand minus reserved. The template Credit check on a new sales order uses this.

Repeat steps for each record​

  1. Add Loop. In the visual builder it has two paths: Each and Done.
  2. Choose the list, for example steps.overdue.Records (no braces), or a list the event already carries.
  3. Set most records from 1 to 500 (default 100). If the list is longer, the run stops and does not send a partial set.
  4. Connect Each to the steps that repeat and Done to what follows. A loop cannot contain another loop.
  5. Inside the loop, {{item.CustomerEmail}} is that record and {{loop.index}} starts at 0.

Runs groups the passes under the step. A failure on one record stops the later ones, and Retry continues from that record. Sending the same step again for the same record does not send a second copy.

Wait for an event​

  1. Add Wait for event and choose the event, such as Invoice paid.
  2. Choose The same record, or match fields on the event. The same record works when the workflow started from that kind of record.
  3. Set the time limit (1 minute up to 30 days) and name the result, for example payment.
  4. In the visual builder connect Happened and Timed out. In the simple builder both continue, and a later step can read {{steps.payment.Matched}}.

Runs shows a line such as "Waiting for Invoice Paid until 21 Nov 09:00". The template Invoice reminder, then thank-you or a second reminder uses it.

Keep shared values and tables in one place​

  1. In Automation → Settings → Variables, add a value such as FinanceEmail and use it as {{vars.FinanceEmail}}. Tick Secret for API keys and webhook addresses: they are hidden after saving and work only in webhook, API and team chat steps.
  2. In Lookup tables, add a table, for example an approval matrix with the columns Department, UpTo and Approver. Paste rows or use Import from Excel (first sheet, first row as column names), then Save table.
  3. In a workflow, add Look Up in a Table, choose the table and the matches. An empty cell or * matches anything.

Later steps use {{steps.row.Row.Approver}} and {{steps.row.Found}}.