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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get from a stri...
Power Automate
Answered

How to get from a string of emails to a "For Each" - Send a teams chat

(1) ShareShare
ReportReport
Posted on by 12
Hello! this is the basic outline of my current flow. I am trying to send each person in the list a separate chat with flowbot (not a group chat).
 
1. Form Response is submitted
 
2. Initialize Variable: 
{
  "Answer A": "person1@comany.com; person2@company.com",
  "Answer B": "person3@company.com; person4@company.com",
}
3. Compose
variables('Recipient')?[outputs('Get_response_details')?['body/asdfghjk234567890']]
 
4. ????? (I have tried using a Compose + split() but was getting errors)
 
5. For Each -> Post a message in a chat/channel
 
Categories:
I have the same question (0)
  • Verified answer
    SwatiSTW Profile Picture
    809 Super User 2026 Season 1 on at
    1. Add a Compose action – Get recipient string
    Action Name: Get Recipient Emails
    Expression:
    variables('RecipientList')?[outputs('Get_response_details')?['body/QUESTION_ID']]

    Replace QUESTION_ID with the actual ID of the form question (e.g., 'body/r1234567').
     
    2. Add another Compose – Split the emails
    Action Name: Split Emails
    Expression:
    split(outputs('Get_Recipient_Emails'), ';')

    Use the name of the previous Compose step in outputs('...'). If you used a different name, update it.
     
    3. Add an “Apply to each” loop
    Select output from previous step:
    outputs('Split_Emails')
     
    4. Inside the loop – Add “Post a message in a chat”
    Action: Microsoft Teams → Post a message in a chat or channel
    Settings:
    Post as: Flow bot
    Post in: Chat with a user
    Recipient:
    trim(items('Apply_to_each'))

    Message: Your custom message
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at
    Are you trying to get the  Answer A emails separately? Then Answer B and so on?
     
    "Answer A": "person1@comany.com; person2@company.com",
  • KW-04121632-0 Profile Picture
    12 on at
    Yes, if they select Answer A in the form I want 1 teams message to be sent to person 1 and a separate teams message to be sent to person 2

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard