Jellyfin Forum
Webhook Working Selectively - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Webhook Working Selectively (/t-webhook-working-selectively)



Webhook Working Selectively - staraptor78 - 2025-12-13

Currently testing out webhooks and made it work using the templates from github. But I always get an error when i update my anime library

Code:
[2025-12-13 19:45:11.099 +08:00] [WRN] [39] Jellyfin.Plugin.Webhook.Destinations.Discord.DiscordClient: Notification failed with "POST" request to https://discord.com/api/webhooks/1449205036185030656/NthtFn2V8t93aHkCXF3NRTjP3xep_u7fBLbdAAWrQe_ZGku0Iwc498mPjnStlEObLjcf: "{
    \"content\": \"@here\",
    \"avatar_url\": \"\",
    \"username\": \"JellyfinNewShows\",
    \"embeds\": [
        { 
            \"author\": {



                    \"name\": \"Show Added •  Undead Unluck\",

                \"url\": \"http://100.123.21.76:8096//web/index.html#!/details?id=f57351d6-5b9e-4184-ec19-30c51a7583e7&serverId=2ecb3aa4b62245bc9e054b77db5d5b7b\"
            },
           

            \"thumbnail\":{
                \"url\": \"http://100.123.21.76:8096//Items/f57351d6-5b9e-4184-ec19-30c51a7583e7/Images/Primary\"
            },

            \"description\": \"> All Fuuko wants is a passionate romance like the one in her favorite shoujo manga. Unfortunately, her Unluck ability makes that impossible. But just as Fuuko hits rock bottom, Andy sweeps her off her feet—literally! Now she's become Andy's unwilling test subject as he works to find a way to trigger a stroke of Unluck big enough to kill him for good. However, when the pair discovers a secret organization is hunting them, it puts Andy's burial plans on hold.<br>
<br>
(Source: Viz Media)\n\n[**Watch Now** ](http://100.123.21.76:8096//web/index.html#!/details?id=f57351d6-5b9e-4184-ec19-30c51a7583e7&serverId=2ecb3aa4b62245bc9e054b77db5d5b7b)• [**IMDb** ](https://www.imdb.com/title/tt21927720/)• [**aniDB** ](https://anidb.net/anime/17586/)\",

            \"color\": \"3381759\",

            \"footer\": {
                \"text\": \"SynkDrive 2.0 \",
                \"icon_url\": \"\"
            },

            \"timestamp\": \"2025-12-13T19:45:10.6571997+08:00\"
        }
    ]
}"
[2025-12-13 19:45:11.099 +08:00] [WRN] [39] Jellyfin.Plugin.Webhook.Destinations.Discord.DiscordClient: Notification failed with response status code BadRequest: "{\"message\": \"The request body contains invalid JSON.\", \"code\": 50109}"

Here's what the log says, not sure what's empty unless I missed something? Below is the template, wherein i just added "Series" and the providerid for anidb. This is just the default template from git

Code:
{
    "content": "{{MentionType}}",
    "avatar_url": "{{AvatarUrl}}",
    "username": "{{BotUsername}}",
    "embeds": [
        { 
            "author": {
                {{#if_equals ItemType 'Season'}}
                    "name": "Season Added • {{{SeriesName}}} {{{Name}}}",
                {{/if_equals}}

                {{#if_equals ItemType 'Episode'}}
                    "name": "Episode Added • {{{SeriesName}}} S{{SeasonNumber00}}E{{EpisodeNumber00}} ~ {{{Name}}}",
                {{/if_equals}}

                {{#if_equals ItemType 'Movie'}}
                    "name": "Movie Added • {{{Name}}}",
                {{/if_equals}}

                {{#if_equals ItemType 'Series'}}
                    "name": "Show Added • {{{SeriesName}}} {{{Name}}}",
                {{/if_equals}}

                "url": "{{ServerUrl}}/web/index.html#!/details?id={{ItemId}}&serverId={{ServerId}}"
            },
           

            "thumbnail":{
                "url": "{{ServerUrl}}/Items/{{ItemId}}/Images/Primary"
            },

            "description": "
            {{~#if_exist Overview~}}
                > {{{Overview}}}\n\n
            {{~/if_exist~}}

            {{~#if_exist ServerUrl~}}
                [**Watch Now** ]({{ServerUrl}}/web/index.html#!/details?id={{ItemId}}&serverId={{ServerId}})
            {{~/if_exist~}}

            {{~#if_exist Provider_imdb~}}
                • [**IMDb** ](https://www.imdb.com/title/{{Provider_imdb}}/)
            {{~/if_exist~}}

            {{~#if_exist Provider_anidb~}}
                • [**aniDB** ](https://anidb.net/anime/{{Provider_anidb}}/)
            {{~/if_exist~}}
           
            {{~#if_exist Provider_tmdb~}}
                {{~#if_equals ItemType 'Movie'~}}
                    • [**TMDb** ](https://www.themoviedb.org/movie/{{Provider_tmdb}})
                {{~else~}}
                    • [**TMDb** ](https://www.themoviedb.org/tv/{{Provider_tmdb}})
                {{~/if_equals~}}
            {{~/if_exist~}}

            {{~#if_exist Provider_tvmaze~}}
                {{~#if_equals ItemType 'Episode'~}}
                    • [**TVMaze** ](https://www.tvmaze.com/episodes/{{Provider_tvmaze}})
                {{~/if_equals~}}

                {{~#if_equals ItemType 'Series'~}}
                    • [**TVMaze** ](https://www.tvmaze.com/shows/{{Provider_tvmaze}})
                {{~/if_equals~}}
            {{~/if_exist~}}

            {{~#if_exist Provider_audiodbartist~}}
                • [**AudioDb** ](https://theaudiodb.com/artist/{{Provider_audiodbartist}})
            {{~/if_exist~}}

            {{~#if_exist Provider_musicbrainzartist~}}
                • [**MusicBrainz** ](https://musicbrainz.org/artist/{{Provider_musicbrainzartist}})
            {{~/if_exist~}}

            {{~#if_exist Provider_musicbrainztrack~}}
                • [**MusicBrainz Track** ](https://musicbrainz.org/track/{{Provider_musicbrainztrack}})
            {{~/if_exist~}}

            {{~#if_exist Provider_musicbrainzalbum~}}
                • [**MusicBrainz Album** ](https://musicbrainz.org/release/{{Provider_musicbrainzalbum}})
            {{~/if_exist~}}

            {{~#if_exist Provider_theaudiodbalbum~}}
                • [**TADb Album** ](https://theaudiodb.com/album/{{Provider_theaudiodbalbum}})
            {{~/if_exist~}}
            ",

            "color": "3381759",

            "footer": {
                "text": "{{{ServerName}}} ",
                "icon_url": "{{AvatarUrl}}"
            },

            "timestamp": "{{Timestamp}}"
        }
    ]
}

Let me know if I missed something, since this already worked for other TV Shows (e.g. Zack and Cody, Star Wars the Clone Wars)