Write prompts for automatic mode

Be specific and clear in instructions 

The guidance you write for automatic mode follows the same clarity principles you learned in the first module, but with a specific focus: you're instructing the AI to write code, not just process information.

This means your guidance needs to be precise about data manipulation. Instead of "get the important fields," try "extract the id, name, and status fields from each object." Instead of "clean up the data," try "remove any objects where the status field is null or empty."

💡Note

Provide context and data structure 

While the AI can see your sample input data, providing context in your guidance helps it understand relationships and intent, especially for complex structures.

​​This is where the "explain your data and terminology" principle from our first module becomes crucial:

  • If you're working with nested objects, describe the relationship: "From the nested alerts array inside each incident object, extract the severity and timestamp." This helps the AI understand not just what data exists, but how it's organized and related.

  • For arrays, clarify your intent. The phrase "For each user in the users array" indicates that you want to iterate over and process items individually. "Count the total number of users" signals aggregation. This distinction helps the AI choose the right code patterns.

  • If your data uses domain-specific terminology, define it in your guidance. For example: "Extract all incidents where priority is 'P0' (which means critical system outage in our system)."

Describe desired output format 

Remember the "define your output format" principle from the Introduction to AI in Tines module? It's even more important in automatic mode because the output structure affects how downstream actions in your story can use the data.

Be explicit about what you want the output to look like. Should it be an array, an object, a single value, or a string? The AI will generate different code depending on your answer.

If you need specific field names in your output, include them in your guidance: "Return an object with fields total_count and high_priority_count." If you need a formatted string, describe the format: "Return a comma-separated list of usernames."

Was this lesson helpful?

Built by you,
powered by Tines

Already have an account? Log in.