Skip to main content
Promptivo logoPromptivo

Guide

How to write a prompt that builds a workflow automation

Promptivo · Updated September 27, 2026

An AI model can design a working automation for Power Automate, Zapier, a script or an agent, but only when the prompt gives it the design problem instead of a wish. This guide lists the seven things the prompt must contain, what changes per platform, and a before-and-after example you can copy.

Why generic prompts produce broken automations

A one-line request such as “automate my invoice emails” forces the model to guess the trigger, the systems, the order of steps and what happens when something fails. It guesses plausibly, which is worse than guessing badly: the design reads well, uses connector names that do not exist, fires on its own updates, and has no failure branch. The fix is not a longer prompt. It is a prompt that answers the questions a competent automation engineer would ask before opening the designer.

The seven things every automation prompt needs

  1. 01

    Name the platform

    Power Automate, Logic Apps, Power Apps, Office Scripts, Excel VBA, PowerShell with Graph, Copilot Studio, Zapier, Make or n8n. The platform decides the vocabulary the answer must use, what is possible, and what it costs. If you are not sure, ask the model to recommend one from the systems and licensing involved before it designs anything.

  2. 02

    State the trigger

    What starts the automation: a new email, a file added, a form submitted, a record created or updated, a schedule, a manual button, or a webhook. Say what must be true for it to fire, so the design includes a trigger condition and the flow does not run on its own updates.

  3. 03

    List the systems involved

    Outlook, Teams, SharePoint, OneDrive, Excel, Forms, Planner, Dataverse, an external API. Each one maps to a specific connector or module, and naming them lets the model use the real action names instead of inventing them.

  4. 04

    Write the steps in order

    Save the attachment to the Invoices library, add a row to the tracker, post a card in the Finance channel. Order matters because each step consumes the output of the last. This is the part most people skip, and the part the model cannot guess.

  5. 05

    Spell out conditions and approvals

    Which records qualify, who approves, what happens on reject, and what happens when nobody responds. Approvals need a timeout and a reminder or they wait forever.

  6. 06

    Decide what happens when a step fails

    Retry then notify, notify and stop, or log and continue. A valid design with no failure branch fails silently. Ask for the error handling as its own step and for a test that exercises the first failure.

  7. 07

    Give volume, schedule and limits

    About forty emails a day, nightly at 2am, a few times a week. Plus any constraints: service account only, no premium connectors, a policy that blocks HTTP. These decide throttling, concurrency, licensing and whether the design is even allowed.

Then ask for a specific output: a step-by-step build guide, a flow outline with exact action names, a script, or a short paragraph written for Copilot in Power Automate. The free generator asks all seven questions for you.

Platform notes

Power Automate

  • Ask for the trigger and every action by the name shown in the designer, with the connector each belongs to.
  • Ask for a trigger condition, a Scope with a run-after failure branch, and expressions in Workflow Definition Language shown in code spans.
  • Ask it to flag premium connectors and anything a DLP policy commonly blocks, and to filter SharePoint lists with OData so reads stay under the 5,000-item threshold.
  • For Copilot in Power Automate, ask for a paragraph under 120 words in the names Copilot recognizes, plus the settings to check after it generates the flow.

Office Scripts and Excel VBA

  • Office Scripts: TypeScript against the ExcelScript API, ranges and arrays rather than cell-by-cell loops, and a hand-off to Power Automate for anything outside the workbook.
  • VBA: Option Explicit, no Select or Activate, On Error handling that restores state, and a note about the .xlsm file and Trust Center settings.

PowerShell with Microsoft Graph

  • Ask for the exact Graph scopes and the admin consent they need, WhatIf support on anything that creates or changes objects, logging with object IDs, and a check for existing accounts so the script is safe to re-run.

Zapier, Make and n8n

  • Ask whether the trigger is instant or polling and what delay to expect.
  • Ask for conditions as Filters and Paths (Zapier), routers and error handlers (Make), or IF and Switch nodes with an error workflow (n8n), and for how tasks or operations are counted against the plan.

Before and after

Weak prompt

Create a Power Automate flow that saves email attachments to SharePoint and lets the team know.

No platform vocabulary, no trigger condition, no library or channel names, no failure handling, no output format. The model will invent all of it.

Strong prompt

Platform: Power Automate. Trigger: When a new email arrives (V3) in the shared Invoices mailbox, only when it has attachments and the subject contains INV.

Systems: Outlook, SharePoint, Teams. Steps in order: save each attachment to the Invoices document library in the Finance site, add a row to the Invoice Tracker list with sender, subject, received date and file link, then post an Adaptive Card to the Finance channel with those fields.

Failure handling: retry the SharePoint actions twice, then post to the Finance channel and stop. Volume: about 40 emails a day. Constraints: no premium connectors, run under the finance-automation service account.

Return a flow outline with exact action names, a trigger condition, a Scope with a run-after failure branch, expressions in code spans, and a test plan that covers one good email and one with a duplicate attachment name.

Same goal. The model now knows the trigger and its condition, the exact library, list and channel, the order of steps, the retry rule, the volume, the licensing limit, the account, and the shape of the answer.

Failures this prevents

  • Invented connector or action names, so the design cannot be built as written.
  • A trigger that fires on the flow's own updates, so the flow loops or runs twice.
  • No failure branch, so the run fails silently and nobody knows.
  • Unfiltered SharePoint reads that hit the 5,000-item list view threshold.
  • Premium connectors or HTTP actions the license or the DLP policy does not allow.
  • Approvals with no timeout, so requests wait forever.
  • No test plan, so the first real failure happens in production.

Build an automation prompt in 30 seconds

The builder asks the seven questions and applies the platform rules for you.

Build an automation prompt →

Or start from a ready-made prompt in the workflow automation collection.

Questions, answered

Can ChatGPT build a Power Automate flow?

It can design one that you then build, and Copilot in Power Automate can generate the flow from a short paragraph. Either way the quality depends on the prompt: name the platform, the trigger, the systems, the steps in order, the conditions and the failure handling, and ask for the designer's exact action names.

What should a workflow automation prompt include?

Seven things: the platform, the trigger, the systems involved, the steps in order, conditions and approvals, what happens on failure, and volume plus any limits such as licensing or policy. Then ask for a specific output: a build guide, a flow outline, a script, or a Copilot paragraph.

Should I ask the AI to think step by step?

Not on a native reasoning model such as GPT-5, Claude or Gemini. Ask instead for the checks that matter: the trigger fires only on the intended event, every action names a real connector, the first failure has a handling path, and the test plan covers it.

Which platform should I automate on?

Power Automate for your own Microsoft 365 work, Logic Apps for IT-owned Azure integration, Office Scripts or VBA inside Excel, PowerShell with Graph for identity and admin tasks, Copilot Studio for agents, and Zapier, Make or n8n across apps outside Microsoft. If you are unsure, ask the model to recommend one first.

More guides: all guides · the 2026 research update.