September 26, 2025

SamTech 365 – Samir Daoudi Technical Blog

PowerPlatform, Power Apps, Power Automate, PVA, SharePoint, C#, .Net, SQL, Azure News, Tips ….etc

A Practical Power Automate Tutorial for Beginners

Go from basic to confident with our Power Automate tutorial. Learn to build real-world workflows that save time and eliminate repetitive tasks. Start here.

This simple Power Automate tutorial is designed to get you started automating all those repetitive tasks that eat up your day, freeing you to focus on work that actually matters. It’s a powerful tool that connects your go-to apps and services, letting you build workflows that just run on their own in the background.

Think of it as your own personal digital assistant, but one you build yourself.

Why Power Automate Is Your New Productivity Superpower

Let’s be real—we all have those mind-numbing tasks we wish would just do themselves. That daily report you have to compile, the endless saving of email attachments, or pinging the team every time a new file is uploaded. These small jobs might seem insignificant, but they pile up, slowly chipping away at your focus and creative energy.

Image

This is exactly the problem Power Automate was built to solve. It’s not some overly complex tech tool for developers; it’s a practical way to reclaim your time by automating tedious processes across the apps you already live in every day. According to a Forrester Total Economic Impact study, users reported a 15% reduction in time spent on repetitive tasks by leveraging Power Automate.

The Core Ideas of Automation

At its heart, Power Automate works on a simple but incredibly effective "if this happens, then do that" principle. Every automation, which we call a "flow," is built from three basic parts that work together.

  • Triggers: This is the starting pistol for your workflow. A trigger is the specific event that kicks everything off. It could be something like receiving an email from your boss, a new item getting added to a SharePoint list, or even just a specific time of day.
  • Actions: These are the jobs you want to get done once the trigger fires. An action could be creating a file in OneDrive, sending a message in Microsoft Teams, or adding a new row to an Excel spreadsheet. You can string multiple actions together to handle surprisingly complex tasks.
  • Connectors: Connectors are the bridges that let Power Automate talk to hundreds of different apps and services. Think of them as pre-built interpreters that link everything from Outlook and SharePoint to external tools like Twitter and Dropbox, allowing them to work together seamlessly.

The real magic happens when you combine these elements. A trigger in one app can kick off a series of actions in completely different ones, creating a hands-off process that just works.

Why Businesses Are Investing in Automation

The huge interest in tools like Power Automate isn't just a passing trend; it's a fundamental shift in how businesses operate. Organizations everywhere are finally recognizing the massive value in automating manual work, and the adoption of these tools is taking off.

Power Automate is a key piece of the bigger Microsoft Power Platform—a suite of tools for low-code app development, automation, and business intelligence. If you're curious how all these pieces fit together, check out our guide on http://samtech365.com/what-is-microsoft-power-platform/.

The platform's growth has been staggering as businesses rush to make their operations more efficient. The entire Power Platform recently reported over 48 million monthly active users, a jump of 45% in just one year. To back this up, Microsoft has expanded its ecosystem to over 1,400 certified connectors, making it easier than ever to integrate Power Automate with pretty much any service you can think of.

Learning to build these automations doesn't just make you more efficient—it makes you far more valuable in any role. You're no longer just doing the work; you're designing smarter, better ways to get it done. This is your first step toward making technology truly work for you.

Getting Ready to Build Your First Flow

Before jumping into the Power Automate designer, a bit of prep work will save you a lot of headaches later. Think of this as laying the groundwork. We'll make sure you have the right access, a clear goal, and a basic familiarity with where everything lives. Taking a few minutes to get organized now makes the actual building process much smoother.

First things first, let's talk about access. If your organization uses Microsoft 365, there's a good chance you already have Power Automate included in your subscription. Most of the commercial Microsoft 365 and Office 365 plans come with it baked in. If you're unsure, the official Microsoft Power Automate licensing guide is the best place to check your specific plan.

