@mentions in updates via the API

Hi all does anyone know how to mention someone through an API update, this is what I have so far it posts the message fine but doesn’t link that person to the update!
image|690x157

Any help is appreciated!

Cheers,
Ben

HI @Aetheris! That’s a great question! Currently there’s not a way to @mention a team member when mutating an update. I agree this would be beneficial to add to our API capabilities - I’ll be sure to pass this along to our team! Cheers!

Any update on this? Or some workaround?

@mingoes

At this time, I’m afraid it isn’t quite possible to @mention someone via the API. You can create an update that looks like an “@mention”, using the same format for your update’s body as returned in the query. For example:

"<a class=\"user_mention_editor router\" href=\"https://{slug}.monday.com/users/{user-id-to-mention}-{user-profile-name}\" data-mention-type=\"User\" data-mention-id=\"{user-id-to-mention}\" target=\"_blank\" rel=\"noopener noreferrer\">@{User Name}</a>" 

This will look like a proper @mention on the board:

However, this will not actually trigger a notification. In this case, I can only recommend getting the ID of the new update when making the API request, and then creating a notification related to this update via the “create_notification” mutation.

I realize this is extra work for you to develop the solution on your end, but I hope this helps clarify. At this time, it is still not possible to “@mention” someone when you post the update via API directly.

-Alex

2 Likes

Replying to this thread because this definitely has my vote as well! I find myself using status changes to trigger Internal Automations to notify particular users. This only goes so far, hard to maintain and Messages have to be very generic.

Hi guys, any update on this? In my experience it’s still not possible, but I was wondering if there is anything on the roadmap concerning this?

Thx!

Hi @TomasSmets,

This is not possible via the API. I’m happy to pass this along to the development team for their review. What are you looking to achieve exactly? this would help us better understand the use case for this feature.

Hi @alessandra, thanks for your reply!

I’m using make.com to create updates in certain cases. When I use the following HTML code in make, the person gets tagged, but there doesn’t appear an item in the inbox of monday.
So the mention in the update appearing in the related person’s inbox is my goal.

Schermafbeelding 2023-02-02 om 17.37.02

a notification appears:
Schermafbeelding 2023-02-02 om 17.40.46

But the inbox stays empty:
Schermafbeelding 2023-02-02 om 17.40.52

Thanks for sharing this additional detail! I’ll be sure to pass this along to the team so they understand your use case fully.

What’s the status on the deployment for this feature? From what I can understand, it’s been on the docket for about two years now.

Hi @HaloToxin,

While tagging in updates via the API isn’t possible right now, It’s something we’ve passed along to our developers internally as feedback. That being said, I can’t really offer an ETA on this at the moment.

The closest workaround at the moment would be something like what Alex listed above using a formatted value and the notification API, though it does require more effort.

Hi @alessandra , In create a notification , is there possible to add hyperlink in text ?

Hi @haider1122,

Welcome to the community! :fire:

Great question - and the answer is yes, you can! Essentially you just need to add an HTML <a> tag to your text string (+ make sure you use single quotes instead of double inside the tag!) Check out this code sample for reference:

mutation {
  create_notification(user_id: 12345678, target_id:9876543210, target_type:Project, text: "You can search for it on <a href='https://google.com' target='_blank'>Google</a>") {
    id
  }
}

@rachelatmonday Thankyou soo much… Issue solved :blush: :+1:

@rachelatmonday Thankyou soo Much … Issue solved. :hearts:

Thankyou Soo Much.

1 Like

Hello @haider1122,

I am glad our amazing @rachelatmonday could clear that for you!

Let us know if you have more questions!

Cheers,
Matias

Hey @rachelatmonday,
Can you suggest how to use it on make.com?

I believe it will be the post GraphQL_Query request.

I’m wondering what are the target_id and the target_type?
What should I insert there?

Thank you

Hi there,
target_type can be project or post .

  • Project : sends a notification referring to a specific item or board
  • Post : sends a notification referring to a specific item’s update or reply

target_id: The target’s unique identifier. The value depends on the target_type :

  • Project : the relevant item or board ID
  • Post : the relevant update or reply ID

Hope its helpful

For further implementation details kindly connect us:
MSquare Support
Visit us here
Youtube Channel

1 Like

I’ll try it out.
Thank you for your help.