Set up the GitHub spoke
- UpdatedJan 20, 2025
- 3 minutes to read
- Xanadu
- Now Platform Capabilities
Integrate your ServiceNow instance with the GitHub and GitHub Enterprise Server to automate flows and perform actions on GitHub and GitHub Enterprise Server. For example, create a flow that creates a branch on GitHub and retrieves its details.
Before you begin
- Request an Integration Hub subscription.
- Activate the GitHub spoke.
- An account with GitHub to create personal access tokens.
- If you are using GitHub Enterprise server, an account to create personal access tokens.
- Role required: admin.
Procedure
-
Generate a personal access token in GitHub account.
- Log in to https://github.com/.
-
On the dashboard, select your profile icon.
- Select Settings.
- In the Settings page, on the left panel, select Developer settings.
- In the Developer settings page, on the left panel, navigate to Personal access tokens > Tokens (classic).
- Select Generate new token > Generate new token (classic).
- In Note, enter a description or purpose of the personal access token.
- In Expiration, set the expiry period of the token or select No expiration.
- Under the Select scopes heading, select the scopes that define the access for the personal access token you’re generating.
-
Select Generate token.
The personal access token is generated.
-
To copy the personal access token, select the copy button.
Important: Keep the personal access token at a secure place. You’ll need it when you create a connection record for GitHub.
-
Configure the connection record that connects your ServiceNow instance with GitHub.
- Log in to your ServiceNow.
- Navigate to All > Process Automation > Workflow Studio.
- Click the Integrations tab.
- Under Connections, toggle and enable the Outbound connections.
-
Locate the GitHub connection alias and click View Details.
If you are configuring the spoke for the first time, click Configure. Otherwise, click Edit.
-
On the form, fill the details.
Table 1. Configure Connection form Field Description Connection Name Name of the connection. Note: The default and read-only name of the first connection record is GitHub.Connection URL URL to connect to GitHub. Enter https://api.github.com. Use Mid Server - Enter 1 if your ServiceNow instance requires a MID Server to connect with GitHub.
- Enter 0 if your ServiceNow instance does not require a MID Server to connect with GitHub.
Important: To enable this option, you must already have a MID Server set up on your instance. See MID Server for detailed instructions.API Key Personal access token that you had generated on GitHub. -
Select Create Connection.
The GitHub connection record is created.
-
If you are using GitHub Enterprise server, configure the GitHub Server connection.
Important: Generate a personal access token on the GitHub Enterprise server.
To learn to generate a personal access token on the GitHub Enterprise server, see Integrate with GitHub Enterprise Server.
- Select the GitHub Server connection card.
- Select View Details.
-
Fill the form.
Table 2. Configure Connection form Field Description Connection Name The name of the connection. Note: The default and read-only name of the first connection record is GitHub Server. To create a connection with your custom name, select Add Connection and fill the form.Connection URL URL of your GitHub instance. Use Mid Server - Enter 1 if your ServiceNow instance requires a MID Server to connect with the GitHub Enterprise server.
- Enter 0 if your ServiceNow instance does not require a MID Server to connect with the GitHub Enterprise server.
Important: To enable this option, you must already have a MID Server set up on your instance. See MID Server for detailed instructions.API Key Personal access token that you had generated on the GitHub Enterprise Server. -
Select Create Connection.
The GitHub Enterprise Server connection record is configured.