Actually there may be an easier way of sending the data as a csv attachment if you have Office 365 Outlook.
The answer is buried here:
You will see that you need to supply the attachments as a table, namely:
I think this means that you create your CSV data with the Concat function as the content bytes. This needs some experimentation, but you could create a collection with the filename and the content bytes (your csv data) then try to use the collection as the parameter of the send email function.
Please let me know how you get on. I would try this myself but have no time today.
I have now had time to experiment and I got the CSV file creation to work.
This is how I did it:
There might be a better way to do it but it works. Screenshots follow. Please note that the filename parameter in the last screenshot was left over from a previous version of the flow.
No, the csv file content can be created by a Concat function in PowerApps with your data.
Say your data is source is MyDataSource and you filter it, then you can do this to create a csv file for example:
Concat( Filter( MyDataSource, MyColumnA = "MyFilterValue"), MyColumnB & ", " & MyColumnC & Char(10))
Please let me know if this is not clear.
You can add column titles at the start etc. once you understand how it works.
You can only add flows when you edit apps in PowerApps studio, it is the main difference between the web editor and the studio.
Please see point 6 of the following...
I was able to make it work!!! thanks!
Now I also need to send first row as all columns( how to do this?)
I was able to get filtered search result in csv to ondrive but I need to add first row as columns.
I think the easiest approach is just to add a piece of text at the beginning, before the concat function, with the column names, something like this:
"Column A, Column B, Column C, Column D"&Char(10)&Concat(etc. etc. ...
thanks that worked!
Now I also want to send this file as attachment to a user. File is getting created on one drive for business.
I am getting below error-
Unable to process template language expressions in action 'Send_an_email' inputs at line '1' and column '1509': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_office365']['connectionId']' cannot be evaluated because property 'shared_office365' doesn't exist, available properties are 'shared_onedriveforbusiness'. Please see https://aka.ms/logicexpressions for usage details.'.
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Fill out a quick form to claim your user group badge now!
Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities
Features releasing from October 2019 through March 2020
Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.
Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications