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 Automate - Building Flows
Answered

Looping through a string item

(0) ShareShare
ReportReport
Posted on by 11

Sorry if this has been convered, I've been reading about nested loops but this is one step before that. 

 

My flow is sending SMS messages. 

 

Basically my trigger action is "When an email arrives into a shared mailbox".  The user types the phone number into the outlook subject box and from there it carries out the action.  This works.

 

However, I want to allow users to send multiple SMS.  so the string would go from something like 07713245678 (one individual number) to: -

07712345678;07798778485;07945645622 with a semi colon between each. 

 

So I would need something to iterate through the string and then perform the remaining actions for each result (which I assume would be the "For Each" action). 

 

Any help would be grateful.

 

Thanks,

JP

I have the same question (0)
  • RezaDorrani Profile Picture
    12,141 on at
    Re: Looping through a string item

    Hi @JP_Scotland 

     

    In Flow

    Use a compose action with the following expression

    split(dynamiccontentphonestring,';')

     

    This will give you an array

    The run a for loop with output from the compose action

     

    and within loop use expression item() to get the individual elements in the array

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Looping through a string item

     

    Hi @JP_Scotland ,

     

    Like:

    42.PNG

     

    Best Regards,

  • JP_Scotland Profile Picture
    11 on at
    Re: Looping through a string item

    Ideal, thank you very much. You know your stuff 🙂

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard