Contact nodes: Update contact and Set variable
Learn how the Update contact and Set variable nodes let your workflows save data to a contact's profile and handle temporary values during a run.
Watch this step in the video · Contacts and variables
The Update contact and Set variable nodes are what turn a workflow from something that just reacts into something that remembers. One writes permanent data onto the contact's profile; the other holds temporary values that live only for the duration of the run.
Both live in the Actions section of the workflow editor palette (Workflows in the side menu).
When to use each
- Update contact: when you want to store something permanently on the contact (their name, email, language, or a custom field like "Lead source"). Whatever you write shows up in Contacts and survives across conversations.
- Set variable: when you need a temporary value to reuse later in the same flow (a retry counter, or a string you assembled from the customer's reply). The variable disappears when the run ends.
The Update contact node
- Open your workflow from Workflows and drag the Update contact node onto the canvas.
- Connect it to the previous node's output.
- In the inspector on the right, add one or more assignments. Each one has a Field and a Value.
- For Field, pick a standard field (First name, Last name, Display name, Email, Phone, Company, Notes, Language, Timezone) or a custom field you created in Contacts.
- For Value, type fixed text or insert flow data with the
{{$variable_name}}syntax (for example{{$ai.response}}). - Save and publish the workflow.
The node updates the active contact of the conversation that triggered the workflow. If there's no contact in context, the node has nothing to write to.
The Set variable node
- Drag Set variable onto the canvas and connect it.
- Add an assignment with a Name (no spaces, e.g.
attempts), a Value, and an Operation. - Choose the operation:
- Set: overwrites the value.
- Append: concatenates text onto the current value.
- Increment: treats it as a number and adds; perfect for counters. Leave the value empty to add 1.
- Later, reference the variable from any other node with
{{$attempts}}.
Variables persist for the whole execution, even after a wait node, so you can define them up front and use them at the end.
Verifying it works
Use the editor's Test button to run the flow against a test contact. Then open that contact in Contacts and confirm the field changed. For variables, check the workflow's execution timeline: each node shows the values it computed.
If it doesn't work
- "No contact_id in context": the workflow fired from an event with no contact attached. Use a trigger tied to a conversation or contact.
- Custom field won't save: confirm the field exists in Contacts and that its type (number, date, boolean) matches the value you send.
- Variable comes out empty: make sure the name is spelled identically where you define it and where you use it;
{{$Attempts}}and{{$attempts}}are different.
Tips
- Combine both: set a temporary variable, build it up from several replies, then push it onto the contact at the end with Update contact.
- Use Update contact to store the detected language and personalize future messages.
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.