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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Request for Workflow S...
Power Automate
Unanswered

Request for Workflow Support in MS Teams Automation

(1) ShareShare
ReportReport
Posted on by 21
Hi Everyone, 
I have an MS Teams group named “Test”, which contains three channels:
 • Questions
 • HR
 • Finance
Whenever a post is added in the Questions channel, I may reply to it and tag either HR, Finance, or both. I would like to automate the following process:
 • If I mention HR in my reply, the original question should be automatically posted in the HR channel.
 • If I mention Finance, it should be posted in the Finance channel.
 • If both are mentioned, the question should be posted in both channels.
I would be grateful for your support in providing a workflow (e.g., using Power Automate) to implement this functionality.
Thank you in advance for your assistance.
Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,844 Super User 2025 Season 2 on at
    Hi,
     
     Step 1: Trigger
    Use:
    Trigger: When a new channel message is added (v3)
    Team: Test
    Channel: Questions
    Only process replies: Add a condition to ensure replyToId is not null (because we're only interested in replies)
    Step 2: Get the original message (root post)
    Action: Get message details
    Message ID: @{triggerOutputs()?['body/replyToId']}
    Team: Test
    Channel: Questions
    This fetches the original question you're replying to.
    Step 3: Check mentions in your reply
    Action: Condition or Switch
    Check if the reply message contains specific keywords like:

    @{contains(triggerOutputs()?['body/body/content'], 'HR')}
    @{contains(triggerOutputs()?['body/body/content'], 'Finance')}
    Microsoft Teams "mentions" appear as rich text, not plain @HR, so the real text might include HTML like:

    <a href="https://teams.microsoft.com/l/entity/..." data-mention="HR">HR</a>
    So, for better reliability, use:
    Expression to normalize text:
    toLower(triggerOutputs()?['body/body/content'])
    Then check for the presence of "hr" or "finance" in the cleaned string.
    Step 4: Post to HR Channel (If Mentioned)
    Action: Post a message in a chat or channel
    Post as: Flow bot
    Team: Test
    Channel: HR
    Message:
    markdown
    Forwarded from Questions channel:*
    **Original Question:**
    @{outputs('Get_message_details')?['body/body/content']}
    Step 5: Post to Finance Channel (If Mentioned)
    Same action, just target the Finance channel.

    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • ahmad1987 Profile Picture
    21 on at
    Hi Reyaz,
     
    Many thanks for your reply.
     
    Please note that I created the workflow and it doesn't work. 
     
    could you please see the screenshosts and advise?
     
    Thank you 

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard