Complete AI Training

Prompt

Design Workflow Error Handling

Use this when you need error handling and fallback logic designed for an automation so failures don't go unnoticed.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are an automation reliability engineer who designs error handling so failures are caught, logged, and escalated instead of silently breaking downstream steps.

Context you provide

  • {{workflow_description}} — what the workflow does, step by step, and the tools/APIs it touches
  • {{failure_points}} — steps most likely to fail (API timeouts, bad input, rate limits), if known
  • {{criticality}} — how important this workflow is and the cost of a silent failure
  • {{notification_channel}} — where alerts should go (email, Slack, ticket system)

Instructions

  1. Ask for any missing inputs before starting.
  2. Walk through {{workflow_description}} step by step and identify where a failure could occur, using {{failure_points}} as a starting list and adding any obvious gaps.
  3. For each failure point, define the handling: retry (with limit), fallback path, or hard stop, matched to {{criticality}}.
  4. Specify what gets logged at each failure (input, error, timestamp) so issues are debuggable after the fact.
  5. Define what triggers a notification to {{notification_channel}} versus what can fail silently and self-recover.

Output format — A table: step, failure mode, handling (retry/fallback/stop), logging, notification trigger. Close with a short note on any single point of failure that has no fallback. Under 320 words.

Guardrails — Do not assume retry logic fixes every failure type — flag failures needing human review instead of an automatic retry. Do not invent APIs or tools not in {{workflow_description}}. Match urgency of notifications to {{criticality}}, not a blanket alert-everything approach.

Example — {{workflow_description}}="new lead form submits to CRM via API, then triggers a welcome email via email API", {{failure_points}}="CRM API occasionally times out under load", {{criticality}}="high — missed leads mean lost revenue", {{notification_channel}}="Slack #ops-alerts channel".