AI Tools Academy
Power Automate 0/18

Phase 5 · Power Automate · Level 1 · Foundations

Build it yourself: your first flow, hands-on

Hands On · 15 minLast checked against the live product: 13 July 2026

30-second recall from earlier lessons
Gemini summarises a long email thread for you in three neat bullet points, and you're about to reply based on it. What's the wise habit?
You ask Gemini to draft a reply confirming a meeting, but you don't tell it the new time. What's likely to happen?

By the end, you'll be able to…

  • Build a working email-attachment-to-OneDrive flow from an empty canvas
  • Test the flow with a real email and confirm the file arrives
  • Use a checklist and run history to prove to yourself the flow works

Why it matters

You watched this flow built in the last lesson; now you build it. This is the step where automation stops being an idea and becomes something you own. By the end you'll have a real, running flow, plus the habit of testing before you trust, which you'll use for every flow you ever make.

Before you start

You'll need a work or school Microsoft account signed in to make.powerautomate.com, and access to Outlook and OneDrive on that same account. Set aside about fifteen minutes. Nothing here sends email to anyone else or changes any shared file; you'll only email yourself and save to your own OneDrive, so it's a safe sandbox.

A quick privacy note from Phase 0: for your test, attach something harmless: a photo, or a throwaway text file. Don't practise with anything confidential. If you'd like a ready-made safe file, use one of the Fernway sample files as your test attachment.

We built this flow together in the previous lesson. Here you do it. The goal:

When an email with an attachment arrives, save the attachment to a OneDrive folder.

Step 1: Create and name the flow

In the maker portal, go to Create and start an automated cloud flow (the kind that runs itself when an event happens). Give it a clear name straight away: "Save email attachments to OneDrive". A specific name is a gift to your future self.

Step 2: Set the trigger

Add the trigger: search for Outlook and choose "When a new email arrives" (there may be a version number after it; any current version is fine). If prompted, sign in to create the connection; Power Automate needs your permission to watch the inbox.

Step 3: Narrow it to emails with attachments

Open the trigger's advanced options (or "Show advanced options"). Turn on the setting to include attachments, and set it to run only when the email has an attachment. This stops the flow firing on every plain email you receive.

Step 4: Add the save action

Below the trigger, add a step. Search OneDrive and choose the Create file action. Fill its three fields:

  • Folder: choose or type a folder such as "Email attachments". Create the folder in OneDrive first if it doesn't exist.
  • File name: click into the field and pick the dynamic content chip for the attachment's name. Do not type a fixed name.
  • File content: pick the dynamic content chip for the attachment's content.

When you pick the attachment chips, Power Automate wraps this step in an "apply to each attachment" loop by itself. That's expected; it just means "save every attachment on the email".

Step 5: Save and test

Click Save. Then click Test, choose to test manually, and start the test. Now send yourself an email with a file attached and wait up to a minute or two.

Watch the test screen: each step should show a green tick. Then open your OneDrive folder and confirm the file is actually there, with its original name. Seeing the file appear on its own is the whole point; that's your flow working.

If a step shows a red cross, open it: Power Automate tells you which step failed and usually why. The most common first-time causes are in the checklist below.

Your checklist

Tick these off; every one should be a yes:

  • The flow has a clear, specific name.
  • The trigger is "When a new email arrives" and you signed in to the connection.
  • Advanced options are set to include attachments and run only when an attachment is present.
  • The action is OneDrive Create file, pointing at a folder that exists.
  • File name uses the attachment's name chip; File content uses the attachment's content chip (neither is typed by hand).
  • You clicked Save.
  • You ran a Test with a real attached file and saw green ticks.
  • The file actually appeared in the OneDrive folder.

If it didn't work

  • Nothing happened. Give it another minute; flows aren't always instant. Then check the trigger's attachment condition is on; a plain test email with no attachment won't trigger it.
  • A red cross on the OneDrive step. Usually the folder name doesn't match a real folder, or the connection needs signing in again. Recheck the folder and the connection.
  • The file saved but is empty or oddly named. You probably typed the name or picked the wrong chip. Make sure File name uses the attachment name chip and File content uses the attachment content chip.
  • Still stuck? Open My flows, click your flow, and look at its run history, the list of every run with a tick or cross. Click the failed run to see exactly where it stopped.

Self-check

Answer these honestly to yourself:

  • Can you point to the trigger, the action and the dynamic-content join in the flow you just built?
  • Do you know where to look (run history) to see whether it ran and whether it succeeded?
  • Could you now change the folder, or add a second attachment to your test, and predict what would happen?

If yes to all three, you haven't just built a flow; you understand it.

Rebuild it with Copilot, then check your manual version against itPower Automate
When a new email arrives in Outlook with an attachment, save each attachment to my OneDrive "Email attachments" folder using the attachment's original name.

Why this works: After building by hand, describing the same flow to Copilot and comparing lets you confirm your manual flow is right, and shows where Copilot's draft differs, which is a fast way to spot a mistake in either.

Extend it: only save PDFsPower Automate
Change the flow so it only saves attachments whose file name ends in ".pdf", and ignores all other attachments.

Why this works: Once the basic flow runs, a plain-English tweak to add a condition (only files ending in .pdf) is the natural way to grow it. Building the tweak yourself and testing it cements the 'small tested steps' habit.

Add a confirmation to yourselfPower Automate
After saving the attachment, send me an Outlook email saying "Saved: " followed by the attachment's file name.

Why this works: Adding a final 'send me an email' or Teams message step is a common, safe extension. Testing it proves you can chain a second action after the first: the shape every longer flow uses.

Try it now

Common mistakes

  • Not creating the folder first. The Create file action needs a folder that already exists. Make the OneDrive folder before you point the flow at it.
  • Typing the file name instead of using dynamic content. A fixed name makes every attachment overwrite the previous one. Always use the attachment name chip.
  • Declaring victory at the green ticks. Green ticks mean the flow ran; only opening OneDrive and seeing the file proves it did the right thing. Check the actual result, not just the run status.
  • Trusting it forever after one test. One successful test proves it can work, not that it always will; connections expire and inboxes change. For the first week or two, glance at the run history now and then rather than assuming silence means success.

Keeping current

Field names and the exact place to click Test shift with portal updates, but build, save, test, verify is durable. Microsoft's Create a cloud flow and Troubleshoot a cloud flow pages on Microsoft Learn track the current screens. Accurate as of 13 July 2026.