Generate CSV report out of Flow designer Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 12:52 AM
Hello,
I'm having a Flow that fetch records using 'Loop up records' based on some condition and if condition satisfies then have to update the record.
Before updating the record I would like to generate a CSV file from the 'Look up records' to ensure the data is correct.
Is there any way that we can generate a report out of Flow action? any other suggestions?
Thanks,
Kishore.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 01:02 AM
HI,
please refer the below link you can find some interesting info:-
Mark the comment as a correct answer and also helpful if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 03:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2024 01:01 AM
Hi @Kishore32
I have similar requirement, did you get the solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2024 11:09 PM
Create custom script action
Sample code:
(function execute(inputs, outputs) {
var csvGenerator = new CSVGenerator();
var records = [];
// Assuming `inputs.records` is the array of records from the Lookup Records action
records = inputs.records.map(function(record) {
return {
field1: record.field1,
field2: record.field2,
field3: record.field3
};
});
var csvContent = csvGenerator.generateCSV(records);
// Store or send the CSV content
// Optionally, you could save this to a file or send it via email
outputs.csvContent = csvContent; // Pass the CSV content to be used in subsequent actions
})(inputs, outputs);
var CSVGenerator = Class.create();
CSVGenerator.prototype = {
initialize: function() {},
generateCSV: function(records) {
var csv = '';
var header = 'Field1,Field2,Field3\n'; // Adjust header based on your fields
csv += header;
records.forEach(function(record) {
var line = '';
line += record.field1 + ','; // Adjust field names based on your data
line += record.field2 + ',';
line += record.field3 + '\n';
csv += line;
});
return csv;
},
type: 'CSVGenerator'
};