Trigger and node variables (output of previous actions)
Learn how to use the variables a trigger carries and the ones your nodes produce to personalize messages and actions in your workflows.
Watch this step in the video · Variables
What variables are in a workflow
Every time a workflow runs, the engine builds a context from the event that triggered it (the contact, the conversation, the channel) and keeps storing the result of every node as it executes. Those pieces of data are variables, and you can drop them into almost any text field using the {{$name}} syntax.
There are three sources of variables, which is exactly how the Variables panel groups them in the editor:
- From the trigger — what the triggering event carries with it (contact and conversation data).
- From the workflow — what your own nodes produce as they run (the result of previous actions).
- Built-in — always available regardless of the trigger (
{{$now}},{{$today}},{{$workflow.name}}, and so on).
Opening the variables panel
- Open Workflows from the side menu and enter your workflow.
- In the editor toolbar click the Variables button.
- A panel opens on the right with the three sections. Use the search box to filter by name.
- Click Copy on any variable to put the
{{$variable}}token on your clipboard, then paste it into the node field you are configuring.
Trigger variables
These depend on the event you picked as the trigger. Conversation triggers expose, among others:
{{$contact.first_name}},{{$contact.last_name}},{{$contact.display_name}},{{$contact.email}},{{$contact.phone}},{{$contact.company}},{{$contact.tags}}{{$conversation.id}},{{$conversation.status}},{{$conversation.channel_name}},{{$conversation.assignee}},{{$conversation.assignee_team}}
Some triggers add their own. For example, Conversation closed exposes closure data, and Auto-close on inactivity exposes {{$last_responder}} and {{$days_inactive}}. The panel always shows exactly the ones that apply to the selected trigger, each with a short description.
Node variables (the result of previous actions)
These are created as you add nodes. The most common:
- Set variable — each assignment row creates a variable with the name you type.
- Ask question — saves the customer's reply into the variable you name in Save to variable.
- HTTP request — saves the API response (as JSON) into the variable you define.
- Loop — inside the loop it exposes
{{$_index}}(position) and{{$_item}}(current element).
A node can only read variables from nodes that ran before it in the flow. Order matters: if you want to use the answer from an Ask question in a Send message, the message must come after the question.
Verifying that a variable resolves
- Insert the token into a field (for example a test message:
Hi {{$contact.first_name}}). - Click Test in the toolbar and launch a run.
- Open the Timeline panel at the bottom of the canvas and check the node output: you will see the text with the variable already substituted.
If it doesn't work
- The message shows the literal
{{$...}}text: the name doesn't match any available variable. Always copy it from the Variables panel to avoid typos. - The variable comes out empty: the source field had no value (for example a contact with no last name). The engine replaces null values with an empty string, not with the token.
- A node variable doesn't appear: confirm that node is connected earlier in the flow and that you saved the workflow.
Tip: you can write the token in three equivalent forms —
{{$contact.first_name}},{{contact.first_name}}, or inline$contact.first_name. Stick to the first for clarity.
Tip: variable names distinguish contact data (
contact.*) from conversation data (conversation.*). When a value exists in both, prefer the one that fits your flow's context.
Related articles
Related articles
-
Build your first workflow
Omnifox workflows automate your operation: a trigger starts the automation and action nodes do the work. Build a welcome message in minutes.
-
Workflow triggers catalog
Learn which events can start a workflow automatically in Omnifox.
-
Workflows complete guide
Workflows in depth, in 54 chapters: triggers, nodes, variables, testing, history, templates, import and export, with every setting explained and a real workflow end to end.
-
Action nodes available in workflows
Discover the actions a workflow can run automatically.
-
Conditions and branching (if/then) in a workflow
Make your flows take decisions and follow different paths based on each contact data.