Beginner8 min

Writing Prompts for Automation Steps

An AI step inside an automation is different from chatting with a model. There is no human to clarify, no second turn, and the output usually feeds another step. So the prompt has to be precise, constrained, and produce output in a shape the next step can use.

Constrain the output

If a later step expects a single word or a number, say so plainly and forbid extra text. A model that adds Sure, here you go will break the step that reads its output.

good vs vague
VAGUE:  Is this email urgent?
GOOD:   Reply with exactly one word, either YES or NO.
        Is this email urgent (a deadline or outage)?
        Email: {{email.body}}

Ask for JSON when you need structure

When a step needs several fields, ask the model to return JSON and tell it the exact keys. Most automation tools can then parse that JSON into separate fields automatically.

structured output
{
  "category": "Billing",
  "sentiment": "negative",
  "summary": "Customer charged twice for one order."
}
Always handle the weird input
Real data is messy: blank fields, other languages, spam. Add a line like If the message is empty or unclear, return Other. A prompt that only works on perfect input will fail in production on day one.

Result: a step whose output is boring and predictable. Boring is exactly what you want from a cog in a machine.

Hands-on tasks