Once you know you're good to go, you can head over to the Power Automate portal. This is your command center for everything you'll build, manage, and monitor.

Defining a Clear Automation Goal

One of the biggest mistakes I see people make is trying to build a massive, complex workflow on their first try. It’s a recipe for frustration.

For this guide, we're going to tackle a simple but incredibly useful task: automatically saving email attachments from a specific sender directly into a designated OneDrive folder.

This is a perfect real-world scenario. It solves an annoying, repetitive problem—no more manually downloading and filing those weekly reports or monthly invoices that clog up your inbox.

The most important step in any automation project is defining a clear, achievable goal. It turns a vague idea into an actual plan and gives you a roadmap to follow, making the build itself a thousand times easier.

By thinking through the logic upfront, we already know what we need. We'll need a trigger that fires when a new email arrives and an action that saves any attachments to OneDrive. We also know we need to add a filter so this flow only runs for emails from a specific person, not every single message you receive. This little bit of planning is what sets you up for success.

Finding Your Way Around the Power Automate Portal

Everything starts at the Power Automate homepage. This is where you'll create new flows, check on existing ones, and find inspiration.

The main navigation is on the left-hand side, giving you quick access to templates, your flows, and monitoring tools. It’s pretty intuitive once you click around a bit.

Image

The main dashboard gives you a nice overview and often highlights popular templates. I highly recommend browsing through these; they're a goldmine of ideas for what’s possible. Getting comfortable with this layout is the first real step in your automation journey.

Alright, our prep work is done. We have a clear goal and we know our way around the portal. Now for the fun part: bringing our automation to life in the flow designer.

Building a Real-World Email Automation Flow

Alright, let's move from theory to practice. This is where we get hands-on and build your first automated workflow in Power Automate. We're going to create something genuinely useful: a flow that automatically saves email attachments to a specific folder in OneDrive. Think about how many times you've had to manually save an invoice or a report—this simple flow will take care of that for you.

We'll start with a blank canvas and walk through picking the right trigger, setting up the action, and using a little bit of magic called "dynamic content" to connect the dots. By the end, you'll not only have a working automation but also the confidence to build more.

Key Building Blocks in Our Power Automate Flow

Before we jump in, it helps to understand the fundamental parts we'll be using. Think of them as the LEGO bricks for our automation.

Component Its Role in Our Flow Practical Example
Connector A bridge to other services. We'll use the Office 365 Outlook and OneDrive for Business connectors. It's how Power Automate talks to your inbox and your cloud storage.
Trigger The starting event. It's the "if this happens…" part of the equation. "When a new email arrives in my inbox."
Action The resulting task. This is the "…then do that" step that follows the trigger. "Create a new file in my 'Invoices' folder on OneDrive."
Dynamic Content Data from a previous step. It makes our flow smart and adaptable. Using the actual name of the email attachment as the file name in OneDrive.

These are the core pieces we'll assemble to create our email attachment workflow. It's a simple but powerful combination.

Selecting and Configuring Your Trigger

Every flow needs a spark, an event that kicks everything off. For us, that event is an incoming email. We'll use a trigger from the Office 365 Outlook connector, which is a common starting point for tons of personal productivity automations.

From the Power Automate portal, head to Create and choose Automated cloud flow. Give your flow a descriptive name—something like "Save Invoices to OneDrive"—and then search for the trigger: When a new email arrives (V3). This is the one you want.

Now, just selecting the trigger isn't enough. If you leave it as is, the flow will run for every single email that hits your inbox. That's a recipe for chaos. The real power comes from fine-tuning the trigger's settings to be more selective.

Click to expand the Advanced options to see some powerful filtering tools:

  • From: Perfect for our invoice scenario. You can specify the exact email address of a supplier.
  • Include Attachments: You'll want to set this to Yes. This is a simple but crucial filter that tells the flow to only even look at emails that have something attached.
  • Subject Filter: This is fantastic for adding another layer of precision. If your vendor always puts "Invoice" in the subject line, you can add that here.

