A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hello @Luz,
Thank you for reaching out to the Q&A forum!
After reading your message, I reviewed your previous conversation with Francisco Montilla, and I also ran several tests in my own environment. By checking the Raw Outputs of the Get message details action, I was able to successfully extract the mentions; so, I’ll share the exact steps that worked for me.
Since you already configured When a new channel message is added and Get message details, I won’t repeat those steps. Here are detail next steps:
1.Before adding the Apply to each step, please add an “Initialize variable” action as follows:
- Name: Mentions
- Type: String
- Value: (you can leave this empty)
2.Next, you need to add an Apply to each, in Select an output from previous steps, you can enter the following expression: body('Get_message_details')?['mentions']
3.Inside the loop, you add “Append to string variable”:
- Variable name: Mentions
- Value: concat(coalesce(items('Apply_to_each')?['mentioned']?['user']?['displayName'], items('Apply_to_each')?['mentionText']), ', ')
4.Finally, you add Add a row into a table. In my test table, I used the following columns: Message, PostedAt, Mentions.
For the Mentions column, you can simply enter: variables('Mentions')
After saving the flow and posting a test message with mentions, everything worked successfully on my side.
Looking forward to hearing from you!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.