web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to pass all values...
Power Automate
Suggested Answer

How to pass all values of a specific column when sending an email in a flow?

(0) ShareShare
ReportReport
Posted on by
I have several entries in SharePoint List A. For brevity, let's consider only the link field and email field. 
 
I have a Cognito form set up to accept an email address. 
 
In the flow, I'm pulling emails from SharePoint List A. If the email entered in the Cognito form matches the email from SharePoint List A, then an email is sent to the address entered in the Cognito form. 
 
The email is supposed to include the link from SharePoint List A. 
 
The problem is I'm only able to send the link displayed in the most recently entered row from SharePoint List A. 
 
Here are some images of my flow: 
 
 
 
Here's what's in the "Yes" condition: 
 
The "No" condition is empty for now. 
 
Everything in the flow works fine except that I can't seem to get all of the "CognitoLink" items in a single email. 
 
The only additional progress I've made is I had Get Items > Top Count set to 1. I increased it to 100, and now instead of it sending all the "CognitoLink" items in a single email. It sends numerous emails. Each with an individual link. I have 35 rows in my SharePoint List A, so I receive 35 emails, each with a different link. 
 
There must be a way to loop through all of them and output into a single email., 
 
 
Question: 
How do I include all links from SharePoint List A where the emails match? 
Categories:
I have the same question (0)
  • Suggested answer
    Ninjasabi Profile Picture
    122 on at

    To address your issue of sending all the "CognitoLink" items in a single email when the email entered in the Cognito form matches the email from SharePoint List A, you can follow these steps:

    • Initialize a String Variable: Create a string variable to store all the links concatenated together.
    • Get Items from SharePoint List: Use the "Get items" action to retrieve all the items from SharePoint List A.
    • Apply to Each Loop: Use an "Apply to each" loop to iterate through the items retrieved from SharePoint List A.
    • Condition to Match Emails: Inside the loop, add a condition to check if the email from the SharePoint item matches the email entered in the Cognito form.
    • Append to String Variable: If the condition is true, append the "CognitoLink" value to the string variable created in step 1.
    • Send an Email: After the loop, use the "Send an email" action to send an email to the address entered in the Cognito form, including the concatenated string variable in the email body.
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    @JN-06121917-0 The Condition action you have in your Apply to Each loop seems redundant. It looks as though you've already defined a filter query that should be filtering items where the Landlord Email is equal to the Request Listing Email. Since you've already filtered the items out, the condition action isn't necessary in your case.
     
    You might be interested in these YT Tutorials:

    Building a Power Automate flow that will send an email with multiple SharePoint items can be a bit complex. In this video tutorial I’ll cover how to build a flow that will send a single email to each user with tasks that have been assigned to them. The logic in this flow can be applied to many different scenarios.
    First, I’ll show you how to use a Filter Query to return items from your SharePoint list that meet your criteria. Then I’ll show you how to return a list of unique email addresses so that each user receives a single email. Lastly I’ll show you how to compose an email that will contain an HTML table with a list of tasks for each user.

    IN THIS VIDEO:
    ✓ How to send multiple list items in a single email with a Power Automate Flow
    ✓ How to create a dynamic date range
    ✓ How to use the Convert Time Zone action
    ✓ How to use a Filter Query in the Get Items action
    ✓ How to count number of items in an array
    ✓ How to use the Select action to extract a users display name and email address
    ✓ How to create a unique list of email addresses
    ✓ How to use the Create HTML Table action
    ✓ How to customize the HTML Table with CSS styles
    ✓ How to use the Send an email (V2) action
    ✓ How to use the Append to String Variable action
    ✓ How to create a custom list of items for an email
    ✓ How to use the Send an email (V2) action
    ✓ How to display singular or plural text based on the number of items returned
     
    ---
     

    In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
    1️⃣ Looping through a Single Item
    2️⃣ Creating Unnecessary Nested Loops
    3️⃣ Looping through an Unfiltered Array

    At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

    IN THIS VIDEO:
    ✓ How to avoid the Apply to Each action with a single item array
    ✓ How to use the item() function to access dynamic content in an array
    ✓ How to prevent unnecessary nested Apply to Each action loops
    ✓ How to use the Select action
    ✓ How to convert an array to a string with the Select action
    ✓How to use the Filter Query field
    ✓ How to count the number of items in an array
    ✓ How to use a condition control
    ✓ How to use the concurrency control
    ✓ How to set a top count
    ✓ How to use Compose actions for troubleshooting
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard