I am developing a pipline which i need to get records from a CSV file and run through a ForEach loop to read line by line and pass each line for POST request. In ForEach loop how do i read line by line and send that line to next web activity. Following is a screenshot of my Pipeline,
I managed to read data from CSV file then i am expecting to send line by line to a POST request.
Any Support would be appreciated !
Lookup activity will give the output as JSON array like below from csv when you uncheck the First row only option in it.
You need to pass this array to ForEach like this.
@activity('Lookup1').output.value
Inside ForEach activity, use your web activity to POST the data. If you want to pass the one object from the Lookup output array in each iteration, then use @item()
in the web activity body.
If you want to pass any particular field from the object of the Lookup output array in each iteration(col1
for example), then use @item().<column_name>
in the web activity body.