Adding AI Steps to a Workflow
The AI step is where your automation gets its judgment. It is also where beginners get the most confused, because it behaves differently from every other block. A spreadsheet step does exactly what it is told. An AI step interprets what it is told, which means how you ask matters as much as what you ask.
This lesson covers how AI steps work inside automation platforms, how to write prompts that behave reliably, and how to get output your next steps can actually use.
What You'll Learn
- The two ways platforms offer AI steps: built-in and bring-your-own-key
- How to write an automation prompt, which differs from chatting
- How to get structured output that later steps can map
- How to test an AI step before trusting it
Built-in AI vs your own API key
Automation platforms give you AI in two flavors.
Built-in AI steps. Zapier, Make, and n8n all offer AI blocks that work out of the box, billed through your platform subscription. Zero setup, good for getting started, less control over which model you use.
Bring your own key. You create an account with an AI provider such as OpenAI or Anthropic, generate an API key (a long secret code that identifies your account), and paste it into the platform once. Now your workflows call the model directly and the provider bills you per use, typically fractions of a cent per short task.
Start with built-in steps while learning. Switch to your own key when you want to choose specific models, control costs at volume, or use newer capabilities. One rule from day one: treat API keys like passwords. Paste them only into your platform's credential store, never into prompts, documents, or shared screenshots.
Prompting inside an automation is different
When you chat with ChatGPT, you refine as you go. If the answer is off, you reply "shorter" or "no, I meant the other thing". An automation prompt has no second chance. It runs unattended, on input you have not seen, and the output flows straight into the next step.
That changes how you write. A reliable automation prompt has four parts:
- Role and task. One or two sentences: what the AI is and what it must do. "You classify incoming customer emails for a small software company."
- The input, clearly marked. Insert the mapped field from an earlier step, and label it: "Here is the email body:" followed by the field. Unlabeled input mixed into instructions confuses models.
- Exact output rules. Spell out what is allowed. "Reply with exactly one word: urgent, routine, or spam. No punctuation, no explanation." Vague output rules are the number one cause of broken AI automations.
- Edge case instructions. Tell it what to do when unsure. "If the email is empty or unreadable, reply: routine." Without this, the model improvises, and improvisation breaks workflows.
Here is the full example assembled:
You classify incoming customer emails for a small software company. Here is the email body: [email body field] Reply with exactly one word: urgent, routine, or spam. No punctuation, no explanation. If the email is empty or unreadable, reply: routine.
Boring, strict, explicit. That is what good automation prompts look like.
Getting structured output
Often you need more than one value back, say a category, a summary, and a customer name. Ask for a fixed, labeled format, one item per line:
Reply in exactly this format, one item per line: Category: urgent, routine, or spam Name: the sender's name, or Unknown Summary: one sentence, maximum 20 words
Most platforms can then split or parse these lines into separate fields for mapping. Many AI steps also offer a JSON mode or a structured output option, where you define fields and the platform guarantees the shape. When your tool offers this, use it. It exists precisely to stop the "AI added a friendly sentence and broke my mapping" class of bug.
Two habits that raise reliability further:
- One job per AI step. Classify in one step, summarize in another. Single purpose prompts fail less and are easier to fix than one mega prompt doing five things.
- Keep instructions and data separate. Instructions come from you and never change. Data comes from the trigger and always changes. Never let mapped fields land in the middle of your instructions.
Testing an AI step
Never trust an AI step you have only run on friendly input. Before connecting it to real actions:
- Test with a normal case. Does it behave? Is the format exact?
- Test with a weird case. An empty message, a very long one, one in another language, one that is half spam. This is where prompts crack.
- Test with a trick case. An input that almost fits two categories. Check the tie-breaking matches what you would decide.
- Run it on ten real past examples. Old emails, old form entries. Compare the AI's answers to what you actually did. Eight or more out of ten matching is a strong start for low stakes tasks; below that, tighten the prompt, add examples of correct answers to it, or narrow the task.
Platforms let you run a single step with sample data. Use that constantly while building, and only wire up the real sending, posting, and writing actions once the AI step has earned it.
Key Takeaways
- Use built-in AI steps to learn; move to your own API key for model choice and volume pricing. Guard keys like passwords.
- Automation prompts run unattended: state the role and task, label the input, give exact output rules, and cover edge cases.
- Ask for fixed labeled formats or use your platform's structured output mode so later steps can map fields reliably.
- Give each AI step one job, and keep your instructions separate from the changing input data.
- Test with normal, weird, and trick inputs, then against ten real past examples before connecting real actions.

