Skip to content

Notifications Tools

The notifications_* tools read the user's Huddo inbox and manage their notification settings.

All four tools are in the core tool group and need Huddo Notifications.


notifications_inbox

The user's Huddo inbox, unread items by default, grouped by app (wikis, ideas, discussions, spaces).

Read-only · Needs: Notifications

Parameter Type Required Default Notes
unreadOnly boolean No true false lists read items too
since date or date-time No Only items that arrived after this
limit integer No 20 1 to 50
cursor string No nextCursor from an earlier answer, to read the next page
allOrgs boolean No false Include every organisation the user belongs to, not just the current one

Returns: unreadCount, the number of all unread items (whatever since is); groups, the items by app, each with id, type, title, a short body, the url to act on, the actor (who did it; left out when there's none, such as for a new idea, or a mention made by the idea's author, in a lab where ideas are anonymous), read and createdAt; and truncated and nextCursor when there are more.

Example: "What's in my Huddo inbox?"


notifications_mark_read

Marks one notification read, or unread again, or marks every notification read.

Write · Needs: Notifications

Parameter Type Required Default Notes
id string No One notification's id, from notifications_inbox
read boolean No true false marks the notification unread again (one notification only)
all boolean No false Mark every notification in the current organisation read
allOrgs boolean No false With all, mark every notification in every organisation read

Give either id or all.

Returns: updated, the number of notifications changed.

Example: "Mark all my notifications as read."


notifications_get_preferences

The user's notification settings for their current organisation, or their global settings: which channels are on, and which kinds of event are muted.

Read-only · Needs: Notifications

Parameter Type Required Default Notes
global boolean No false Read the global settings instead of the organisation's

Returns: organisationId, enabledChannels (any of email, teams and in_app) and mutedEventTypes.

Example: "Which Huddo notifications do I get by email?"


notifications_set_preferences

Changes the user's notification settings for their current organisation, or their global settings. Only the fields given change.

Overwrite · Needs: Notifications

Parameter Type Required Default Notes
enabledChannels array of strings No Any of email, teams and in_app. Replaces the channels that are on; an empty list turns them all off
mute array of strings No Up to 50 event types to mute, such as wiki.page.updated or idea.created
unmute array of strings No Up to 50 event types to unmute
global boolean No false Change the global settings instead of the organisation's

Give at least one of enabledChannels, mute and unmute. Event types look like wiki.page.updated, idea.created, discussion.mention and space.join_requested.

Returns: the saved organisationId, enabledChannels and mutedEventTypes.

Example: "Stop emailing me when wiki pages I follow are updated."