text stringlengths 0 59.1k |
|---|
"triggerMetadata": { |
"provider": "slack", |
"triggerKey": "slack.messagePosted", |
"eventType": "message", |
"eventSubtype": null, |
"teamId": "T0123456", |
"eventId": "Ev1234567890", |
"channelId": "C0123456", |
"userId": "U0123456", |
"configuredChannelId": "C0123456" |
}, |
"input": { |
"type": "message", |
"channel": "C0123456", |
"text": "Hello from VoltOps!", |
"user": "U0123456", |
"ts": "1731000000.000200" |
} |
} |
``` |
## Add Target to Activate Binding |
After configuring your Slack trigger, add a target (agent or workflow) to activate the binding. For detailed instructions on: |
- Adding targets to activate bindings |
- Mapping trigger data to agent inputs |
- Testing triggers with sample payloads |
- Deploying and monitoring triggers |
See the [Add Target to Activate Binding section](https://voltagent.dev/automations-docs/triggers/overviewusage/#step-3-add-target-to-activate-binding). These steps are the same for all trigger providers. |
<|endoftext|> |
# source: VoltAgent__voltagent/website/actions-triggers-docs/triggers/github.md type: docs |
--- |
title: GitHub Trigger |
--- |
import GitHubEventTypes from "@site/src/components/blog-widgets/GitHubEventTypes"; |
The GitHub trigger responds to webhook events from your repositories in real-time. When events like pushes, pull requests, issues, or releases occur, VoltOps executes your configured agents or workflows. |
For trigger setup and usage instructions, see the [Usage Guide](https://voltagent.dev/automations-docs/triggers/overviewusage/). |
**Use Cases**: |
- Run code review agents when pull requests are opened |
- Automate issue triage and labeling |
- Trigger deployments on release events |
- Monitor security advisories and vulnerabilities |
- Sync repository changes across systems |
## Setting Credential |
To set up GitHub authentication, you need to create a credential. This is configured in **Step 1 (Connection)** when creating a trigger. |
1. Navigate to the [VoltOps Triggers page](https://console.voltagent.dev/triggers) |
2. Select GitHub as the provider |
3. In the **Connection** step, either select an existing credential or create a new one |
4. Choose between Personal Access Token or OAuth 2.0 and follow the instructions below. |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
<source src="https://cdn.voltagent.dev/console/trigger/github/github-credentials.mp4" type="video/mp4" /> |
Your browser does not support the video tag. |
</video> |
<br/> |
<br/> |
### Personal Access Token |
**Create your token:** |
1. Visit [github.com/settings/tokens](https://github.com/settings/tokens) |
2. Click **Generate new token** → **New personal access token (classic)** |
3. Create a personal access token with `repo` and `admin:repo_hook` scopes |
**Configure in VoltOps Console:** |
1. Enter your **Personal Access Token** so VoltOps can create and verify repository webhooks |
2. VoltOps generates and stores the webhook secret. No additional configuration is required |
3. Configure optional fields: |
- **GitHub Server**: Update if using GitHub Enterprise (e.g., `https://github.example.com/api/v3`). Default: `https://api.github.com` |
- **Repository Owner**: Optional default repository owner |
- **Account Label**: Optional label for organization or user |
### OAuth 2.0 |
OAuth 2.0 supports token rotation and revocable access. |
**Setup steps:** |
1. Copy the **OAuth Redirect URL** displayed in the console (e.g., `https://api.voltagent.dev/triggers/oauth/callback/github`) |
2. Navigate to [GitHub Settings → Developer settings → OAuth Apps](https://github.com/settings/developers) and create a new OAuth App |
3. Provide a name and homepage URL for your OAuth App |
4. Paste the OAuth Redirect URL as the **Authorization callback URL** in GitHub |
5. Generate a **Client ID** and **Client Secret** in GitHub, then enter them in VoltOps Console |
6. Configure optional fields: |
- **GitHub Server**: Update if using GitHub Enterprise (e.g., `https://github.example.com/api/v3`). Default: `https://api.github.com` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.