Configuring a GitHub Organization web trigger in an automation

Configure GitHub Organization web trigger to trigger an action whenever an event occurs in the organization. This example shows how to create a Task Bot with GitHub Organization web trigger to display the body text of an issue in a message box.

When the owner of the Personal Access Token specified in the settings creates an issue in any repository within the specified GitHub organization, the trigger starts the configured Message box action.

Prerequisites

Ensure that you meet the following requirements:
  • License and permissions mentioned in GitHub web triggers.
  • An active GitHub personal access token stored as a credential in your Credential Vault.
  • A record variable named TriggerData.

Procedure

  1. Perform the following steps to create a Task Bot
    1. On the left pane, click Automation.
    2. Click Create > Task Bot.
      The Create Task Bot wizard appears.
    3. Enter an appropriate name for the bot in the Name field.
      All the bots are stored in <\Bots> folder by default.
    4. Optional: Add a description for the bot in the Description field.
    5. Optional: Click Choose and follow the prompts to save the bot in a different folder.
    6. Click Create & Edit.
      The bot is created and the Edit Task Bot page appears.
  2. Perform the following steps to add and configure the GitHub Organization trigger.
    1. Select Triggers > GitHub, and then double-click Organization web trigger to add the web trigger.
    2. Select Issues from the Listen to event drop-down.
    3. Enter the organization name in the Organization name field.
      The trigger monitors this organization for the event.
    4. Select Personal Access Token > Credential, and click Choose.
      The trigger activates the subsequent action only if the user who owns this Personal Access Token creates the issue.
    5. Follow the prompts in Pick a credential modal and choose the Personal Access Token stored in the Credential Vault.
    6. Select TriggerData in Response dropdown.
      This record variable captures the trigger response data about the event in which the change occurred in a key-value pair format.
  3. Perform the following steps to add and configure the Message Box action.
    1. Click Actions > Message Box, and add Message Box action.
    2. Enter an appropriate title for the message box in Enter the message box window title.
    3. Enter $TriggerData{issue.body}$ in Enter the message to display.
      The issue.body key from the trigger response data contains the body of the created issue as the corresponding value.
  4. Click Save to save the configuration.
When you click Run > Run with triggers, the system activates the trigger and the trigger starts listening for Issues events in the specified GitHub organization. When a user creates an issue in any repository within the organization, the trigger starts the Message Box action. The message box displays the body text of the created issue.