I want to add a few xml files as attachements when sending an email but I can’t figure out what to add in the email setup as Attachement. It says it needs to be “file record or table of file records”. I then tried to create a file records using the following, but then what is expected as “data” here?
let fileRec = [filename: ‘reports.xml’, data: textOutput ];
Unfortunately there is no flow script function yet for converting data to binary so recommended approach for now is to step over a DB connector and convert it to binary using SQL Functions (e.g. convert varbinary(max))
when i need to create attachement files from Flow i usualy use Filesystem connector to write text (or lines) to some file, then zip that file, and then zip to stream. That stream can then be used in data column of my attachements table.
If its a cloud flow server then d:\home\site\wwwroot\ will do as a location to create the file and zip.
Just make sure you clean up after