cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Attaching a file to an email

Hi!

 

I have an excel file, in that file I have some information like name, email and some other information.

Then in an app I have an “attachments” box where I will choose the specific file (a pdf always) that I need to send to this person.

 

On a flow there is a “Send an email from a shared mailbox (V2)”, it will get the information from the app and place in the proper places in the body’s email.

 

Everything is working fine, sending the email with the right information until I try to use the attachment, I don’t know how to make the app to attach that file and send the email.

 

app.PNG

 

app2.PNG

 

app3.PNG

 

17 REPLIES 17

Hi @estemo ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Thanks for the attention that you have been paying, this week I had a lot of work, but tonight I will sit and try what you have suggested. I will keep you updated.

Hi!,

 

@gabibalaban,

 

That video helped me to upload the file (any type of file) to my onedrive or to sharepoint.

 

@WarrenBelz,

 

I don’t understand, I am really confused now, after getting a way to upload a file I followed this instructions to attach it to an email https://www.c-sharpcorner.com/blogs/ms-flow-send-attachment-in-outlook-email, after the “create a file” and “Respond to a PowerApp or flow” (used in the video), I put the “get file metadata”, “get file content” then “send an email from a shared mailbox”.

 

Is uploading the file properly (any file) and I am able to open it (onedrive or sharepoint), but when the flow is attaching it to the email is only 3-4 bytes, and says that is corrupt, so I tried removing the “get file metadata”, “get file content” and getting all the necessary information from “create a file” to attach it on the “send an email from a shared mailbox”, but it is still damaging the file.

 

@estemo ,

I cannot see your Flow, so cannot comment on what you may be doing wrong - the example in my post simply getting the file content from a location path that you send it.

If you are using another solution, I can look at it, but may not be familiar with the process.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

1.PNG

2.PNG

3.PNG

On this last step I even tried with the "base64tobinary", but is still not working, is getting the right name but is only uploading 3-4 bytes.

   

@estemo ,

You did not follow the process (the same as the Attachment) as below. 

base64Convert.png

I have never been able to get Outlook to directly accept the converted code - I create a file in OneDrive and then get its content to attach. As long as you have valid Base64 text (stripping out all the text before the comma, not just removing the first and last quotes), this will certainly work.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

 

Hi @estemo ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz, thanks for your follow up!, I got it working with the link provided by @gabibalaban.

 

For some reason that I don’t understand the created file was getting only 3-4 bytes, I separated the flow, so the first flow was creating the file and it was totally fine, then I noticed that for some reason the flow that was attaching the file to the email was the 1 damaging the file.

 

Now that the file was created, I tried attaching it to the email with the second flow, by surprise now the file is totally fine.

 

1.PNG

After all the $/*+#(“/%!) to the flow 🤣, I combined the 2 flows into 1, where I need to write the attachmentscontent (in the app into the button's formula) in the second flow I wrote there the information from the first flow that creates the file. And for my biggest surprise it is working!.

 
 

attachments contentattachments content

 

Hope that I was able to explain what I did.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,151)