Skip to main content
Community site session details

Community site session details

Session Id :
Copilot Studio - Calling Actions from Copilot S...
Answered

can output of join be concatenated with additional text in single expression?

(0) ShareShare
ReportReport
Posted on by 189

In my chatbot the user can request assistance with a technical issue. The bot gathers input from the user and calls an action where the users input is checked against a couple of conditions to return results from a skills matrix to pair them with help in their region and with the desired skillset. All of this works fine. The current bug I'm working through with this is getting the flow to remove my email from the list of emails if I happen to be the user (since I get added to every chat the bot creates due to my profile being used to create the chats). I think I have the solution but when I try to add it as an expression I continue to get "the expression is invalid" error. Here is my expression: 

if(equals(outputs('Get_user_profile_(V2)')?['body/mail'], 'bot.me@email.com'), join(body('Filter_array_Equip_Type')?['Email'], ';')), concat(join(body('Filter_array_Equip_Type')?['Email'], ';'), ';', outputs('Get_user_profile_(V2)')?['body/mail']))

My only guess is concat may not be compatible with join somehow? I tried searching the interwebs but found no mention of if these two functions play nicely together. So, I'm bringing it to the forums to see if anyone here knows if these two are compatible or if I need to find a different expression.

  • Verified answer
    kgreen8790 Profile Picture
    189 on at
    Re: can output of join be concatenated with additional text in single expression?

    I swear, at this point I'm just posting on here to jump start my own problem solving abilities. The last three posts I've done have led to me figuring out the solution just a few moments after posting the question. Something about putting it on here for the world to see makes me look at my code/process more critically and then I end up solving it. I'll leave this here along with the solution in case anyone else runs into this problem. 

    My issue was the double closing parenthesis on at the end of the first join function and I had to use select function to grab emails from array first. Totally spaced there I guess. Here is the correct code for this solution.

     

     

    if(equals(outputs('Get_user_profile_(V2)')?['body/mail'], 'Kevin.Green@convergint.com'), join(body('Select'), ';'), concat(join(body('Select'), ';'), ';', outputs('Get_user_profile_(V2)')?['body/mail'][0]))

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75

Featured topics