1

Currently I have two flows:

  1. Email Template: accepts variables for text, subject, files (separate variables for SharePoint name & path)
  2. "call flow": runs through list with emailadresses and names, passes these to child flow to send email

Now I'm running into problems when adding attachments. I used this guide (other guides suggest the same solution) to pass the file data in the template flow as attachment. The mail get's send properly including the attachment but the file is corrupt, much larger than the original file and can't be opened.

What am I doing wrong?

condition in child flow to check if file path is used and then generate the attachment array condition in child flow to check if file path is used and then generate the attachment array

1

Ok, I found the solution. It's only for max 1 attachment, but it works fine.

First I created the child flow which sends the email:

enter image description here

It has variables for email-adress, subject and text. In addition it has a file variable, which holds the filecontent and a text variable which will be used as the attachments filename.

Then I creates the "call" flow:

enter image description here

The SharePoint action is the one to get a file from path (I renamed it in the image), not the usual one. To pass it as valide content to the child flow, you need to write an expression like this

body('Lade_Datei').$content

and put it into the contentByte variable. The desired filename should be written in the extra generated variable field (in this case 'Dateiname' not 'Datiinhalt name').

Now when the email is send the attachment is not corrupted and works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.