Menu Close

How to Use Power Automate to Send Emails From Excel (2024)

In today’s tutorial, we’ll delve into the world to use Power Automate to send emails. Imagine this: personalized and friendly messages winging their way to multiple recipients, each with their unique attachments—all smoothly orchestrated straight from Excel. And the cherry on top? No VBA, macros, or external add-ins needed. It’s the perfect recipe for elevating your email game by using Power Automate to send emails!

  • So, any guesses on the star of the show? Drumroll, please… Power Automate it is! Inside my Excel file, I’ve got a nifty table with everyone’s first name, last name, email, and the file name I want to shoot their way. Just names this time, no need for exact file addresses.
use power automate to send email
  • These lucky recipients each deserve their own special PDF document, conveniently tucked away in the same folder as my Excel file.
power automate send email from excel
  • Now, the cool thing is, these PDFs could be hanging out on SharePoint or another folder in your OneDrive. In my case, everything’s neatly stored in my OneDrive. Kim West’s contract has all the details, including her name and address, and the same goes for Lucas.
  • Here’s the scoop: our Power Automate magic is going to whip up individualized email messages for each person, complete with their personalized attachments. All it takes is a few clicks, and we’re good to go! Easy, right?

Create instant cloud flow in Power Automate

  • Alright, buckle up, and let’s set this up together! First things first, head over to the office portal, sign in, and on the left side, scroll down to the magical land of Power Automate.
power automate send email from excel list
  • Now, I’m feeling adventurous, so I’m going to create a flow from scratch. Hit that shiny “Create” button on the left, and here’s where the fun begins. We need to pick the type of flow we want to create.
power automate send email with attachment from excel
  • Since our trigger is an Excel file, and we’re basing it on selected rows, we’re diving into the realm of instant cloud flows. Scroll down a bit, and you’ll spot the golden ticket—selected row. Yep, that’s the one we’re after.
  • But hold your horses! Before you click “Create,” let’s name this masterpiece. Give your flow a snazzy name and hit that “Create” button like a champ.
  • Now for the easy part—select where your Excel file is chilling. Mine’s taking a nap on OneDrive, so that’s where I’m headed.
  • Navigate to the document library on OneDrive, pick your file, and click on that trusty folder icon to locate it. Easy peasy so far, right?
  • Now, let’s talk tables. Click the dropdown, and voila! A list of all the tables in your Excel file pops up. I’m keeping it simple with just one table, so that’s my pick.
  • Last but not least, bring up that Excel file of yours. It’s formatted as an Excel table—fancy lingo alert! Everything looking good so far? Great, now you’re ready to roll.

Setup a loop to get files in a folder

So, we’re at the point where we need to figure out the next steps. Here’s the plan: I want to set up a process where we can go through all the files in a folder, look at their names, and check if they match the specific names I’ve mentioned. When we find a match, the magic happens—I want to grab that file and send it as an attachment. Basically, we’re talking about the power to loop through files in a folder. Sounds like an action, right? And guess what? It’s all related to OneDrive. Cool, huh?

  • Click on “New Step” and search for OneDrive. Yep, that’s the one.
  • Now, check out the cool actions we can take. We’re looking for the one that lists files in a folder—that’s the golden ticket. It’ll give us a bunch of info about the files in the folder.
  • Select the folder where those PDF gems are chilling. Good so far?
  • Time to dive into each file in the folder and see if they match the names in our Excel row.
  • For this, I need control, and that control comes in the form of a loop.
  • I need the output from the previous step, the array. Scroll down under dynamic content, and there’s a value that’ll do the trick. Grab that one.
  • Now, click “Add an action” to bring in another control, a condition this time.
  • This time, it’s a condition.
  • Why a condition? Because I need to cross-check the names from my Excel file.
  • Scroll down in dynamic content, and find the file name that says “File name (formatted).” That’s the one.
  • Now, it’s equal to, which is cool, but there are different options if you ever need them. What’s it equal to? Well, it’s a dynamic content-based array.
  • Make sure you’re checking the same type of file names. I’m going with Display name to keep it identical to the Excel way. That’s the condition.
  • Next up, what happens if that condition is a match? I want to send an email, but before that, click “Add an action” again.
  • This time, I need to grab the file content that made the match. Let’s get the file content, and surprise—it’s OneDrive related too.
  • Stick to the actions we have, and choose “Get file content.”
  • Now, I need the unique identifier of the file. Click Insight under Dynamic Content, and you’ll find the ID—the unique identifier. That’s the one to go with.
  • Ready for the next action? Click “Add an action.”

Prepare a custom email with dynamic content

  • Alright, time to switch gears to Outlook. Select “Office 365 Outlook.”
  • In the realm of actions, pick “Send an email (V2).”
  • Now, let’s specify who’s getting this email. Of course, it’s dynamic content, and it’s right there in my Excel file. Click on “Add dynamic content“.
  • Select “email (Formatted).”
  • For the subject, you could make this dynamic too, but for simplicity, I’m just putting “Your Contract.”
  • Now, for the body, let’s jazz it up a bit. I’ll go with a friendly greeting and add dynamic content for the person’s name from my Excel file. Choose the first name and sprinkle in some text. Here’s where OneDrive comes into play for dynamic content. Let’s go with a name without an extension.
  • Now, we’ve got the content, but what about the attachment? Explore more options by clicking on “Show advanced options” and choosing “Attachment content” It’s not just regular content—it’s the dynamic essence of your files. If you need more attachments, feel free to add them. In my case, one is plenty.
  • You can also play around with the reply-to email, add yourself to the CC list, or include others if needed. You can even update the email address if things change.
  • Everything’s set up. If there’s no match between the file in the folder and the Excel file’s name, no action will be taken.
  • Top it all off by hitting save at the top. Nice work!

Try the Flow for sending emails with PDFs attached

  • it’s testing time! Head over to OneDrive online and open our Excel file. I’ll close the offline version to avoid any clashes—just the online version for now to run the flow. Navigate to the data tab and click on “Flow.”
  • In case you don’t spot the flow, you might need to add it. No worries, just go to the “Insert” tab, pick “Office Add-ins,”.
  • Search for flow, and add it. It’s a quick Microsoft add-in that you’ll find in the data tab.
  • If you’ve already added it (like me), select it, and you’ll see the panel on the right showing any flows connected to the Excel file. Click on “Run.”
  • For first-timers, you’ll need to log in and grant permissions. Click on “Continue.”
  • For a smooth run, make sure to select the right cells or tables. I’m going all-in, so I’m selecting everything.
  • Click on “Run Flow,” and you’ll get the green light—your flow run has kicked off successfully.
  • Monitor it from the flow runs page and click on “Done now.” But before we do that, double-check if one of the lucky recipients got the email that says “Your Contract” in their mailbox.
  • Now, back to Power Automate. Click on “My Flows” on the left to view the status. You’ll see info about your flow, and if all went well, you’ll see that all your flow runs succeeded.
  • Voila! That’s how you effortlessly send customized attachments to different folks straight from your Excel file. Power Automate is like having your own superhero for tasks that used to require external add-ins. Cheers to the power of Power Automate!

Also read: How to Send Emails with Attachment from PowerShell?

And there you have it, the tutorial is a wrap! I’m curious—did you find this guide to use Power Automate to send emails helpful? If it sparked some lightbulb moments, let me know in the comments. Whether you’re a Power Automate pro or a newbie, share some examples to inspire and give us all some fresh ideas.

If you’re not on the Power Automate train yet, can you picture yourself hopping on? Any specific tasks or processes you think it could revolutionize for you? I’m all ears—let’s chat about the potential of making work a breeze with Power Automate!

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *