Hi I am creating my first flow,
I am using Get File Content to retrieve a CSV file,
email, Desc
Me@me.com , hello world
I initialize my variables then use.
Apply To Each, the idea been to split the the row contents into an array and populate the send email with myArray[0]
However when I test run I am greeted by the error
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('Get_file_content')?['body']' is of type 'Object'. The result must be a valid array.
the file is valid and held in sharepoint, and I can't see any properties to change the 'Object' type. can anyone point me in the right direction please.
thanks jason
thanks but this doesn't work when using the CSV file, I encounter the same error.
function 'Split' expects its first parameter to be of type string. The provided value is of type 'Object'
You'll want to use the split() expression and split on the comma. Split will create the array for you to loop through. You can also use the first() and last() expressions on the array to retrieve the first or last element.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.