Skip to main content

Text Mode vs Formula Mode: Handling Complex Data in Tines

Yanni Hajioannou avatar
Written by Yanni Hajioannou
Updated yesterday

Overview

When building workflows in Tines that pass complex data structures between actions, you might encounter errors when APIs expect specific data types but receive incorrect formats instead. This commonly occurs when working with structured data like arrays or JSON objects that need to maintain their format when passed between actions. You, as a Tines user building workflows with structured data, need to understand the difference between text mode and formula mode when referencing data. This behavior occurs specifically when referencing output from one action in another, particularly when working with data types that need to preserve their structure rather than being treated as strings.

Cause and solution

Cause One

The default "Text" mode in Tines treats all referenced values as strings, even if they're actually arrays or objects. When you reference the output of an action that returns a complex data structure using the default text mode, Tines adds quotes around the entire structure, converting it to a string. The receiving action or API then tries to process this as the original data type but finds a string instead, causing errors.

๐ŸŸข Solution: Change the data type from "Text" to "Formula" in the action configuration panel. In the properties panel on the right side of your action, locate the field where you're referencing the data, click on the data type indicator (which shows "Text" by default), and select "Formula" instead. This preserves the original data structure rather than converting it to a string, ensuring that arrays remain arrays and objects remain objects when passed between actions.

Cause Two

The data structure you're trying to pass might not match what the receiving action or API expects. Even with formula mode enabled, if the underlying data structure doesn't match the expected format, you'll still encounter errors.

๐ŸŸข Solution: Verify that the data you're passing matches the structure expected by the receiving action or API. You can check this by adding a debug action or examining the event logs to see the actual structure of your data. If needed, use Tines formulas or script actions to transform the data into the correct format before passing it to the next action.

Troubleshooting checklist

โœ… Check the data type setting for fields that contain complex data - switch from "Text" to "Formula" mode.

โœ… Verify the structure of your data matches what the receiving action or API expects by examining it in the event logs

โœ… Use the TYPE() function in a formula to check what type of data you're working with (e.g., TYPE(action_name.output))

โœ… For script actions, ensure you're returning data in the correct format (arrays as arrays, objects as objects)

โœ… Test with simple examples first to understand how different data types are handled

โœ… Remember that formula mode preserves data structure, while text mode converts everything to strings

Need further assistance?

When contacting Tines Support about data type issues, please provide:

โ„น๏ธ Additional context:

1. The exact error message you're receiving (if any)

2. A screenshot of your action configuration showing the field where you're referencing the data

3. The output of the action providing the data (with any sensitive information redacted)

4. The expected structure of the data according to the receiving action or API

5. Any troubleshooting steps you've already tried, especially whether switching to formula mode resolved the issue

Did this answer your question?