cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdG
Level: Powered On

Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hi there.  This might be weird.

 

I'm building a Flow that will create a post in MS Teams when a user submits an email (that matches certain criteria) and also tags the user in the Teams post.

 

I couldn't find a Display Name attribute in the eMail, so I thought I should do a "Get Contact" as an interim step so that I could tag the user with a string-like function - @GrowBot Kudos to @@{body('Get_contact')?['DisplayName']} for their Social Media Submission!

 

The issue I'm facing is getting the contact based on the email address.  Flow wants an Item ID, which I've used a filter (I think) correctly - See below:Capture.JPG

But I get an error "Id is malformed. clientRequestId: 43bfbcbb-02cf-4119-a11b-b8eb2a060213" probably because my filter thing is broke, no?

 

Anyway, let me know if there's a better way to do this...or if my syntax is off or something, please.  I am very much not a developer (which is why I love Flow so much), so the less code-type stuff, the better.

 

Thanks!

Ed

 

 

20 REPLIES 20
Community Support Team
Community Support Team

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hi EdG,

 

Please consider using the action “Office 365 Users – Get user profile”. Using this action, you will be able to get the profile of a specific user, then you would be able to add the user display name in the post message.


You could get more details on this connector from this documentation:
https://docs.microsoft.com/en-us/connectors/office365users/


The flowing flow configuration for your reference:

3.PNG

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Mabel,

Thanks for that.  It definitely brings me closer.  Teams doesn't respond well to the tag, though:

 

Capture.JPG

 

Any tricks to get the tagging to work from an automated post?

 

Thanks again!

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

I see that the Twitter connector won't let you tag people and wonder if the Teams connector is the same way and we just missed that part in the documentation.

 

Thoughts?

Dual Super User
Dual Super User

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

I haven't tested yet Teams; but please note the variables displayed in the screenshot text are not showing their corresponding values.

I would recommend you to use concat expression to build the Message input field:

 

concat('@GrowBot Kudos to ',body('Get_contact')?['DisplayName'],' for their Social Media Submission!')

 

An excelent tutorial explaining how to use expressions in Flows can be found here:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Happy Flowing!

 





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Excellent....this definitely gets us even closer.  As you can see from the image below, it is getting the text right, but Teams does not recognize either as an actual "Tag".  The top example is from the automated Flow post, the bottom was manually typed to show the expected response from the Bot.

 

Capture.JPG

 

If I go in to edit the automated response, I can then add the tags by deleting the last letter and re-adding.  So I'm wondering if there is some back-end code that needs to be added in order for Teams to recognize the Tags.

Dual Super User
Dual Super User

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

@EdG

As I mentioned before I do not have tested yet Teams, but let's hope there is a way to tag users in Teams. As far as I know, neither Twitter nor Yammer support it





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





b00weck
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hey just wondering if you ever got this to work as I'm trying to do something very similar. 

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

@b00weck - Negative.  I'd get it to post the correct name, but Teams would never resolve the 'code' version of the user's name.  I think because it's coming from the back-end, and the resolution part seems to happen as you're typing through the front end.  Not sure, but the project lost steam anyway.

 

Let me know if you find a solution though, it was fun and I'd like to pick it back up when I get time.

 

-Ed

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

good morning! I am trying to work on the same concept for my project. did you ever make this work? have you found a solution?

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hi there, so... a bit of a story -

What I found out back then was that it wasn't possible to automatically tag folks from outside Teams.

 

Since then, though, MS has pushed out some great documentation on doing this with bots and just last week announced that you can now tag folks using Flow.  This was exactly what I needed, but I have not been able to get it to work.  Nor have I found anyone who has had luck getting it to work.

 

Here is a twitter thread detailing the journey as it happens.

 

What, specifically, is your project attempting?  Maybe there is another way to accomplish that.

-Ed

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

hey thanks for the quick response! i will check the links that you have provided. basically we use MS Flow to trigger alerts/message post in an MS Team channel. so when a Sharepoint Item is added in a sharepoint site, i will post a message to a microsoft teams channel. but the thing is we have a lot of audiences in there and it gets clogged. what I wanted to achieve is to mention an individual so he/she gets notified directly.

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

No worries at all.  Yep, that is exactly what I'm trying to do.  The consensus seems to be that the announcement was a bit premature and that functionality isn't widely available...yet.

If you work at all with bots and are comfortable with code, check out the bots documentation (link is in the Twitter thread), because I think you could use the Flow Bot action for Teams to post and if you have the right stuff installed, that should work.  Just a guess.

Otherwise, wait a bit for the updates to catch up to the announcements.  I'll keep updating that thread as I make progress, as well.

Thanks!

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hi @EdG, seems like they are implementing it but not sure when is it going to really take in place. Based on the document, it should work. . You will see in the document that we should.be able to @mention someone by putting <at>email@address.com</at> statement.

 

https://docs.microsoft.com/en-us/business-applications-release-notes/october18/microsoft-flow/post-r...

 

I tried it seems that the function is broken. Looking forward for some updates from Microsoft/Flow.

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Hi @EdG , there's a document released by Microsoft about the new feature to mention someone. Apparently it is still not working..

 

https://flow.microsoft.com/en-us/blog/adaptive-cards-for-microsoft-teams-microsoft-flow-us-governmen...

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

@EdG, update. The <at> function is now working. We can now start mentioning individuals in a channel.

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

@mlcrubio - This is great news...except I can't get it to work.  What syntax are you using, specifically?  I've tried a few iterations and am still getting the same results.

 

Thanks!

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

@EdG, use this Action Capture.JPG..

 

 

and within that action you will see the Message Body. Just enclose the email address of the person you want to mention with an <at> function.

 

Example: <at>mark.rubio@microsoft.com</at>.

EdG
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Ding Dang!  Thanks!


I notice I can skirt around the weird Teams rule about tagging myself, too, if I have the bot do it.

mlcrubio
Level: Powered On

Re: Using eMail Address to Tag in Teams (Get Contact ItemID from eMail)

Glad to hear you made it work.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,924)