Phase 5 · Power Automate · Level 1 · Foundations
Building your first flow, step by step
By the end, you'll be able to…
- Follow a complete flow being built from an empty canvas to a working test
- Point to the trigger, the action and the connection in a real flow
- Use dynamic content to pass an attachment from the email step into the save step
Why it matters
Reading about flows only gets you so far; the moment it clicks is when you watch one built end to end. This lesson walks through a complete, useful flow one small step at a time, so that when you build it yourself in the next lesson, you've already seen every step. You'll learn to point at the trigger, the action and the join between them in a real flow.
The flow we're going to build
We'll walk through one small, useful flow together, reading it rather than building it yet (that's the next lesson):
When an email with an attachment arrives, save the attachment to a folder in OneDrive.
OneDrive is Microsoft's online file storage: your files kept in the cloud so you can reach them from any device. If your workplace keeps files in SharePoint instead, the same shape works: swap the OneDrive step for the SharePoint one. People really use this flow to keep invoices, receipts or photos tidy without dragging files about by hand. It's also the perfect first flow because it's the simplest complete one there is: a single trigger and a single action, joined by one piece of passed-along information.
Keep the three words from Lesson 1 in view as we go. Everything below is an example of trigger, then action, over a connector or two.
Step 1: Start an automated cloud flow
From the maker portal at make.powerautomate.com, you begin a new flow from the Create area. You choose the kind that runs by itself when an event happens, an automated cloud flow, rather than one you press a button to start. "Automated" is the key word: it fires on the event, not on you.
The very first thing worth doing is giving the flow a clear name, something like "Save email attachments to OneDrive". It seems trivial, but in six months, when you have a dozen flows, a good name is the difference between finding the right one and opening five wrong ones.
Step 2: Choose the trigger
The trigger is the "when this happens" part, and it comes from a connector, here Outlook. In the trigger picker you search for your email app and choose the trigger for a new email arriving. It's usually named something like "When a new email arrives", sometimes with a version suffix such as V3. Whichever version is current, it's the one that runs each time an email lands in your inbox.
The first time this flow touches Outlook, you're asked to sign in, and that signed-in link is the connection. It's Power Automate saying "may I watch this inbox on your behalf?" You sign in once and the connection is remembered for next time.
Step 3: Narrow the trigger so it doesn't fire on everything
Left as-is, that trigger runs on every incoming email, including the hundreds with nothing to save. So before adding the action, you open the trigger's advanced options (sometimes shown as "Show advanced options") and set two things: include the attachments, and only run when the email actually has an attachment. Now the flow ignores plain emails and wakes only when there's a file worth keeping.
This is a small habit with a big payoff: a narrowly-aimed trigger is calmer, cheaper and far less likely to clutter a folder or misbehave. You can get more specific later (only from a particular sender, say) but "has an attachment" is exactly right for a first flow.
Step 4: Add the action that saves the file
Now the "do that" part. Below the trigger, you add a step, search for OneDrive, and choose the action to create a file; this is the step that writes your saved attachment into OneDrive. The action asks three plain things:
- Which folder? The folder to save into, for example "Email attachments".
- What name? The file's name.
- What content? The actual file data.
Here's the one new idea in the whole flow. For the name and content, you don't type anything; you pick dynamic content: little chips, drawn from the trigger step, that stand for "whatever this particular email contained". You choose the chip for the attachment's name for the File name field, and the chip for the attachment's content for the File content field. Those chips are how information flows from step one into step two, the join that turns two separate steps into a working flow. Without them, the action wouldn't know which file to save.
Because an email can carry several attachments, Power Automate automatically wraps the save step in an "apply to each attachment" loop when you pick the attachment chips. You don't have to build that by hand; it appears, and it simply means "do this save for every attachment on the email".
Step 5: Save, then test before trusting it
You save the flow, then run a deliberate test. Testing is not optional politeness; it's the only way to know the flow actually works rather than merely looks right. You choose to test it manually, then send yourself an email with any file attached (a photo does nicely), wait a moment, and check the OneDrive folder. If the file appears, the flow works. If it doesn't, Power Automate shows you which step failed and usually why, which is the start of fixing it, not a reason to despair. First tries fail all the time; that's normal.
The flow described as a Copilot prompt
If you'd rather have Copilot draft this same flow for you to inspect, the plain-English description you'd give it is below. It contains exactly the trigger, connectors and action you've just read about, which is why you can now check its work.
When a new email arrives in Outlook with an attachment, save each attachment to the "Email attachments" folder in my OneDrive, keeping the attachment's original file name.
Why this works: This names the trigger (email with an attachment arrives), both connectors (Outlook, OneDrive), the action (save the file) and the folder: everything Copilot needs to assemble the exact flow above. Because you know the five steps, you can verify what it produces instead of trusting it blind.
When a new email arrives in Outlook from dan.okafor@fernway.example with an attachment, save each attachment to the "Invoices" folder in my OneDrive.
Why this works: Adding a condition to the trigger ('from Dan in Finance') shows how you narrow a flow so it fires only when it should. Same trigger and action, one extra filter: the natural next step once the basic flow works.
For each saved file, use the attachment's own name as the file name and the attachment's content as the file content; take both from the incoming email, don't set a fixed name.
Why this works: This spells out the step-to-step join that beginners miss: the file's name and content come FROM the email, not typed in. Saying so helps Copilot wire the dynamic content correctly and helps you check it did.
Try it now
Common mistakes
- Forgetting the connection. If the flow can't reach Outlook or OneDrive, it's almost always because the sign-in (the connection) wasn't completed. The builder prompts you, so don't skip past it.
- Skipping the "has an attachment" condition. Without it the flow tries to run on every email, which fails noisily or clutters the folder. One small condition saves a lot of mess.
- Typing a fixed file name instead of using dynamic content. Hard-code a name and every attachment overwrites the last one. The name and content must come from the email; that's what the chips are for.
- Trusting it because it looks right. A flow that reads correctly in the builder can still fail on real email. Only a test with a real attachment tells you it works, and until you've run that test, you don't actually know.
Keeping current
The steps here (name, trigger, narrow, action, test) are durable, but Microsoft does move labels and add versions of triggers over time. For Microsoft's own current walkthrough of building a cloud flow, see Create a cloud flow on Microsoft Learn. Accurate as of 13 July 2026.