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 / Create a flow that can...
Power Automate
Answered

Create a flow that can pick characters from shared mailbox and send a message in Teams group

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone, 

 

Can someone please help me to create a flow that can pick up the names from the email received in the shared mailbox and then send a customized message in a team's group chat? 

 

Requirements:

 

- The message includes the names.

- Names are known so we can put the names and flow can check for that names in the email and if match then picks up. 

 

Thanks in Advance. 

 

Regards, 

 

Viv

Categories:
I have the same question (0)
  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    What you want is if the name appears in the email, the Teams message will include this name?

     

    Based on your description, I have made a simple test for your reference.

     

    This is my flow:

    If it does not contain a substring, the IndexOf function will return -1.

    vzhoqianmsft_0-1682060204471.png

    vzhoqianmsft_1-1682060414509.png

     

    Email for test:

    vzhoqianmsft_2-1682060534096.png

    Result:

    vzhoqianmsft_3-1682060585765.png

     

     

     

    Best Regards,

    Habsburg Qian

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Habsburg, 

     

    Thank you for initiating this, The flow is working but it is not giving the right results. When the flow runs it is not picking the names in the email it is picking other names. I have nearly 10 names. I believe may be I'm putting something wrong in 'Append to array variable' part.

     

    Please assist. 

     

    Is it also possible to pick if we can match emails address cc'd or send to with the shared mailbox.

     

    Regards, 

     

    viv

     

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    The formula in "Append to array variable" is item()

    Or you could provide screenshots of the test and flow you have built, which will help me analyze the problem.

     

     

     

    Best Regards,

    Habsburg Qian

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    vsharma2_0-1682302351469.png

    vsharma2_1-1682302381684.png

    Please find the flow above and the result below.

    Email sent 

    vsharma2_2-1682302639107.png

    Message recieved

    vsharma2_3-1682302789982.png

    Hope this helps😊.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Another issue I just picked out is that even if the name is not there in the email, it is still sending messages with the names.

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Change to "is not equal to" in "Condition" action:

    vzhoqianmsft_0-1682303824828.png

     

     

     

    Best Regards,

    Habsburg Qian

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I used multiple names nearly 3-4 names ( have a list of 10-15 names to match) but it is only picking 2 names. how do we add more variables in the message send to Teams

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I just demonstrate the situation of two names in the test. Even if you have many names, they are all placed in the variable "arr", you can put the whole array into the Teams action.

     

     

     

    Best Regards,

    Habsburg Qian

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    When there is no name in the flow then it says the flow has failed. Instead of returning null and making flow fail. Can we just add another Post message thing that can just message 'There is an email for you to look at'?

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    We can concatenate them into a string, if there is no name, it will be blank.

    join(variables('arr'),', ')

    vzhoqianmsft_0-1682317875357.png

     

     

     

     

     

    Best Regards,

    Habsburg Qian

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

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard