For the complete documentation index, see llms.txt. This page is also available as Markdown.

Variable

Learn more about adding variables to a workflow

The Variable action lets you store data values and use them to make decisions within your workflow. By defining variables and referencing them in conditions, you can build dynamic integrations that respond differently based on the data flowing through each run.

Add and configure a variable

1

Drag the Variable action into your flow at the point where you want to define the value.

2

Click Configure.

3

Enter a name for the variable in the Variable name field. For example, Name.

4

Assign a value. You can pull the value from a preceding query result or enter a static value for testing.

5

Click Save.

Adding Variables

We recommend using descriptive, consistent names across your workflow to make your flows easier to read and maintain.

Add a Debug action (optional)

To verify what value a variable holds at runtime:

1

Drag a Debug action into your flow.

2

Click Configure.

3

Drag the variable. For example, Name into the debug panel.

The variable's value appears in the console output when you run the flow.

Save and run the flow

1

Click Save to store your flow configuration.

2

Click the Run icon to execute the flow.

3

Monitor the console output to confirm that the variable holds the expected value and that the correct branch runs.

Console Window

Accumulating variable values inside a loop

When you use a Variable action inside a loop, each iteration appends to the variable's running value rather than replacing it.

For example, a formula like VALUE($myVar) | VALUE(id) inside a loop collects a new id on every iteration. After the loop finishes, downstream actions see the full accumulated result, not just the value from the last iteration.

Use this pattern when you need to gather a list of values across multiple records before passing them to a downstream step, such as a bulk insert or a formatted report.

For more information about loop behavior, see For condition.

Troubleshooting

If a variable condition produces an unexpected result, check the console output from the Debug action to confirm the variable holds the value you expect. Common causes include:

  • A preceding query returning no results, leaving the variable empty.

  • A mismatch between the variable name in the condition and the name defined in the Variable action.

  • Whitespace differences between the variable value and the comparison string.

Frequently Asked Questions (FAQ)

  1. What is the purpose of using variables in workflows?

Variables allow you to store and manipulate data dynamically within your workflows, making them more flexible and adaptable to various scenarios.

  1. Can I use multiple variables in a single workflow?

Yes, you can define and use multiple variables in a single workflow to handle different pieces of data and conditions.

  1. How do I update the value of a variable during a workflow?

You can update the value of a variable using subsequent actions or conditions within your workflow. Simply configure the variable action to assign a new value based on your logic.

  1. Is it possible to use variables across different workflows?

Variables are typically scoped to the workflow they are defined in. For cross-workflow data sharing, you may need to use global variables or other methods of data persistence supported by DBSync.

PRO TIP

Use meaningful variable names and ensure consistency in naming conventions to make your workflows easier to understand and maintain.

What's next

Last updated