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 / Use SPO Get Items to b...
Power Automate
Unanswered

Use SPO Get Items to build string variable from all list entries

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, just want to check if this is viable scenario - if we take a SPO list with 2 columns: "user name" and "email", for example:

 

Column SPOName: John Doe , Jane Doe 

Column SPOEmail: john.doe@contoso.com, jane.doe@contoso.com

 

  1. Initialise string variable ListItems
  2. Get items - point to SPO list;
  3. Apply to each > Set Variable ListItems with value:   "SPO name  - <at>SPOEmail</at>, "
  4. Use ListItems as dynamic content to insert into adaptive card.

It works fine but in the final card, only 1 entry is getting added, while Flow run showing list of these values:

 

Capture.PNG

 

And final result is just "Jane Doe - @Jane.doe@contoso.com".

How to make all "Apply to Each" variable results to be output into continuous text string like : "Jane Doe - @Jane.doe@contoso.com, John Doe - @John.doe@contoso.com,"?

I suspect that some Compose action is needed but what would be espression to add all these variables in the string?

 

 

Categories:
I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Hi!
    You can either use 'Append to string' variable
    or
    Declare your variable as Array, use 'Append to Array', and once 'apply to each' is finished, convert it into a string by means of join() function
    More info here
    https://powerusers.microsoft.com/t5/Building-Flows/Put-spaces-between-people-names/td-p/506563
    Hope this helps
  • vbbvbb Profile Picture
    Microsoft Employee on at

    So if I want to use Append to String, how does the logic works here:

     

    Capture2.PNG

    Does it stay inside Apply to each? I tried that now - doesn't seem that it likes the output already inside the adaptive card.

  • efialttes Profile Picture
    14,756 on at
    Hi!
    I an afraid It's difficult to suggest anything without having context info about the adaptive card design
    Please share Adaptive Card json definition if possible
    Thanx!
  • vbbvbb Profile Picture
    Microsoft Employee on at

    I guess i just have to use Compose with append to string variable results and then use these in adaptive card body where i want these text strings to be inserted?

     

    UPS: Yup, that solved it 🙂 Thanks for valuable advice!

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 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard