cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Creating file one drive from mail attachments

 

Hi Guys

 

  Really newbie on this. I´m trying to biuld a flow from a template that extracts file attachments once an email arrives and save it into a one drive folder. ONly extract pdf files. This flows was working good but suddenly I cannot open pdfs files. This is the error if I try to open it.

 

Vsa137_1-1596445064442.png

And this is the flow

 

Vsa137_2-1596445130231.png

Condition = Attachment content type

Vsa137_3-1596445218268.png

FIle name = Attachment Name

File COntent = Attachment content

 

FLows works good but I cannor open the files in the destination folder. In the other hand I can open the same file in the email.

 

Thanks guys

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

Please use the below step in your flow inside the Attachments loop and pass the content bytes from the Get Attachment step to the Create File step

Mira_Ghaly_0-1596534580905.png

 

Mira_Ghaly_1-1596534620133.png

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

9 REPLIES 9
Mira_Ghaly
Dual Super User
Dual Super User

@Anonymous 

While saving the PDF to one drive try 

base64ToBinary(FileContent)
 
Please check my blog post on the same issue
 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

Thanks for your reply but I cannot access to your link, always sent to mines.

I try to add base64tobinary as an expression in content but the expression is invalid.

 

Thanks a lot

Mira_Ghaly
Dual Super User
Dual Super User

@Anonymous

PLease check the link again

https://onlinemgblog.wordpress.com/2020/06/24/create-sharepoint-file-through-power-automate/

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

Thanks. Link now is working

I already try with your solution but this is the error I see.

Vsa137_0-1596452923557.png

Thanks a lot for your support

@Anonymous

Have you passed the file content as input parameter to the base64tobinary

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Anonymous
Not applicable

HI

 

 I directly copied your formula in expressions into File content. This is what I see

Vsa137_0-1596454470520.png

Sorry, but I am really newbie on this.

 

Thanks

@Anonymous

PPlease pass the attachment content variable to the base64tobinary

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Anonymous 

Please use the below step in your flow inside the Attachments loop and pass the content bytes from the Get Attachment step to the Create File step

Mira_Ghaly_0-1596534580905.png

 

Mira_Ghaly_1-1596534620133.png

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

will this work for excel files?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,720)