Skip to content

Send the File added to OneDrive in Mail Attachment

Send the File added to OneDrive in Mail Attachment

Hello! In this article, we will be sending the file added to OneDrive in mail attachments. Of course, as you might have guessed, we will be using Power Automate.

Before we start the flow, there are some files we need to create on OneDrive.

OneDrive for Business

Go to OneDrive–> New–>Folder and create a folder named Mail Folder.

Create another folder named Attachments in the Mail Folder. We will add the mail attachments into this folder.

OneDrıve'a Eklenen Dosyayı oluşturma

Now we can move on to Power Automate.

Power Automate

Go My flows –>New–> Automated- from blank and create the process with a blank flow.

Power Automate

You don’t have to choose anything in the window that opens up. You can skip to the flow window directly with the Skip button.

Atla (Skip) butonu

Flow Actions

Our flow will run when the file added to OneDrive is added. So, we start by choosing OneDrive for Business –> When a file is created (properties only).
When a file is created (properties only)
contains details like the name and root of the file that has been added to Drive.

Akış İşlemleri

After adding this item, we will indicate the file into which attachments will be uploaded.

Choose Root–>Mail Folder–> Attachments.

Dosya yolu seçim alanı

In the new step, we add the Get File Content item to use the file added to the folder in a tangible way.

We need to give the unique identifier info to this item to detect the file that has been added to the folder.

Click Add dynamic content and choose List of Files Id.

Dinamik içerik ekle

In the next step, add the Send an Email(V2) item.

In this item:

To: The mail address of the person you’ll send the mail to.

Subject: Mail’s subject (optional)

Body: Mail content (optional)

Open mail sending details with Show advanced options that is located on left bottom corner to add the mails to the flow.

Add File Attachments to the Mail

Choose Attachments name: List of Files Name.

File Content that has been gotten with the Attachments Content: Get File Content object is added to this field.

Maıle Dosya Eklerini Ekleyin

And the flow is complete.

You can name the flow on top left corners and then save it by clicking the save button on top right corner.

Now when you add any file into the Attachments folder, it will be sent as an e-mail with attachment automatically.

You can click here for the other Power Apps articles.