Skip to content

Instantly share code, notes, and snippets.

@jagrosh
Last active July 17, 2025 23:46
Show Gist options
  • Save jagrosh/5b1761213e33fc5b54ec7f6379034a22 to your computer and use it in GitHub Desktop.
Save jagrosh/5b1761213e33fc5b54ec7f6379034a22 to your computer and use it in GitHub Desktop.
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings

  2. Select Add Webhook Add

  3. Paste in the webhook url and append /github to the end. Select "Send me everything", set the type to application/json, and then Add Webhook WebhookSettings

  4. Test it by updating something or starring the repository! If it works, you're all set! Star

@The-LukeZ
Copy link

The-LukeZ commented Sep 6, 2024

Hello I have a problem I cant see the description when i commit to main

Descriptions won't show up. I also noticed this.

@unenergizer
Copy link

I ended up using this Github Actions: https://github.com/marketplace/actions/actions-status-discord

Will I be able to show the entire commit message using this?

What I get on discord:
image
It truncates a large portion of my commit messages. This is how I show progress on my project(s).

@mrgoonie
Copy link

I ended up using this Github Actions: https://github.com/marketplace/actions/actions-status-discord

Will I be able to show the entire commit message using this?

What I get on discord: image It truncates a large portion of my commit messages. This is how I show progress on my project(s).

It totally depends on you, grab all commit messages in your action steps and pass them to this action in "description" param

I don't need that, just want the PR title, so this is what I got:
CleanShot 2024-11-23 at 16 31 15@2x

@AndyLevesque
Copy link

FYI - If wanting to send GitHub messages to a Discord forum thread, add "/github?thread_id=[thread number here from thread URL]"

@awalpremi
Copy link

Ty for this. Anyone know how to filter pull requests only? It would be ideal to have pull request opened and closed only to avoid clutter.

@The-LukeZ
Copy link

Ty for this. Anyone know how to filter pull requests only? It would be ideal to have pull request opened and closed only to avoid clutter.

image

Go here and only select the Pull requests.

@cdnghost
Copy link

How do I have this webhook pull posts from another discord server and post into mine? is that even possible?

@The-LukeZ
Copy link

The-LukeZ commented Jan 21, 2025 via email

@awalpremi
Copy link

Ty for this. Anyone know how to filter pull requests only? It would be ideal to have pull request opened and closed only to avoid clutter.

image

Go here and only select the Pull requests.

That was it, don't know how I missed it. Thanks

@mydkong
Copy link

mydkong commented Feb 1, 2025

Got it working:

1. delete hook

2. create new hook

3. add /github at the end,

4. select content type to `application/json`

my man <3 +1

Yes it's working <3

@hijuliancode
Copy link

Got it working:

1. delete hook

2. create new hook

3. add /github at the end,

4. select content type to `application/json`

my man <3 +1

Yes it's working <3

It works for me, thanks

@Ifycode
Copy link

Ifycode commented Feb 8, 2025

Very helpful, thank you. In my case I only needed it for issue ticket integration, so I selected "Let me select individual events" 👍🏼

@Jenspi
Copy link

Jenspi commented Feb 20, 2025

Works perfectly!

This is perfect for not needing to update my partners each time I make changes. Thank you for this! 🎉

@SchBenedikt
Copy link

Got it working:

1. delete hook

2. create new hook

3. add /github at the end,

4. select content type to `application/json`

my man <3 +1

Yes it's working <3

It works for me, thanks

Yes, now it works 👍

@Robicus
Copy link

Robicus commented Mar 6, 2025

The issue I have is that I'm not actually seeing messages in the payload that appears in Github:
image

This is for both the initial test ping event, in addition to be triggering an event by closing out a branch.

@Robicus
Copy link

Robicus commented Mar 7, 2025

The issue I have is that I'm not actually seeing messages in the payload that appears in Github: image

This is for both the initial test ping event, in addition to be triggering an event by closing out a branch.

Whooops. Had to make sure my user settings allowed showing previews.
image

@Akira-Kuru
Copy link

Tested it and it works overall but review_requested is missing and is the one I personally need to approve PRs

@geekelo
Copy link

geekelo commented Apr 6, 2025

IT WORKS FOR ME

  1. delete hook

  2. create new hook

  3. add /github at the end,

  4. select content type to application/json

@DanXoc
Copy link

DanXoc commented Jun 9, 2025

create new hook

@EwinSkyTech
Copy link

EwinSkyTech commented Jul 10, 2025

Hello there. I am an absolute noob. I am trying to use Webhooks in discord to get instagram feeds into my channel. I followed your instructions and I can not figure out where in the mentioned steps I can input the instagram profile of the user I need the feed from.

  1. Created Webhooks using spidey bot. 2. Input name and channel where the feed should land. 3 copy Webhook. 4. paste in Github creating a new Webhook. 5. add Webhooks.

In which of the above steps do I input the actual Instagram link? I am utterly confused

@qtqgyt
Copy link

qtqgyt commented Jul 14, 2025

Hello there. I am an absolute noob. I am trying to use Webhooks in discord to get instagram feeds into my channel. I followed your instructions and I can not figure out where in the mentioned steps I can input the instagram profile of the user I need the feed from.

  1. Created Webhooks using spidey bot. 2. Input name and channel where the feed should land. 3 copy Webhook. 4. paste in Github creating a new Webhook. 5. add Webhooks.

In which of the above steps do I input the actual Instagram link? I am utterly confused

What does any of this have to do with Instagram?

@EwinSkyTech
Copy link

Do you have any more questions for the noob?

@qtqgyt
Copy link

qtqgyt commented Jul 15, 2025

Do you have any more questions for the noob?

I don't understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment