Official Site

Konstantinos Boutsioulis

Microsoft Most Valuable Professional M365 Apps & Services

Microsoft Most Valuable Professional Business Applications

Consultant & Sr Cloud Solution Architect Modern Wokrplace

Free Material

Find hereMore than 150 Articles about Microsoft Technologies on Modern Workplace

When a new email is arrive get attachments and store them in onedrive Using Power Automate

21 August 2024

In today's article, we will see how when a new email arrives, get attachments and store them in OneDrive using Power Automate.

First, we need an active M365 subscription. We need to log in to the service and then select Power Automate from the available apps. On the Power Automate homepage, we select automated cloud flow.

In the next step, we need to select as trigger action When a new email arrives V3, name the automate, and press create.

In the first trigger action, which is of the type "When a new email arrives V3," we need to specify the sender of the email so that every time they send an email, the attachments will be saved to OneDrive.

Next, there is a foreach loop for each email from the specified sender for all the attachments sent in the email, and an action "Get Attachments" where we need to specify the message ID and the attachment ID.

The next step is to create a file in OneDrive with an action "create file" where we need to specify the folder where the file will be created. In the file name, we enter the name from the properties of the get attachments, and in the file content, we again enter from the properties of the get attachments the Content Bytes.

The next step is to save our automate and perform a manual test by sending an email from the recipient we have set.

The automate executed successfully.

This is the initial email from the recipient.

And as you can see, after execution, it created the file in the folder I specified in OneDrive.

It is an empty file that I used as a test with just one word, "demo."

#ModerWork #M365_Apps_Services #BusinessApps #SharePoint #PowerAutomate #technology #microsoft #digitaltransformation #cloud #mvpbuzz #m365