Copilot prompt to build an Excel Power Query transformation
A Power Query prompt for Excel: the source (files in a folder, a table, a database or an API), the transformation steps in order, the M code where needed, parameters, refresh behavior and how to keep query folding.
Tuned for Copilot · structured role / context / task / output
Open in the builder →Ready-to-use prompt
# Role You are an experienced workflow-automation architect who designs reliable, maintainable automations on the platform in use: a precise trigger, exact connector and action names, explicit conditions, error handling, and a test plan. # Context Build an Excel Power Query that combines all monthly CSV files in a folder, cleans the headers, unpivots the month columns, and loads a summary table. # Task Design the automation described in the context above for the stated platform: the trigger, each action in order with exact connector or action names, the conditions and approvals, error handling and retries, and how to test it before it goes live. # How to approach this Think through the problem step by step before answering. Work the hard parts out explicitly, then give a clear final answer. Let the difficulty of the task set how much reasoning is needed — don't pad the easy steps. - Lay the automation out in order: trigger, each action, the conditions and branches, error handling, then a test plan. Before you finalize, verify that the trigger fires on exactly the intended event and nothing else; every action names the real connector, action, or command for the stated platform; the first failure has a handling path: retry, notify, or stop; the test plan covers the main path and that first failure. # Constraints - Do not invent connector, action, or command names. If unsure one exists, say so and use the closest real alternative. - Use clean, professional formatting that pastes cleanly into Word, Outlook, and Excel. Prefer tables and numbered steps for anything structured. - Deliver one finished, office-ready result rather than a set of options. - Keep the tone professional and workplace-appropriate unless the prompt says otherwise. - For spreadsheet or document tasks, give the exact formula, steps, or text — never a vague description of what to do. - Deliver the result directly — no apologies or meta-commentary about the prompt itself. # Output format Return only the requested output. If multiple distinct variants would clearly help, label them (e.g., "Option A", "Option B"). # Done when - the output fully answers the goal in the Context section with no missing parts
Customize this prompt
Answer a few quick questions and Promptivo re-tunes the prompt above to your exact situation.
Start the interview →Why this prompt works
Power Query is a sequence of applied steps, so the prompt asks for the transformation in order and produces steps a user can follow or M code they can paste.
Combining files from a folder and unpivoting are where most people get stuck. The prompt asks for the shape of the source and the shape of the result.
Refresh matters for automation. The prompt asks how the query is refreshed and notes that scheduled refresh needs Power Automate or an Office Script.
Using this prompt in Copilot
For excel power query, Copilot is a strong choice — it's especially good at Office-ready output you can finish in Word, Outlook, and Excel. Promptivo formats this prompt the way Copilot works best: office-ready output that pastes cleanly into Word, Outlook, and Excel, with tables and numbered steps.
Paste it into Microsoft Copilot or the Microsoft 365 side-panel, then replace any bracketed details with your own. Copilot generalizes when it is under-fed, so keep the bracketed context specific and it will stay grounded in your details.
Tuned for Copilot: how it differs
| Model | What Promptivo changes |
|---|---|
| ChatGPT | Concise instructions, strict format adherence, no preamble. |
| Claude | Explicit step-by-step thinking and clearly delimited output sections. |
| Gemini | Precise phrasing with brief reasoning cues where they improve accuracy. |
| Copilot | Office-ready output that pastes cleanly into Word, Outlook, and Excel, with tables and numbered steps. |
Questions, answered
- What is Power Query in Excel?
- The Get and Transform tool on the Data tab. It imports data from files, folders, databases and web sources, records each transformation as a step, and refreshes on demand.
- Can Power Query refresh on a schedule?
- Not by itself in desktop Excel. Use an Office Script that refreshes all data connections, run from a Power Automate flow on a schedule, or move the data to Power BI.
- Should I write M code or use the ribbon?
- Use the ribbon for standard steps and M code for anything the ribbon cannot express, such as custom functions. The prompt returns both when useful.
- Is Copilot good for excel power query?
- Yes. Copilot handles excel power query well thanks to its Office-ready output you can finish in Word, Outlook, and Excel, and Promptivo tunes the prompt to match — office-ready output that pastes cleanly into Word, Outlook, and Excel, with tables and numbered steps. Paste it into Microsoft Copilot or the Microsoft 365 side-panel.