Reputation: 2183
I am developing an Azure logic app.
Issue: I have a table with multiple rows. I have to retrieve all the rows and send an email for every row separately.
I am able retrieve all the rows using action "Get Rows", but how do I loop this rows to send an email for each row?
Any help is appreciated.
Upvotes: 1
Views: 5001
Reputation: 15754
The answer provided by Sajeetharan is a good solution, but since you have get the data from sql database by "Get Rows" action. I think you just need to use "For each" action to loop the "value" from "Get Rows".
My table for test in database is shown as below:
I received the three emails successfully.
Upvotes: 1
Reputation: 222582
Instead of using GetRows, you can use Execute Query or Execute Stored Procedure to get the Result set and then use Action control to iterate over the result set and send an email then.
Here is an example
that you can consider.
Upvotes: 1