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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set string = distribut...
Power Apps
Unanswered

Set string = distribution list and then use string in To: line

(1) ShareShare
ReportReport
Posted on by 153
Hello. Using MS Forms to have a user answer some questions. Depending on their response, I want PowerAutomate to email John and Bob, or perhaps Sally and Jane. I can successfully create a variable string = "John;Bob", but how do I use the Outlook action to send to that list (i.e., so that To: = the string value). The Outlook Email action anticipates me entering a valid email address, and not a string variable name. I can get this to work if I enter in the email addresses explicitly, but having a string would be good for easier changes later. Thanks!
 
(Sorry to post here, but there seems to be better activity in this forum. Thanks!)
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Set string = distribution list and then use string in To: line
     
    I have added an Initialize variable step in the flow to add email addresses as a string and it works.
    I have just added the emails separated by ";".
     
    Here's how it looks - 
     
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    52,970 Super User 2025 Season 2 on at
    Set string = distribution list and then use string in To: line
    HI
     
    You can use variables anywhere, there is no blocking from the Action, so its how you are doing it, not the action.
     
    Trust me it works just fine.
  • CedarTree72 Profile Picture
    153 on at
    Set string = distribution list and then use string in To: line
    Thanks all - I'll give the suggestions a try in the coming week.
  • CedarTree72 Profile Picture
    153 on at
    Set string = distribution list and then use string in To: line
    Hello. I initialized a To: variable and a CC: variable. And depending on the form "logic", it will set the variable to various TO/CC lists of people (just me for now for testing). But when I get to the Outlook email step, I get a "the To: line" can't be blank error. Help please? Thanks.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard