If you’ve never built a workflow before, today might be the first time! And we’ll start with the easiest template (in my eyes), that can definitely add the most value in any company, for ALL users. Let’s take a look at how the “Save #Office365 Email Attachments to #OneDrive for Business” template in #PowerAutomate can save you time, every single day. #PowerPlatform. This blog is a very detailed step by step for those who are new to building workflows.
Disclaimer: The purpose of this #PowerPlatform 1 month blog series is not to create experts, but create curious, self-learning #HumansofIT, not afraid to try, fail and learn. Focus is to enable #CitizenDevelopers (non developers) to add extra to ordinary and become EXTRAORDINARY. All humans have the ability to be great, it’s fear of failing and the unknown that keeps us back. If that’s the only thing I can achieve, to break down your fear of technical concepts, then my work here is done 🙂
Building your first workflow
The first workflow “How To” I won’t do with a video. Contrary to popular belief, not everyone is comfortable watching a video the first time they’re trying something technical. This might be easier for you to follow if it’s all new to you.
I’ve detailed every single step to make it easier for you and make you more comfortable with a concept you might not have worked with before. The biggest mistake we make is to assume that people know or will understand.
This might seem like an overkill for a very simple workflow, but if you do this right from the start, you’ll build better solutions in the future. Don’t wait until you start building very complex solutions before you start doing the right things. This could be your first step to becoming a #CitizenDeveloper and I want you to be amazing at it!! 🙂
If there’s one template you want to teach everyone in your company to use it’s this one. You are more than welcome to copy this content and use as is for end user training.
How To:
More about the template
The below template will save copies of attachments in your Office 365 Email (Outlook) to OneDrive for Business. It does not delete the attachment or the email, it will be similar to right-clicking on an attachment and saving it to a location.
The template is designed to save ALL attachments to a default folder in OneDrive. Surely you want to save specific attachments to a specific folder? Make sure you first create a folder in OneDrive for Business where it will save these attachments to. In my example I’ll save all attachments sent from my bank to a Standard Bank Statements Folder.
Document your solution
Before you start building, draw the picture first. This always helps me to visualize what should happen and it always helps with troubleshooting, even if you only build it only for yourself. You don’t have to be a EPC Diagram Specialist or use Visio (EPC diagram, short for event-driven process chain diagram, is a flowchart based diagram that can be used for resource planning and identifying possible improvements of a business process.). I use #PowerPoint and here’s a blog post of mine that could help you a bit with this. Also keep in mind that if you document your solutions it’s easier to replicate and help others to build it as well. #LearningThroughSharing
Sign in
Sign into https://flow.microsoft.com/ or got to https://Office.com and log in with your Office 365 credentials (email / password), then navigate to the Power Automate App. If you don’t see the Power Automate App, click on the “All Apps” link to expand the list. If you still don’t see it, log a call with IT to check whether the Power Automate App has been added to your account. This is done in the Admin Center > Users > Active Users – select user > Manage Product Licenses.
Choose template
Go to templates and search for “attachment OneDrive for Business”, choose the template shown below. Remember that if you have an Office 365 account you no longer choose the “Outlook” templates. Also be careful when choosing OneDrive or OneDrive for Business as there is a big difference. OneDrive for Business is the one you can see in Office.com with your other apps (small business / enterprise account). The normal OneDrive is consumer and works on your personal Outlook and Windows 10 account.
You’ll see that it authenticates the connectors needed to build the workflow. In this example it will be using Office 365 Outlook (email) and OneDrive for Business.
Create the Workflow
Click on the Create Flow button below your user accounts:
Now you need to be careful, once you’ve clicked that button, the workflow is created and running. This means it will start saving ALL your email attachments to a default folder in your OneDrive. That’s not what you want, right?!
Edit the Workflow
- The first thing you must do (immediately) is “Turn Off” the workflow. I do this with all workflows I create to allow me to first check the steps and make any changes necessary.
- Now “Edit” the Workflow
Standard Trigger and Action
The workflow has a Trigger which checks your email and an Action which will save the file to OneDrive.
First I want you to click on the name of the workflow and give it a unique name based on what you want to achieve. This also helps with troubleshooting in future. I will name mine “Save Standard Bank Attachments to OneDrive”.
On New Email Trigger
Then click on the “On new email” Trigger to expand. Take a look at the fields available. I do not setup filters here and would rather add a condition later in the workflow. I also won’t use the “From” as the mail might come from different addresses and this is an “equal” statement – must be exact (hope that makes sense). For now, leave everything as is.
Apply to each Attachment on the email – change folder
Now expand the Action part of your workflow. Change the folder Path to point to the folder you created for the attachments. Just click the arrow on the right until you reach the folder, then select the name of the folder. If you forgot to do this, you’ll have to save your changes, go create the folder in OneDrive, then come back and edit the workflow again.
Setup a condition to check the sender (From) in the email
Now that you’ve changed the folder it saves to we have to add a very important step. We don’t want all attachment to save to this folder, only attachments from specific email addresses right?
Between the “On new email” and “Apply to each attachment” steps I want you to add a condition (if you click on the headers they will collapse again). Click on the “+” and choose “Add an Action”:
Search for “Condition: then choose the “Condition” action:
- In the first “Choose a value” field, click and find the “From” dynamic content which comes from your email.
- Choose From
- Then change the second field “Is equal to” to “Contains”
- Click in the “Choose a value” field and type the exact text it must match
- Click on the ellipses (…) next to the Action and rename this to “Check for “xxx” Emails”
Note: The reason why I use “contains” is that my statements etc come from different Standard bank email addresses, so I only match the “Standard” part.
Move “Save Attachments” into Condition
Now select the “Apply to each Attachment” section and drag it into the “yes” part of the condition. You’ll see in this image that I’ve renamed that action as well.
Save your Workflow
And Voila!!!! Once you click “Save” you’ve created your first workflow. Whooooooop!!!!
Navigate to “My Flows” on the left to see your workflow. Remember to Switch it On again:
With great power, comes great responsibility!
Now before you run away with your newfound superpower, take note that it’s important to be a responsible citizen developer. Below you’ll find a series I wrote to help citizen developers with the basics they might not have been exposed to:
- Part 1: Business Analysis – Ask the right questions
- Part 2: Business Analysis – Document your Solutions
- Part 3: Project Management
- Part 4: Process Flowcharts for #Microsoft365 Citizen Developers
- Part 5: Creativity & Curation
- Part 6: Communication & Training
- Part 7: Change Management
If you want to document and share your solutions in a creative way, here’s the template I used to create the below Infographic. We’ll cover this solution in another blog post.
Other blogs in this #PowerPlatform series:
- Getting Started with the Microsoft Power Platform
- Microsoft Power Platform: What is Power BI?
- Microsoft Power Platform: Using Power BI on different platforms / devices
- Microsoft Power Platform: Introduction to Power Automate (Flow)
- Power Platform: What are the connectors & triggers in Power Automate?
- Power Platform: How to use Templates in Power Automate
Community = #LearningThroughSharing
Power Automate Specific
Twitter handles to follow:
- Microsoft Power Virtual Agents @MSPowerVirtual
- Microsoft Power Apps @MSPowerApps
- Microsoft Power Automate @MSPowerAutomate
- Microsoft Power BI @MSPowerBI
- Dynamics 365 @MSFTDynamics365
- Microsoft Azure @Azure
- Office 365 @Office365
- Microsoft @Microsoft
- Tech Community @MSTCommunity
Power Platform Blogs & sites:
See you tomorrow… 🙂
Moving to the Cloud or stuck somewhere without adoption? Contact me for a FREE 60 minute, Microsoft 365 Immersion Experience.
Disclaimer: I create content about Office / Microsoft 365. Content is accurate at time of publication, however updates and new additions happen daily which could change the accuracy or relevance. Please keep this in mind when using my blogs as guidelines. And yes, I change my mind all the time as well, because “The only thing that is constant, is change”.
My life mission is to “Facilitate the evolution of human capabilities”: Reach out on: Website > LinkedIn > SlideShare > Twitter > Medium > YouTube > MVP Profile > Contact Me
Leave a Reply