Reading notifications from the API

Hello all!
I’ve been tasked to develop something that displays how many unread Monday notifications a user has, but display it in our company intranet when they login. We all assumed there would be a “get notifications for user” endpoint or something similar but I can’t seem to find one.

Any ideas on how to best handle this approach? We’d be ok with small tweaks to the idea too like number of open assignments or something instead of notifications specifically.

Thanks!

Hello @ablosser and welcome to the community!

I hope you like it here :muscle:

There is no way of retrieving that information via API (the notifications that have not been opened).

As an idea, if each item of the board is a task, you could have a status column that indicates if the task is open or not. Then you could query for all the items in which that user is assigned (in a people column) and check how many of them have a “open task” status. You could count them on your end and display the number in your platform.

I hope that helps!

Let me know if you have any questions!

Cheers,
Matias

Hey thanks! I think that would be acceptable but I can’t figure out how to query items by assignee. Looks like the item endpoint requires item IDs as the parameter?

Any idea how I’d send a query for items by a people column like you suggested?

Hi @ablosser,

To query for items by a people column, you could use the items_by_column_values query:

query {
    items_by_column_values (board_id: 1234567890, column_id: "person", column_value: "Patrick Star") {
        id
        name
    }
}

Keep in mind that we only offer limited support for the items_by_column_values() “People” queries.

The people column query in this case will only return results for items where a single user is assigned. This query doesn’t support arrays of users, will only return results based on actual user name and not User ID.