By dialing in these settings, you're telling Power Automate to ignore all the noise and only focus on the emails that actually matter. It’s a critical step for building an automation that’s both efficient and reliable.

Adding the OneDrive 'Create file' Action

Okay, our trigger is ready and waiting for the right email. Now what? We need to tell the flow what to do when that email arrives. This is where actions come into play. We need an action that can grab the attachment and save it to OneDrive.

Click the + New step button right below your trigger. A search box will pop up. Just type "OneDrive" and select the OneDrive for Business connector. From the list of actions that appears, find and choose Create file.

This action needs three key pieces of information:

  1. Folder Path: Where in OneDrive should the file go? You can click the little folder icon to browse and pick the exact spot. For our example, we'll use a folder I created called /Invoices/.
  2. File Name: What should we name the saved file?
  3. File Content: This needs the actual data—the bits and bytes—of the attachment itself.

Here's a common trap: if you just type "invoice.pdf" into the File Name field, every single attachment will be saved with that exact same name, overwriting the last one. That's not very helpful. This is where dynamic content becomes your superpower.

Dynamic content is the bridge between your trigger and your actions. It’s a list of data points from previous steps—like the email's subject, sender, or the attachment's name—that you can plug into subsequent actions to make your flow intelligent and adaptable.

Using Dynamic Content to Connect the Steps

When you click inside the File Name or File Content fields, a panel will slide out from the side labeled Dynamic content. This is your toolkit. It contains all the data outputs from the trigger—all the information about the email that just arrived.

To set this up correctly, scroll through the dynamic content list and find Attachments Name. Select that for the File Name field. Next, for the File Content field, select Attachments Content.

As soon as you add these, Power Automate does something clever. It knows that a single email might have more than one attachment. So, it will automatically wrap your Create file action inside a loop called Apply to each. Don't be alarmed; this is exactly what you want. It just means that if an email comes in with three attachments, the flow will run the "Create file" action three times—once for each file. Nothing gets missed.

Image

That’s it! Your simple, two-step flow is now fully configured. The trigger watches for specific emails, and the action uses dynamic content to save the attachments with their original names into your chosen OneDrive folder.

This is a foundational concept. Once you master this, you can tackle more advanced scenarios, like learning how to automate sending emails from a shared mailbox in Outlook. It's these kinds of simple but time-consuming processes that really add up. In fact, a Forrester study commissioned by Microsoft found that companies could achieve up to a 177% ROI over three years by adopting Power Automate, and it all starts with small, effective flows just like this one.

Right, you’ve built your flow. Now for the real test—literally.

Building the workflow is just the first half of the equation. The real skill comes in testing and refining it. Let's be honest, flows rarely work perfectly on the first go, and that's completely okay. The process of testing, figuring out what broke, and tweaking it is what transforms a fragile automation into a rock-solid workhorse. Let's dive into how you can test and debug your new creation.

The first rule of automation club? Never assume it works until you've seen it with your own eyes. Thankfully, Power Automate has a fantastic built-in test feature that lets you safely run your workflow without waiting for the real-world trigger to fire. This is your personal sandbox.

Using the Built-in Test Feature

Look in the top-right corner of the flow editor, and you’ll see the Test button. Clicking it gives you a couple of options for an automated cloud flow like the one we've built.

  • Manually: This is exactly what it sounds like. You’ll have to perform the trigger action yourself. For our email flow, that means sending an email that meets all your specific conditions (from the right person, has an attachment, etc.) to kick things off.
  • Automatically with a recent trigger: This one is a lifesaver for debugging. If your flow has run before, you can pick a previous run—whether it succeeded or failed—and re-run the entire test using that exact same data. It’s perfect because you can try a fix and immediately test it against the specific data that caused the error in the first place.

For our first run, let’s go with the Manually option. Once you select it and hit Test, Power Automate will sit and wait, showing a message like, "To see it work now, send an email…"

