Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Set up bi-directional webhook for the GitHub spoke

Configure webhook to subscribe to GitHub with a ServiceNow callback URL.

[Omitted video] Description: Demonstrates setting up bi-directional webhook for the GitHub spoke.

Before you begin

  • Request Integration Hub subscription
  • Activate the GitHub spoke
  • Role required: admin

Register GitHub webhook in ServiceNow

Register a GitHub in ServiceNow to notify the ServiceNow app when certain events occur in GitHub.

Before you begin

Role required: admin

Procedure

  1. Navigate to All > GitHub Webhooks > GitHub Webhook Registries.

  2. Click New.

  3. On the form, fill in the fields.

    FieldDescription
    NameUnique name to identify the record. For example, GitHub webhook.
    DescriptionDescription of the record.
  4. Right-click the form header and click Save.

  5. Click Callback URL.

    The system displays the Webhook Callback URL and Webhook Secret.

Image omitted: github-webhook-url-secret.png
Values of the generated Webhook Callback URL and Webhook Secret.
  1. Copy and record the values of Webhook Callback URL and Webhook Secret.

Result

The GitHub webhook is registered in your ServiceNow instance.

Add Callback URL in GitHub

Provide Webhook Callback URL in GitHub account to create webhook.

Before you begin

Role required: admin

Procedure

  1. Log in to your GitHub account.

  2. Navigate to the required repository.

  3. Select Settings.

  4. On the left panel, select, Webhooks.

  5. Select Add Webhook.

  6. Enter Webhook Callback URL in Payload URL and Secret in Secret.

    See the GitHub Developer documentation for instructions on creating and configuring a webhook.

    Note: GitHub spoke supports application/json payload. Configure the GitHub webhook accordingly. See the GitHub Developer documentation for instructions on creating and configuring a webhook.

Result

The Callback URL is added in the GitHub account. You can create routing policies and subflows as per your requirement. See Customize a bi-directional webhook for information regarding creating new routing policies and subflows.

Customize bi-directional webhook in the GitHub spoke

Create webhook routing policy and subflow as per your requirement in the GitHub spoke.

Before you begin

Role required: admin

About this task

The default routing policy in the GitHub WebHook Routing Policies modules triggers the relevant GitHub subflow and notifies the ServiceNow app when certain events occur in GitHub. See GitHub Spoke for information about the GitHub fields that the default routing policy supports and the GitHub events that the subflows support. To use any other fields in your custom subflow and customize conditions in the routing policy, perform these steps.

Procedure

  1. Navigate to All > Process Automation > Workflow Studio.

  2. Click Subflows.

  3. Create a copy of the required subflow.

  4. Customize the required subflow as per your requirement and publish it.

    See Building subflows for more information about creating and using subflows and GitHub Spoke for information about the GitHub fields that the default routing policy supports and the GitHub events that the subflows support.

  5. Navigate to GitHub Webhooks > GitHub WebHook Routing Policies.

  6. Click New.

  7. On the form, fill in the fields.

FieldDescription
LabelUnique label to identify the routing policy.
Default answerOption to specify if this is the default answer. Default answer is applicable when the conditions are not met.
ConditionConditions to be met when the required events occur in GitHub. See GitHub Spoke for information about the supported fields.
Answer

Subflow that has to be triggered when the specified conditions are met.1. Click the Lookup icon. 2. Select the required subflow from the Document: list.

Note: Ensure that the Table name is Flow [sys_hub_flow].

  1. Click Submit.

    Note: These routing policies are saved in the Decision tables. Users are cautioned against directly updating or modifying data in these tables.

Result

Routing policy and subflow are created.