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.
About this task
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.
Before you begin
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
-
Perform the following steps to create a Task Bot
-
On the left pane, click Automation.
-
Click .
The Create Task Bot wizard appears.
-
Enter an appropriate name for the bot in the
Name field.
All the bots are stored in <\Bots> folder by default.
- Optional:
Add a description for the bot in the Description
field.
- Optional:
Click Choose and follow the prompts to save the
bot in a different folder.
-
Click Create & Edit.
The bot is created and the Edit Task Bot page
appears.
-
Perform the following steps to add and configure the GitHub Organization trigger.
-
Select , and then double-click Organization web
trigger to add the web trigger.
-
Select Issues from the Listen to
event drop-down.
-
Enter the organization name in the Organization
name field.
The trigger monitors this organization for the event.
-
Select , and click Choose.
The trigger activates the subsequent action only if the user who owns
this Personal Access Token creates the issue.
-
Follow the prompts in Pick a credential modal
and choose the Personal Access Token stored in
the Credential Vault.
-
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.
-
Perform the following steps to add and configure the Message Box action.
-
Click , and add Message Box action.
-
Enter an appropriate title for the message box in Enter the
message box window title.
-
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.
-
Click Save to save the configuration.
Results
When you click , 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.