Get Items from Data source to reduce Loop with Expressions in Power Automate

Loading

Requirement: Get items from Data Source to reduce Loop using Expressions in Power automate

For this Get items from DataSource through SharePoint list “Product Billing”. Get one record from data source and send details for that record to specific user in an email.

Create Instant flow using Manually trigger a flow and click on next step and add Get items action to the flow. Add site address, List name and Filter query . And add Compose action and get the output from get items value.

Filter Query : ID eq 2

Add Send an email(V2) action. Provide To, Subject and Body. When the Title where added to the Body, it added an Apply to each loop without adding it. The Loop was added to the flow, avoid this loop as the below actions and expressions on the flow.

To avoid the for each loop use expressions. Add another Compose action Provide an expression,

Outputs('Get_items')?['body/values'][0]?['Title']

Now For Modern editor, Click on Settings, select the view power automate settings, Click on Experimental features save it and reload the flow.

And now drag the send an email action to the upstairs and Provide the other columns and using expression.

Title: Outputs('Get_items')?['body/values'][0]?['Title']

Billing State: Outputs('Get_items')?['body/values'][0]?['BillingState']

Billing Country: Outputs('Get_items')?['body/values'][0]?['BillingCountry']

Now Save and Run the Flow. The values are provided by expressions not by dynamic content of Sharepoint get items list. So, the mail send of specific record as mentioned to filter an items from the list.

The Specific record selected and sent email without using loop the actions.

The Same Process for Get items from datasource and for Get files from datasource.

Leave a Reply

Your email address will not be published. Required fields are marked *