- 19 Jan 2023
- 3 Minutes to read
- Print
- DarkLight
Airtable automation actions: GitHub Issues
- Updated on 19 Jan 2023
- 3 Minutes to read
- Print
- DarkLight
This article covers the process of adding an automation action that will either create a new issue or update an issue in the GitHub repository of your choice. You might also be interested in our GitHub Sync integration offering. It's worth noting that these automation actions only work with GitHub Enterprise Cloud or GitHub.com. These actions do not work with GitHub Enterprise Server.
Initial setup
If you’ve already started thinking about how you want to use this action in your automation, then it is time to start building in Airtable. The first step is to find the "Automations" button near the upper right portion of your Airtable base. Then click on the option to "Create a custom automation."
After clicking to create a new custom automation, you will have the option to rename the option. You can change this later as well. For this example, we will be creating a new GitHub issue, but the process is much the same for updating a GitHub issue. You'll then need to choose a trigger.
Set the trigger
In this case, we choose to use the "When record matches conditions" trigger type. We've added a checkbox field in the "Issues" table that will serve as a good way to parse out which issues are ready to be sent over to GitHub. You could follow a similar workflow when setting up your base to work with the update issue automation action.
As always, make sure you run a test. When it runs successfully, you can then move on to the action portion of the automation.
Set the action
Now to add the action. This flow is using the example of adding the "Create issue" action, but as you can see the "Update issue" action is just below. Click whichever action you are wanting to set up.
If this is your first time connecting Airtable to your GitHub account, then you will need to authenticate your account and authorize Airtable's usage. You will also need to install the Airtable GitHub app which you can click to download within the sync setup window or by clicking here. This is a requirement on GitHub's end that is needed to allow this sync to work. The installation screen will look like this:
For more on authentication and authorization, click to jump to that section below.
After connecting your account and installing the app, you will see the action step portion of the automation window populate with some dropdown menus. You'll first need to choose one of your GitHub repositories (repos) where the issues will be stored.
Next, you'll want to match the fields (or static information) from your Airtable base to the corresponding GitHub fields. Currently, there are 5 fields that are able to be customized:
- Title (*required)
- Body
- Milestone
- Labels
- Assignees
Additionally, the Milestone, Labels, and Assignees fields can be set up to be set up statically or dynamically. Static choices are limited to the options in the dropdown menu for each field, whereas dynamic values will be inputted based on information coming from previous steps in your automation's setup. Clicking the cogwheel icon next to each field will allow you to see more specifics about the dynamic setup.
Once you've set up the various fields in the action step that you'd like to send over to GitHub when you create the issue you can test the automation step. This is a good point to check your GitHub repository to see if everything is populating as intended. The process can be trial and error depending upon your setup. Once the action step has been tested successfully, you will some information appear. Particularly, you'll see a link to the exact GitHub issue that was created at the bottom of the test.
You can now turn the automation on!
Security and OAuth scopes
Authentication and authorization
The authentication window will lead to an authorization window. Authorizing allows us to verify your GitHub identity, know which resources you can access, and act on your behalf.
Airtable only supports a single GitHub external account type, so the scopes listed below are used for the external source sync as well as the GitHub automation actions.
Airtable will only have access to the issues that the user who connected the GitHub account has access to. Furthermore, it will only have access to issues in repositories that the Airtable Connector GitHub App is installed in. If the user who connected the GitHub account leaves the company and their GitHub account gets deactivated, the sync and automation actions will stop working.
For more information on GitHub scopes, check out GitHub's documentation here.