Go ahead and send a test email to yourself that fits the criteria you defined in the trigger.

As soon as that email hits your inbox, you’ll see the Power Automate screen come to life, showing the flow's progress in real-time. If you’ve set everything up correctly, you’ll see satisfying green checkmarks appear on both your trigger and your action steps. Success! Now, pop over to your OneDrive folder—your attachment should be sitting there waiting for you.

How to Read the Run History Like a Pro

Every single time your flow runs—whether from a test or a live trigger—it creates a detailed log in the Run history. Think of this as your mission control for diagnostics. You can get to it from the main details page for your flow.

Each entry shows you the start time, how long it took, and the status (Succeeded or Failed). Clicking on any run opens up a view that looks just like the flow editor, but this time it's filled with the actual data from that specific execution.

According to Microsoft's official documentation, inspecting the inputs and outputs of each step in the run history is the primary method for debugging flows. This is where you see the exact data passed from one action to the next, which is almost always where you'll find the root of a problem.

When you click on a completed step in the history, you can inspect its inputs (the data it received) and its outputs (the data it produced). For our "Create file" action, you could check the inputs to confirm the file name and folder path were exactly what you expected, and then check the outputs to see the details of the file that was successfully created. This level of detail is what makes troubleshooting so effective.

Debugging a Failed Run

So, what happens when you see that dreaded red exclamation mark and a "Failed" status? Don't panic. This is where you really learn.

Click on the failed run to investigate. The flow will expand, and the step that caused the whole thing to fall over will be clearly marked with a red icon.

Let's say your flow failed on the "Create file" step—a classic problem. When you expand that action, you’ll get an error message. Maybe the folder path you typed in doesn't actually exist, or you tried to create a file with an illegal character in its name, like a slash (/), which OneDrive won’t accept. The error details usually point you right to the culprit. By inspecting the inputs for that step, you can see the exact file name and path it was trying to use and confirm if that was the source of the issue.

Mastering these simple troubleshooting steps is what makes you truly effective with this tool. The value of Robotic Process Automation (RPA), which Power Automate is a part of, is massive. The ROI for RPA can range from 30% to 200% in the first year alone, sometimes climbing to a 300% return over the long haul. These stats are why getting good at automation is such a valuable skill for any professional today. You can learn more about these RPA insights and how they impact business operations.

Best Practices for Building Better Flows

Once you’ve built a few flows that work, you’ll quickly realize that just getting it to run isn't enough. The real goal is to build automations that are smart, resilient, and easy for you (and your team) to manage down the road.

Let's move beyond the basics and look at a few habits I've picked up over the years. These practices are what separate a functional flow from a truly professional, enterprise-grade automation.

Create a Naming Convention You Can Actually Read

When you're just starting, a flow named "Email Test" seems perfectly fine. But fast forward six months, and you'll be staring at a list of 50 flows with vague names, trying to remember what each one does. It's a nightmare.

A clear, consistent naming convention is your best friend here.

  • For the Flows Themselves: I like to use a Category - Source > Destination - Description format. For example, a flow named Finance - Outlook > OneDrive - Save Monthly Invoices tells me everything I need to know without even opening it.
  • For Actions Inside the Flow: Don't leave actions with their generic names like "Get items" or "Create file." It makes the logic impossible to follow. Click the three dots on any action, hit "Rename," and give it a specific job title, like "Get Overdue Invoices from SharePoint" or "Create PDF in Supplier Folder." This tiny step makes troubleshooting a hundred times easier.

Build Your Flows to Fail Gracefully with Error Handling

What happens if your flow tries to find a file that someone deleted? By default, the flow just stops dead. It fails, and you probably won't even know it happened until someone complains. That's not a reliable system.

This is where error handling comes in. In Power Automate, you can tell an action to run only if the previous step fails. It’s a game-changer.

