Understanding Variables in Workflows

What Are Variables?

Variables are how you pass data between nodes in a Trigify workflow. Every trigger and action node produces outputs, and variables let you reference that data in later steps.

Think of it this way: when a New Post trigger fires, it captures the post text, author URL, like count, and more. Variables let you plug any of that data into the next node, whether that is an enrichment step, an AI agent, or a CRM integration.

Key concept: Variables are the glue that connects your workflow nodes together. Without them, each node would operate in isolation.


The Variable Syntax

All variables in Trigify follow this format:

{{ !ref($.trigger.outputs.variableName) }}

Here is how it breaks down:

Pattern

What It References

$.trigger.outputs

Data from the workflow's trigger node

$.steps.actionId.result

Data from a specific action step

$.steps.loopId.result[N].propertyName

Data from loop items


Three Types of Variable References

1. Trigger Data

Data from whatever kicked off the workflow.

{{ !ref($.trigger.outputs.text) }}
{{ !ref($.trigger.outputs.authorUrl) }}
{{ !ref($.trigger.outputs.likes) }}

2. Step Data

Data produced by any action node. Each node has a unique ID you can reference.

{{ !ref($.steps.personEnrichment1.result.firstName) }}
{{ !ref($.steps.sentimentAgent1.result) }}

3. Loop Item Data

When inside a Loop node, you get special variables for the current item.

{{ !ref($.steps.loop1.result.item) }}
{{ !ref($.steps.loop1.result.index) }}
{{ !ref($.steps.loop1.result.isFirst) }}
{{ !ref($.steps.loop1.result.isLast) }}

Variable Cheat Sheet

What You Want

Variable Path

Example Use

Post text from trigger

$.trigger.outputs.text

The full post content

Author LinkedIn URL

$.trigger.outputs.authorUrl

Input for Person Enrichment

Like count

$.trigger.outputs.likes

Filter with If Condition (likes > 100)

Comment count

$.trigger.outputs.comments

Filter viral posts

Post URL

$.trigger.outputs.postUrl

Pass to Get Post Likes node

Date posted

$.trigger.outputs.datePosted

Filter by recency

Source platform

$.trigger.outputs.source

linkedin, twitter, youtube, reddit, podcast

Enriched first name

$.steps.{nodeId}.result.firstName

Personalize outreach

Enriched email

$.steps.{nodeId}.result.email

Add to email campaign

AI agent output

$.steps.{nodeId}.result

Sentiment score, generated copy

Current loop item

$.steps.{loopId}.result.item

The current item being processed

Loop index

$.steps.{loopId}.result.index

Position in the loop (starts at 0)

Loop total

$.steps.{loopId}.result.total

Total items in the collection

Pro Tips

Pro tip: Use the variable picker! You do not have to type these by hand. Click the variable icon in any input field and Trigify shows you all available variables from previous steps.

Watch out: Person Enrichment uses jobTitle, not title. This trips people up.