Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/using-seerr/notifications/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ The following special variables are only included in request-related notificatio
| Variable | Value |
| ----------------------------------------- | ------------------------------------------------------------------------------ |
| `{{request_id}}` | The request ID |
| `{{requestedBy_id}}` | The requesting user's ID |
| `{{requestedBy_username}}` | The requesting user's username |
| `{{requestedBy_email}}` | The requesting user's email address |
| `{{requestedBy_avatar}}` | The requesting user's avatar URL |
Expand All @@ -132,11 +133,12 @@ The following special variables are only included in issue-related notifications
| Variable | Value |
| ---------------------------------------- | ------------------------------------------------------------------------------ |
| `{{issue_id}}` | The issue ID |
| `{{reportedBy_username}}` | The requesting user's username |
| `{{reportedBy_email}}` | The requesting user's email address |
| `{{reportedBy_avatar}}` | The requesting user's avatar URL |
| `{{reportedBy_id}}` | The reporting user's ID. |
| `{{reportedBy_username}}` | The reporting user's username |
| `{{reportedBy_email}}` | The reporting user's email address |
| `{{reportedBy_avatar}}` | The reporting user's avatar URL |
| `{{reportedBy_settings_discordIds}}` | The reporting user's Discord ID(s) as a JSON array (if set) |
| `{{reportedBy_settings_telegramChatId}}` | The requesting user's Telegram Chat ID (if set) |
| `{{reportedBy_settings_telegramChatId}}` | The reporting user's Telegram Chat ID (if set) |

#### Comment

Expand All @@ -147,6 +149,7 @@ The following special variables are only included in issue comment-related notif
| Variable | Value |
| ----------------------------------------- | ------------------------------------------------------------------------------ |
| `{{comment_message}}` | The comment message |
| `{{commentedBy_id}}` | The commenting user's ID |
| `{{commentedBy_username}}` | The commenting user's username |
| `{{commentedBy_email}}` | The commenting user's email address |
| `{{commentedBy_avatar}}` | The commenting user's avatar URL |
Expand Down
3 changes: 3 additions & 0 deletions server/lib/notifications/agents/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const KeyMap: Record<string, string | KeyMapFunction> = {
request_id: 'request.id',
requestedBy_jellyfinUserId: 'request.requestedBy.jellyfinUserId',
requestedBy_username: 'request.requestedBy.displayName',
requestedBy_id: 'request.requestedBy.id',
requestedBy_email: 'request.requestedBy.email',
requestedBy_avatar: 'request.requestedBy.avatar',
requestedBy_settings_discordIds: 'request.requestedBy.settings.discordIds',
Expand All @@ -51,12 +52,14 @@ const KeyMap: Record<string, string | KeyMapFunction> = {
issue_status: (payload) =>
payload.issue ? IssueStatus[payload.issue.status] : '',
reportedBy_username: 'issue.createdBy.displayName',
reportedBy_id: 'issue.createdBy.id',
reportedBy_email: 'issue.createdBy.email',
reportedBy_avatar: 'issue.createdBy.avatar',
reportedBy_settings_discordIds: 'issue.createdBy.settings.discordIds',
reportedBy_settings_telegramChatId: 'issue.createdBy.settings.telegramChatId',
comment_message: 'comment.message',
commentedBy_username: 'comment.user.displayName',
commentedBy_id: 'comment.user.id',
commentedBy_email: 'comment.user.email',
commentedBy_avatar: 'comment.user.avatar',
commentedBy_settings_discordIds: 'comment.user.settings.discordIds',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const defaultPayload = {
'{{request}}': {
request_id: '{{request_id}}',
requestedBy_email: '{{requestedBy_email}}',
requestedBy_id: '{{requestedBy_id}}',
requestedBy_username: '{{requestedBy_username}}',
requestedBy_avatar: '{{requestedBy_avatar}}',
requestedBy_jellyfinUserId: '{{requestedBy_jellyfinUserId}}',
Expand All @@ -59,6 +60,7 @@ const defaultPayload = {
issue_type: '{{issue_type}}',
issue_status: '{{issue_status}}',
reportedBy_email: '{{reportedBy_email}}',
reportedBy_id: '{{reportedBy_id}}',
reportedBy_username: '{{reportedBy_username}}',
reportedBy_avatar: '{{reportedBy_avatar}}',
reportedBy_settings_discordIds: '{{reportedBy_settings_discordIds}}',
Expand All @@ -68,6 +70,7 @@ const defaultPayload = {
'{{comment}}': {
comment_message: '{{comment_message}}',
commentedBy_email: '{{commentedBy_email}}',
commentedBy_id: '{{commentedBy_id}}',
commentedBy_username: '{{commentedBy_username}}',
commentedBy_avatar: '{{commentedBy_avatar}}',
commentedBy_settings_discordIds: '{{commentedBy_settings_discordIds}}',
Expand Down
Loading