You do this by adding a parallel branch and using the Configure run after setting.

  1. Your "Happy Path": This is the main branch of your flow, where everything works as planned (e.g., the Create file action succeeds).
  2. Your "Error Path": You add a second branch next to the main one. On this action (like sending an email notification), you set it to run only if the Create file action has failed.

Building this kind of fault tolerance into your automations is a core best practice for any serious process. It transforms a fragile flow that breaks silently into a robust one that tells you when something goes wrong.

This simple setup means you're the first to know about a problem, letting you fix it before it causes a real issue.

Use Expressions to Shape Your Data

Dynamic content is fantastic, but the data you get from a trigger or another action is rarely in the perfect format. A classic example is dates. You might get a date that looks like 2025-04-08T10:00:00Z, but what you really need to put in an email is a simple, clean 08-04-2025.

This is exactly what expressions are for. You don't need to be a developer to use them.

Inside any action where you'd normally select dynamic content, just click over to the Expression tab. For our date example, you could type in a simple function like this:
formatDateTime(triggerBody()?['receivedDateTime'], 'dd-MM-yyyy')

All this does is take the received time from the email trigger and reformat it into a day-month-year style. Once you get the hang of a few basic expressions, you unlock a whole new level of control over your data.

The same idea applies when you need to handle more complex datasets. For instance, learning to learn more about the Power Automate filter query is incredibly useful for when you only want to process specific items from a list instead of everything.

Your Top Power Automate Questions, Answered

Once you start building your own flows beyond the basic tutorials, you're bound to hit a few questions. That's a good thing—it means you're really digging in. Here are some of the most common questions I get, with some straightforward answers to help you get past those early hurdles.

Power Automate vs. Power Apps: What's the Difference?

This one comes up all the time. The easiest way I've found to explain it is with a smart home analogy.

Think of Power Apps as the custom control panel on your wall. It's the sleek interface you tap to dim the lights, change the music, or adjust the thermostat. It’s what the user sees and interacts with.

Power Automate is all the wiring and logic working silently behind that panel. It's the engine that actually receives the command from your app and tells the lights to dim or the thermostat to change.

A button pressed in a Power App can kick off a complex Power Automate flow that connects to a dozen different services, all completely in the background. They’re separate tools, but they’re designed to be powerful partners. As Microsoft puts it, they are key parts of the Power Platform, one for the user interface and the other for the automation engine.

Can I Use Power Automate for Free?

Yes, you absolutely can, and this is a huge plus. Most Microsoft 365 plans already come with a Power Automate license baked right in.

This means you can start building flows right away using all the standard connectors—think Outlook, SharePoint, OneDrive—without paying a dime extra. It's perfect for automating your personal tasks or streamlining processes within your immediate M365 world.

But what if you need more? That’s where paid plans come in. You'll typically need to upgrade if you want to use premium connectors that link to outside services like Salesforce or Adobe. A paid license also gives you higher run limits and unlocks advanced features like AI Builder.

For the latest pricing and plan details, your best bet is always to check the official Microsoft Power Automate licensing page.

How Do I Handle Errors in a Flow?

The best way to handle errors is to plan for them from the very beginning. You don't want to find out a flow has been failing for days just because a file was missing or a server was down.

Inside your flow, every single action has a setting called "Configure run after". By default, an action will only run if the one before it succeeded. You can change this.

A really solid way to manage potential failures is to build a parallel branch.

  • One branch is your main path—the "happy path" where everything works as expected.
  • The second branch is set to run only if the main action fails, is skipped, or times out.

This second branch is your safety net. In it, you can add an action to send a notification to a Teams channel or fire off an email to yourself. You can even include details from the failed run. This way, you’re alerted the moment something goes wrong and can fix it proactively.


At SamTech 365, we create in-depth guides and real-world tutorials for the entire Microsoft Power Platform. We're here to help you build powerful, reliable solutions. Explore more at https://www.samtech365.com.

Discover more from SamTech 365 - Samir Daoudi Technical Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading