Reply
Highlighted
Level: Powered On
Posts: 5
Registered: ‎12-11-2017
Accepted Solution

Send email with attachment

Good day.

 

Not sure if this has been discussed in the forum previously, I searched but couldn't get much about it.

 

I have been struggling to get the correct file type attachement for the whole day now, and resortet to the community.

 

I have followed several examples on the net without success. The email gets sent to me, but with the wrong file type. I can't open it with any program on my pc!

 

Here is my flow:

Flow.pngThis is the flowEmail Attachement.pngThis is the email I getSo why would this be happening. If you need more detail please let me now.

 

Thanks for any replies.


Accepted Solutions
Community Support Team
Posts: 2,795
Registered: ‎09-21-2017

Re: Send email with attachment

Hi @Grootbaas,

 

Could you please show a bit more about your “Send an email” action?

Do you want to save the data of Excel file as an attachment file of your email?

 

I agree with @efialttes’s thought almost, I have made a test on my side, please take a try with the following workaround:

  • Choose a proper trigger, here I use Flow Button trigger.
  • Add “Get rows” action, specify File name and Table name.
  • Add “Create CSV table” action, From set to output of “Get rows” action, Include headers set to Yes, Columns set to Custom.
  • Add a “Send an email” action, Attachment Name field set to Daily.csv, Attachments Content set to output of “Create CSV table” action.

Image reference:2.JPG

 

3.JPG

The flow works successfully as below:4.JPG

 

5.JPG

 

Best regards,

Kris

View solution in original post


All Replies
Super User
Posts: 276
Registered: ‎09-15-2017

Re: Send email with attachment

[ Edited ]

Hi

Can you share a screenshot with the inputs you chose for "Send an email" action block?

My first impression is that you are including "Create CSV table" action directly in the email body.

If so, you can try to include as an attachment insted.

In this template you'll find an example of how  a CSV table is converted into a file

https://us.flow.microsoft.com/en-us/galleries/public/templates/79095f001ee911e79dc3835964ea3218/copy...

The template stores the file into Drive, but you can add it to "Send an email" action bock as an attachment instead

Hope this helps

Community Support Team
Posts: 2,795
Registered: ‎09-21-2017

Re: Send email with attachment

Hi @Grootbaas,

 

Could you please show a bit more about your “Send an email” action?

Do you want to save the data of Excel file as an attachment file of your email?

 

I agree with @efialttes’s thought almost, I have made a test on my side, please take a try with the following workaround:

  • Choose a proper trigger, here I use Flow Button trigger.
  • Add “Get rows” action, specify File name and Table name.
  • Add “Create CSV table” action, From set to output of “Get rows” action, Include headers set to Yes, Columns set to Custom.
  • Add a “Send an email” action, Attachment Name field set to Daily.csv, Attachments Content set to output of “Create CSV table” action.

Image reference:2.JPG

 

3.JPG

The flow works successfully as below:4.JPG

 

5.JPG

 

Best regards,

Kris

Level: Powered On
Posts: 1
Registered: 2 weeks ago

Re: Send email with attachment

Worked for me!