Log in
Sign up
Loading
  • Home

  • Automation with Zapier

  • Zapier tutorials

Zapier tutorials

5 min read

How to integrate GitHub with Slack

By Will Harris · September 29, 2022

GitHub has been one of the most popular software development platforms for some time now. With the ability to carefully control adjustments and changes to your code—and who's contributing to it—it's one of the most widely-used platforms for engineering teams of all sizes.

But, even though GitHub is a hub (pun intended) of collaboration for engineers, most teams usually use more than just GitHub to work together. They also typically need messaging platforms like Slack to chat and get work done. And when teams are using multiple platforms to communicate and make decisions, things can get a little messy.

How do you fix that? Combine the two! Even better—do it automatically. By integrating GitHub and Slack through Zapier, you can easily automate tasks and information sharing between these two tools to make sure your team stays in sync.

Skip ahead

  • Popular ways to integrate GitHub with Slack

  • How to integrate GitHub with Slack

Popular ways to integrate GitHub with Slack

There are plenty of ways to integrate GitHub and Slack—but where should you start? Well, at Zapier, when thinking of tasks to automate, we look for the following:

  • Is it a task that's manual and tedious?

  • Do you have to perform the task frequently?

  • Does the task only require a low level of thinking?

  • Does the task get in the way of more important work?

If your task checks these boxes, it's probably a good idea to automate it! Here are some of the most popular ways people are using Zapier to integrate and automate with GitHub.

1. Get notifications in Slack for new GitHub mentions

If Slack is your main hub for team communication, but you're also communicating in GitHub, it's easy to miss a notification here and there. With Zapier though, there's a way to make sure your team never misses a GitHub mention again.

Using the Zap templates below, you can send each GitHub mention as a custom notification in Slack—either in a channel or as a private message. This way, you can keep all of your conversations in one place, even when they're taking place across platforms.

Send new GitHub mentions to Slack as messages

Send new GitHub mentions to Slack as messages
  • GitHub logo
  • Slack logo
GitHub + Slack

2. Send GitHub pull requests as Slack messages

Keeping your team in the loop on everything happening in GitHub can be a tedious task—which means it's ripe for automation. If you're tired of posting every GitHub pull request in the team channel, it's time to use the Zap template below. 

With this workflow, you can send a custom message to your Slack channel every time a pull request is created in GitHub—keeping your team in the loop and saving you time.

3. Get notifications for new GitHub commits

Keep version control under control by ensuring that your team never misses a commit. With this Zap template, you can send a custom message to a particular Slack channel every time a new GitHub commit is created.

4. Get Slack notifications for new GitHub issues

Need help staying on top of GitHub issues? This Zap template will automatically post a custom message to Slack for each new GitHub issue opened in a particular repository. This way, you can make issues more visible to your team and make sure they get resolved.

5. Create GitHub issues from new Slack messages

Most of the workflows we've highlighted focus on getting information from GitHub to Slack—but what about the other way around?

If you ever have team members surface problems in Slack that require a GitHub issue, you can also do that automatically. Using this workflow, you can create new issues in GitHub every time a message is posted in a particular channel—helping everyone on your team get involved.

Integrate GitHub with Slack

There are plenty of ways to integrate GitHub and Slack to better manage communication across your team. To show you how to get set up, we'll walk through one of the workflows mentioned above—getting notifications in Slack for new GitHub commits.

Before you begin

Before you create a Zap that integrates GitHub with Slack, you'll need to create a Zapier account if you don't have one already. Don't worry, creating an account is easy and free. Just head right here. You'll also need GitHub and Slack accounts.

Once you're signed in, you can create new Zaps using the Create Zap button or by going to zap.new. You can use these same steps for however you'd like to connect GitHub and Slack.

Step 1: Connect your trigger app

A Zap always consists of two parts:

  1. The trigger: an event that starts a Zap. 

  2. The action: an event a Zap performs after it's triggered. A single Zap can perform more than one action.

Depending on the workflow you're setting up, your trigger app could be Slack or GitHub. 

Search for and select your trigger app. In our example, we'll select GitHub for our trigger app.

Screenshot of GitHub as the trigger app in the Zapier builder.

Then select your trigger event. If your trigger app is GitHub, there are plenty of triggering events to choose from, like a new issue, pull request, mention, commit, branch, etc.

Screenshot selecting the trigger event for GitHub in the Zapier builder.

For our example, we're going to choose New Commit as our trigger event. Once you've selected your trigger event, click Continue.

Screenshot selecting a GitHub trigger event.

Next, connect your trigger app account to Zapier by clicking on the dropdown menu and selecting +Connect a new account. We'll connect GitHub in our example. You'll need to give Zapier permission to access your account. Once you've connected your account, select it from the dropdown menu and click Continue.

Screenshot connecting a GitHub account to Zapier.

From there, set up your trigger step by filling in the trigger step fields. Depending on your trigger app and event, you'll have different fields to customize. In our example, we'll select the repository we want to use in GitHub, as well as the Head.

Screenshot setting up the details of a GitHub trigger event in Zapier.

When you're done customizing your trigger step, click Continue.

Then, click Test Trigger, so Zapier will create a test event to make sure the trigger is working properly. Once the test runs successfully, click Continue.

Screenshot of a successful trigger event test in Zapier.

Step 2: Connect your action app

In this next step, you'll set up the action—the event your Zap will perform once it's triggered. Start by searching for and selecting your action app. We'll use Slack in our example.

Slack being selected as the action event in Zapier.

Next, choose your action event. If your action app is Slack, your Zap can do things like add a reminder, send a channel message, update a status, and more.

Dropdown of event field options from Slack.

Select your action event and click Continue. We're going to select Send Channel Message for our example.

Next, connect your trigger app account to Zapier by clicking on the dropdown menu and selecting +Connect a new account. We'll connect Slack in our example. You'll need to give Zapier permission to access your account. Once you've connected your account, select it from the dropdown menu and click Continue.

Connecting a Slack account to Zapier.

Next, set up your action by filling in the action step fields. Depending on your action app and event, you'll have different fields to customize. In our example, we'll add which Slack channel to send the message to. 

You can also customize your action step with data from your trigger step. For example, to pull in data from your GitHub step—like the link to view the commit in GitHub—click in the Message Text Field and select the data you'd like to use from the dropdown.

Customizing the action step between GitHub and Slack.

Once you've customized your action step how you'd like, click Continue.

Now it's time to test your action. When you click Test & Review or Test & Continue, Zapier will send test data to your action app. In our example, Zapier will send a Slack notification to our chosen Slack channel according to how we set the notification up. We always recommend testing your Zap to check if your step looks ok. But if you'd rather skip the test, just click Skip Test in the bottom-right corner.

A successful test of the Slack action event in Zapier.

Once everything looks good, your Zap is ready to go! 

Integrate GitHub and Slack with Zapier

Communication across platforms can get messy. By using Zapier to integrate GitHub with Slack, you can make sure all of the important action in GitHub makes it to Slack, giving you a single source to catch updates of all kinds.

New to Zapier? It's an automation tool that helps anyone connect apps and automate workflows—without any complicated code. Sign up for free to use this app, and many others, with Zapier.

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'