top of page
  • dkumar

Download Attachment from Gmail to OneDrive



Purpose

Emails are very important part of any business communication. We receive and send important documents via email. Sometimes we face the situation that we are not able to access our documents received over emails or we have got a requirement to automatically download the attachments from unread emails. How will we download those documents on our laptops or computer? Here, Power automate comes into action, it helps to build an automated process of downloading the attachments from your Gmail.

This blog will expound on how we can achieve Power Automate cloud flow to download the attachments from any configured Gmail account into OneDrive whenever a new email with attachments arrives.


How to Setup Power Automate Cloud Flow to Download Attachments from Gmail into OneDrive

  • Sign–In into you Microsoft account

  • On the left pane, click on + Create to start creating your power automate flow.

  • Choose the Automated Cloud flow option.

  • Enter the name of the flow in the Flow Name text box.

  • Choose “When a new email arrives” of Gmail as Trigger and click on Create

  • Once you will click on Create, it will show the trigger on the next screen as shown below

  • Click on the three dots (“. . . “) on the right-hand side to add the Gmail account. Click on the +Add new connection to add the Gmail account

  • Click on the “Show Advanced options” down arrow.

  • Select “Yes” from Has Attachments and Include Attachments drop downs.

  • After that, click on + New Step button to add the action to perform. Remember, it is important to choose the action to perform the task when the trigger will execute.


  • Type OneDrive in the Choose an operation text box to search.

  • Select either OneDrive for Business or OneDrive according to your account type. Here, I have chosen OneDrive.

  • Once you will click on OneDrive, it will show you various actions to perform. Select Create File option from there.

  • Once You click on Create File, it will ask for Sign In. Click on Sign In.

  • It will open the new sign-in window.

  • Either pick an already signed-In account or use another account. I have used here, my already signed-in account.

  • Once it will get Signed In, it will show the options below

  • Click on the folder icon on the right, to choose the folder path of OneDrive to set the download location of the attachment.

  • In File Name textbox, click on Add Dynamic Content and choose “Attachments Name”

  • It will show the below screen, with the option “Select an output from previous steps” with “Attachments” as dynamic content. Click on Create File operation to expand it for more settings.


  • Choose “Attachments Content” as dynamic content and Click on Save.

  • Now the flow is ready to Run and Download attachments. For testing, send an email to the configured Gmail account in the flow to download the attachment into OneDrive as below:



  • Currently, my OneDrive attachment location is empty.

  • As you can see, I have attached one word document in the email and sent it to another Gmail account which is configured in the PA flow.

  • The email has arrived in my configured Gmail account and the attachment has been downloaded into OneDrive Download Location as shown in the below screen.

Conclusion

No matter if we are opening or not our emails, Microsoft Power Automate will help us download the attachments and make them available as soon as the email arrives. We do not require any programming for this, we can just follow the simple steps as explained above to automate this process.


49 views0 comments

Recent Posts

See All
bottom of page