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 / Join Array of email ad...
Power Automate
Answered

Join Array of email addresses - error

(0) ShareShare
ReportReport
Posted on by 32

Hello,

 

I have a relatively simple flow that is triggered upon submission of an MS form. An array variable called 'emailList' is initialised. Depending upon the answers submitted in the form, different email addresses are appended to the 'emailList' variable. I have a compose step that then joins the elements of the array into a string, separated with '; '. The output of this compose set is used in the 'To' field of the "Send an email (V2)" action.

 

Until recently this flow was working fine. I made a change to the MS Form on one of the questions (from being able to select multiple answers to only one) and but now I get an error at the email action stating "join  expects the first parameter to be an array. Provided value is of type 'String'.

 

I cannot work it out, the variable is definitely an array, and each step where email addresses are added are "append to array".

 

 

complete.png
Categories:
I have the same question (1)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @RedSnow_94 

     

    Pls add a compose action just before "Send an email" action to verify the values store in 'emailList' variable.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

  • RedSnow_94 Profile Picture
    32 on at

    Hi Manish,

     

    I already had a compose step to check this, it looks ok to me but appreciate if you can have a look:

     

    6.png

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @RedSnow_94 

     

    Is the compose showing the result of join() function that has been used in "To" parameter of send an email action?

     

     

  • RedSnow_94 Profile Picture
    32 on at

    Yes, the input for "Compose 1" is: 

    join(variables('emailList'), '; ')
     
    The input for the "To" field in the email step is the output from "Compose 1". I have also tried setting the "To" field directly using the above formula but results in the same error....
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Pls try the below expression. I have removed empty space after colon:

    join(variables('emailList'), ';')

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • RedSnow_94 Profile Picture
    32 on at

    Thanks Manish, tried that, still the same error....

  • Verified answer
    RedSnow_94 Profile Picture
    32 on at

    In case anyone finds the same error, the thing that was wrong was my brain....I had another "join" function within the body of the email action that took the answers to what was the multiple choice question in the Form. Once I had changed the form so a user could only pick one option, this was no longer passed as an array.

     

    I erroneously thought the error message was relating to the join function in the "To" field.

     

    Manish, sorry to have wasted your time!

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    I am glad that your problem is resolved 😃

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard