Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

First Flow, get file content email users

Posted on by 20

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

  • Jason8 Profile Picture
    Jason8 20 on at
    Re: First Flow, get file content email users

    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'

  • ScottShearer Profile Picture
    ScottShearer 25,182 on at
    Re: First Flow, get file content email users

    @Jason8 

    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.

    image.pngimage.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard