Notification Handling via Graphql

Hello everybody,

I am trying to use the Notification System for an Application. I am using the api method as described in https://monday.com/developers/apps/sdk. When sending a mutation api call as described here https://monday.com/developers/v2#mutations-section-notifications, i get a 500 Error back.

Before the 500 Error i was able to check that the query and all its details are alright, because i got a validation error for using the wrong notification type.

I tried out lots of trial error so far but now i am in the status that I have to ask, any help is appreciated.

This is how the request looks like:
{"query":"mutation {\n create_notification (user_id: <userId>, target_id: <boardInstanceId>, text: \"Xou got a message\", target_type: Project) {\n text\n }\n }","client_id":"<client_id>","client_token":"<token>"}

Hey @flobau :wave:

Thanks for reaching out to the community and allowing us to lend a hand :slight_smile: I’d love to help out.

Just to make sure we’re on the same page here, what is the value you are using for the target_id parameter? It should be an Item ID within monday.com. From the code, it seems like you might be referring to a board instead?

I’ve just tried out the following query in the API playground and it seemed to work without issues:

mutation {
  create_notification (text: "I like turtles. Do you like turtles?" user_id: <myuserid>, target_id: 413942519, target_type: Project) {
    id
  }
} 

Where target_id is the item ID. Could you try the approach above out?

-Alex

Thanks for the answer, thats correct -> i used the board ID because i don’t really have an item in my application. i guess there is no way that a notification can be sent without an item attached to it?

1 Like

I participate in the monday.com App Marketplace Challenge - I added a Settings Field to the Application to enter a “Carrier Item ID” that enables Notifications in the App.

I still would be interested to send a Notification that links directly into an application, so if you know any way how this is possible I would like to integrate it.

Have a great start in the week,
br

Hi @flobau!

Apologies for the delay in response. Are you still experiencing issues setting this up?

You are correct in your assumption that notifications can only be sent to either Projects or Posts, not an entire application.

In any case, I would be more than happy to forward your feedback to our apps team for consideration!

-Helen

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.