Generate and test formulas

Now that you know what auto generate is and where to find it, let's walk through the mechanics of using it. Understanding how to generate and test formulas will help you get the most out of this feature.

Generate your formula 

When you're working with pills, you'll see the option to auto generate formulas within the editor. Simply enter your prompt describing what you want the formula to do, and the AI will process your request.

After you enter your prompt, the AI generates a formula in just a few seconds. The generated formula appears in the field, and you can see exactly what functions and syntax the AI used to accomplish your goal.

Review your formula 

Before you move on, take a moment to review the formula the AI created. 

Look at the structure of the formula and ask yourself:

  • Does it reference the correct upstream action?

  • Does it use functions that seem related to your request (like DATE functions for date formatting or SPLIT for text manipulation)?

  • Is the syntax complete, with all parentheses and quotes properly closed?

Don’t be afraid to refine your prompt if something looks off or the output isn’t quite right.

🪄Tip

Validate formula output 

Validation goes beyond checking that the formula runs without errors. You need to verify that it produces the correct result in the correct format.

Check these aspects:

  • Format: Is the output in the format you need? For example, if you asked for a date in YYYY-MM-DD format, did you get it?

  • Data type: Is the result a string, number, array, or object as expected? This matters for downstream actions that will use this data.

  • Completeness: Does the formula extract or transform all the data you need, or is something missing?

  • Edge cases: What happens with null values, empty arrays, or missing fields? Does the formula handle these appropriately?

🪄Tip

✋ Try this: Use auto generate 

Scenario: You're building a story that processes a batch of customer inquiries. You have an upstream action called "Fetch inquiries" that retrieves multiple form submissions. You need to extract the domain from each customer's email address to generate a report showing which organizations are contacting you most frequently.

Was this lesson helpful?

Built by you,
powered by Tines

Already have an account? Log in.