SelfHostCorner

MediaCowboy
MediaCowboy

Posted on • Originally published at mediacowboy.tech on

Connecting Ghost to Discord for Post Notifications

Connecting Ghost to Discord for Post Notifications

So after many hours and pulling out my hair. I was finally able to make this all work.

To begin, you will want to ensure you have a discord server setup and the appropriate permissions to post the desired channel. So, for example, to make this work for the server I set up.

You'll want to go to your desired channel, for me it was my blog channel, and selected the edit channel option.

Connecting Ghost to Discord for Post Notifications

From this menu go to integrations and then click Create Webhook.

Connecting Ghost to Discord for Post Notifications

Now here we will name the webhook. As you can see I named mine the same as the name as me and used the same logo.

Connecting Ghost to Discord for Post Notifications

One last thing to do before we leave this screen and start connecting Ghost to Discord. Make sure to click the "Copy Webhook URL".

Now after clicking that, I would go to the Permissions tab and allow @everyone to view the channel but turn off everything but View Channel, add reactions, use external Emoji, Use External Stickers, and Reda Message History. Essentially we are creating a read-only channel as the only thing this channel will do is notify members of the Discord server that there is a new blog post.

Now login to the dashboard of your Ghost Blog. From here we want to select the gear that is in the bottom left corner next to the light or dark theme switch.

Connecting Ghost to Discord for Post Notifications

From this screen, we will click on the integrations option under advanced.

Connecting Ghost to Discord for Post Notifications

Now select Slack.

Connecting Ghost to Discord for Post Notifications

Almost done I promise. Now on this screen, we will paste the webhook that we copied from Discord into the Webhook URL Text box with one minor tweak. At the end add /slack to it. So it will look like something below.

https://discord.com/api/webhooks/_yourdiscordwebhookkey_/slack

Connecting Ghost to Discord for Post Notifications

Next type in a username. This step may be optional but after pulling my hair I figured why not. As you can see from above I made it the same username I called my boy.

Now click "Send test notification" and you are done. Make sure to save it.

Bonus Points:

When publishing your block you will want to make sure that you click the show right menu and type in an excerpt. It will help with the formatting of what is shown in Discord.

Top comments (1)

Collapse
 
perronedotdev profile image
perronedotdev • Edited on

Nice write up! My site isn't big enough to need a discord server, but maybe this will come in handy some day. Keep up the good work!