cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Attaching a file to an email

@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

17 REPLIES 17
Highlighted
Super User III
Super User III

Re: Attaching a file to an email

@estemo ,

Where is this PDF located?

Highlighted
Frequent Visitor

Re: Attaching a file to an email

Is in the shared drive.

Highlighted
Super User III
Super User III

Re: Attaching a file to an email

@estemo ,'

Is that a local server or OneDrive?

If local, you cannot do anything with it. If OneDrive, do you have the Share URL stored somewhere?

Highlighted
Solution Sage
Solution Sage

Re: Attaching a file to an email

Hi @estemo ,

 

There is a great clip posted on Youtube.com by Shane Young almost an year ago. I think this is what you need. It worked for me very well. Just give it a try. 

 

https://www.youtube.com/watch?v=3QaiM8SeWfM 

Highlighted
Super User III
Super User III

Re: Attaching a file to an email

@gabibalaban ,

I think that will confuse the issue as the video is about uploading a file, not attaching it to an email as @estemo has asked.

I did a blog on a similar subject this, but specific to images recently.

@estemo if you read the bit in the blog about attaching to a list, the Flow process is a bit similar when attaching to an email, but the file will already be created and you will know the location.

Before we do any of that, can you please confirm where you file is as per my post.

 

Highlighted
Frequent Visitor

Re: Attaching a file to an email

Sorry,

 

I think I missed to point out some additional information that I think you will need to understand better.

 

Additionally to what I stated before, I have the Power Apps app (for smartphones) installed, so the purpose of this app is that we can send the notifications to this persons without the need of using the PC or if we are outside the office, so we only need to open the app, attach the file, send the email to notify, then we are finished, takes about 20-30 seconds on the phone.

 

The files are located on a shared onedrive.

 

When using the app and trying to attach a file it opens a window so I can choose the location of the file, on the phone it lets me choose anything on the device, on my google drive or in the onedrive, so it can be anywhere, but for this app all the files will be located on the onedrive since is the place that everyone is uploading the files to notify.

 

Screenshot_2020-09-06-09-42-12.png

 

Screenshot_2020-09-06-09-42-33.png

 

Highlighted
Super User III
Super User III

Re: Attaching a file to an email

@estemo ,

You need to specify the location of the file in the Flow - this can be "Ask in Power Apps", but I don't think you can get that dynamically from OneDrive (by a user choosing it). Do you have access to SharePoint Libraries?

Highlighted
Frequent Visitor

Re: Attaching a file to an email

If I check the details for the file this is the location that is giving me: https://crmisalud.sharepoint.com/sites/equipoarscoronado/Shared%20Documents/EMERGENCIA%20COVID%2019/...

 

My coworkers are making some interviews and filling up a form, that information is getting stored on a excel file (this is done with another flow that runs when it gets a new response) and then creating a pdf file, this pdf file is the 1 that they need to notify once that is ready.

 

So, all the files are going to be stored there to be notified to each person. To get the name for that file with a “concatenate” it would be really hard since my coworker making the file is putting some kind of code, so is hard to guess.

 

Good thing for you (I think), I know how to send the information to a library instead of the excel file, I suppose that you will need me to make a column where I can write the address for the file that will be delivered (just guessing).

Highlighted
Super User III
Super User III

Re: Attaching a file to an email

@estemo ,

Yes - with a SharePoint URL, you can store that somewhere and send it to a Flow. You can use Get file content using path, then add the content of this as the email attachment.

 

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.

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,929)