# Power Automate: your first three flows, designed by AI

> What a trigger and an action are, three useful automations you can build with a Microsoft 365 licence, and how AI designs them for you — while you just test them with a real example.

## Why you need it

Every company has jobs people do by hand simply because nobody has
automated them: saving an attachment to the right folder, forwarding a form
response to a colleague, asking a manager for approval by email and waiting.

Power Automate does this for you. If your company uses Microsoft 365 business licences,
the core features are usually already included — it's just that nobody uses them.

## Three words you need to know

Every automation (a flow) is made up of three parts:

> **Schema.** Anatomy of a flow: the trigger — when an email with an attachment arrives; the condition — if the sender is a supplier and the attachment is a PDF; the action — save the attachment to the Invoices folder in SharePoint. If the condition isn't met, the flow does nothing.

## The first three flows

**1. Email attachments → a SharePoint folder.** Every supplier invoice or
contract automatically ends up in a shared folder — with the date in its name.
It goes perfectly with the lesson
[Invoices from email straight into a spreadsheet](/en/lessons/invoices-to-spreadsheet).

**2. Microsoft Forms response → a Teams channel.** Someone fills in a form (an order,
a fault report, a registration) — the team sees a message in the Teams channel straight
away, and the responses build up in an Excel spreadsheet.

**3. An approval request.** A holiday or purchase request goes to the manager,
who clicks “Approve” or “Reject” in Teams or in email, and the person who asked gets
the answer straight away. No more “did you see my email?”

## AI designs, you test

If your Power Automate has **Copilot**, you can describe a flow in words —
it will put the trigger and actions together itself. If it doesn't, any AI
chat will do the same, and you click the buttons. Copy and paste this:

```text
You are a Power Automate expert. Help me build a flow that automates
a repetitive task. I work in a Microsoft 365 environment.

WHAT I DO BY HAND NOW
[e.g. from every supplier email with a PDF invoice, I save the invoice to the
SharePoint folder "Invoices" and rename it by date]

PROCESS
1. ASK. Ask me the missing questions, one at a time: what the trigger is, what
   the conditions are, where the result goes, who should be notified if something fails.
2. PLAN. Write out the flow: trigger → conditions → actions. Mark whether all
   the connectors are standard, or whether any of them needs a Premium licence.
3. DO IT WITH ME. Walk me through building it in Power Automate step by step.
   Wait until I write "done".
4. TEST. Tell me how to test it with a real example and what to look at
   in the run history.

GOAL
The job is finished when the flow is built and tested with a real example, every
step in the run history has succeeded, a second owner has been added and error
notifications are switched on.

RULES
- No actions that send company data to external addresses or
  services without my clear approval and IT knowing.
- No automatic emails to clients without a person reviewing them.
- If you don't know the exact name of an action — tell me what to search for.
- Answer in English.

AT THE END
Tell me what was built, and separately — WHAT YOU DID NOT CHECK.
```

<div class="routes">
  <div class="route ai">
    <p class="route-label">🤖 AI route <span class="pill">recommended</span></p>
    <h4>Describe it in words</h4>
    <p>With Copilot in Power Automate, a description is enough, e.g.:</p>
    <p class="say">“When I get an email from @supplier.lt with a PDF attachment, save the
      attachment to the Invoices folder on the Accounting SharePoint site, and add the date
      it was received to the start of the file name.”</p>
    <p><strong>Your job:</strong> check that Copilot understood the folders and conditions
      correctly, and test it with a real email.</p>
  </div>
  <div class="route manual">
    <p class="route-label">✋ Manual route</p>
    <h4>Start from a template</h4>
    <ol>
      <li>Open Power Automate (make.powerautomate.com) with your work account.</li>
      <li><strong>Templates</strong> → type “attachments SharePoint” into the search box
        and pick a template that saves email attachments to a SharePoint library.</li>
      <li>Choose the SharePoint site and folder, and add a condition on the sender.</li>
      <li>Send yourself a test email and check the run history.</li>
    </ol>
  </div>
</div>

## Why flows “die” — and how to prevent it

- **The owner left.** The flow is tied to its creator's account. Add a second owner
  straight away, not once it has already broken.
- **The folder or channel changed.** Someone renamed a folder — the flow has nowhere
  to save to. Use clear, shared folders and names nobody touches.
- **Nobody knows it's broken.** Switch on error notifications and look at the run
  history once a month.
- **The flow triggers itself.** For example, a flow that sends an email, and the email
  triggers the same flow again. Set up the conditions so there's no loop.

<aside class="remedy">
  <p class="remedy-label">💊 The fix</p>
  <h3>One flow — one clear job, two owners and error notifications.</h3>
  <p class="rule-line">An automation that fails without anyone noticing is worse
    than doing the job by hand.</p>
  <ul>
    <li><strong>Start with one flow</strong> and let it run for a week before building the next.</li>
    <li><strong>Test it with a real example</strong> and review the run history.</li>
    <li><strong>Two owners and error notifications</strong> — from day one.</li>
    <li><strong>Data stays in the company.</strong> You set up external sending only with IT's knowledge.</li>
  </ul>
  <p class="caveat">In some companies IT restricts which connectors can be used together.
    If a flow won't save, it isn't a bug — it's a rule. Ask IT.</p>
</aside>

## What to do this week

1. Write down one job you do by hand several times a week.
2. Use the prompt above to build a flow for it, and test it with a real example.
3. Add a second owner and switch on error notifications.

## Check yourself

Five questions on what you've just read. At the end you'll get a certificate
with your score.