When you're building workflows in Tines, you often need to include conditional logic directly within text fields or payloads. Maybe you want to include a message only if a certain condition is true, or loop through an array to build out a formatted email. Tines gives you tags: a way to embed conditional statements, loops, and logic directly into text fields without needing separate actions.
Tags are a special syntax (used within the Tags pill) that are used in text fields to add conditional logic, loops, or control flow. They're wrapped in %, and they let you execute logic inline. Tags let you write "if this, then that" logic right inside your action configuration, keeping your workflows cleaner and more efficient.
Why tags matter
Tags keep logic close to data: When you need conditional text in a message, email, or payload, tags let you define that logic right where the text appears.
Tags enable dynamic content: Build messages, reports, or payloads that change based on upstream data without complex branching.
Tags work in text fields: You can use tags anywhere you're building text content: Event Transform payloads, HTTP Request bodies, Send Email messages, and more.
The if tag: Conditional content
The most common tag is %if%, which lets you include content only when a condition is true.
Basic syntax
%if <condition>%
Content to include if true
%endif%Example: Employee onboarding message part one
Let's say you're building a Slack message about an employee onboarding request and want to include a note only for remote employees. Before this, we pulled information for the employee via a Get Employee HTTP Request action who's output looks like:
{
"id": "101",
"name": "Elena Brooks",
"department": "Engineering",
"location": "remote"
}Now, for the next connecting action, we want to send a Slack message, but to only include the shipping line specifically if the employee's location is set to remote. In the HTTP Request action's payload to Slack, we could do something like this for the message:
New Hire: get_employee.name
Department: get_employee.department
%if get_employee.location = "remote"%
📍 Remote employee - Ship laptop to home address
%endif%get_employee.name: The upstream reference path to the employee'sname(via a Value pill). This will always display as it isn't within the if-tag pill boundaries.get_employee.department: The upstream reference path to the employee's department (via a Value pill). This will always display as it isn't within the if-tag pill boundaries.get_employee.location: (within a Tag pill utilizing if) The upstream reference path to the employee's location.📍 Remote employee - Ship laptop to home address: The content to display if the condition is met.
Then, we run the actions. If the employee is remote, the shipping note appears. If not, it's omitted entirely. So, if we were to send this for Elena, the event output would include the following message:
New Hire: Elena Brooks
Department: Engineering
📍 Remote employee - Ship laptop to home addressThe if-else tag: Two paths
You can add an %else% clause to show different content when the condition is false.
Basic syntax
%if condition%
Content if true
%else%
Content if false
%endif%Example: Employee onboarding message part two
We'll use the same employee example, but pull a different employee to showcase how the if-else tag works. Let's pull that other employee's data:
{
"id": "102",
"name": "Marcus Ellery",
"department": "Sales",
"location": "office"
}Now let's add additional logic to the tag. If the user's location is set to "office", include a different message:
New Hire: get_employee.name
Department: get_employee.department
%if get_employee.location = "remote"%
📍 Remote employee - Ship laptop to home address
%else%
🏢 In-office employee - Ship laptop to office
%endif%For Marcus, his resulting message would look like:
New Hire: Marcus Ellery
Department: Sales
🏢 In-office employee - Ship laptop to officeThe if-elseif-else tag: Multiple conditions
For more complex logic, use %elseif% to check multiple conditions in sequence.
Basic syntax
%if condition1%
Content if condition1 is true
%elseif condition2%
Content if condition2 is true
%else%
Content if all conditions are false
%endif%Example: Employee onboarding message part three
Right back to our employee example. Let's pull a different employee one more time:
{
"id": "103",
"name": "Talia Rivers",
"department": "Marketing",
"location": "hybrid"
}Now, let's build out a tag that handles all three different "location" values:
New Hire: get_employee.name
Department: get_employee.department
%if get_employee.location = "remote"%
📍 Remote employee - Ship laptop to home address
%elseif get_employee.location = "office"%
🏢 In-office employee - Ship laptop to office
%else%
⭐ Reach out to employee directly for laptop shipping preferences
%endif%If we were to send a message for Talia, it would look like:
New Hire: Talia Rivers
Department: Marketing
⭐ Reach out to employee directly for laptop shipping preferencesThe for tag: Loop through arrays
The %for% tag lets you loop through an array and generate content for each element.
Basic syntax
%for item in array%
Content for each item
%endfor%Example: Meeting attendees
We have an array of attendees for a meeting pulled via a prior action:
{
"attendees": [
{
"name": "Sarah Chen",
"email": "schen@company.com"
},
{
"name": "Emily Ramirez",
"email": "eramirez@company.com"
},
{
"name": "Liam Hart",
"email": "lhart@company.com"
}
]
}We want to list them in a formatted email message. In a connected Send Email action's body, we can configure the for tag like so:
Meeting Attendees:
%for attendee in get_users.attendees%
- attendee.name (attendee.email)
%endfor%Meeting Attendees: Text that is always included in the result, as it's not within the for-tag pill boundaries.attendee: Represents each individual item (iteration) in the attendees array as the for tag processes it.You declare this variable, so name it something that will help you and others better understand the overall formula.get_users.attendees: The upstream reference path to the attendees array.attendee.name: The reference path to the name value of the attendee item.attendee.email: The reference path to the email value of the attendee item.
This will dynamically set the list according to the number of each attendee within the target array, resulting in the following message:
Meeting Attendees:
- Sarah Chen (schen@company.com)
- Emily Ramirez (eramirez@company.com)
- Liam Hart (lhart@company.com)🪄Tip
🖐️ Try this: Configure an if-else tag formula
When to use looping vs. tags
Both looping and tags can process arrays, but they serve different purposes:
Use Event Transform or group looping when:
You need to perform actions on each item (API calls, enrichments, transformations).
You want to process items in parallel for better performance.
You need the results as a structured array for downstream actions.
Use for tags when:
You're building formatted text (emails, messages, reports).
You want to display array data inline without additional actions.
You're creating dynamic content that doesn't require external API calls.