In the CLI and REST API, event triggers are referred to as
webhook triggers. --type webhook is the value you pass when creating one.Supported services
Each integration page lists its events and the actions a trigger can narrow them to. Other built-in integrations give agents tools but don’t trigger them. A custom integration can define its own events.
Create an event trigger
1
Open your workspace
Go to app.guild.ai and open the workspace where the agent is installed.
2
Go to Triggers
In the workspace’s left nav, click Triggers under Run, then click Add Trigger.
3
Configure the event
Select Event, choose the connected service, the event type, and an optional event action.
4
Select an agent
Choose the agent the trigger will run. By default, the agent receives the event as its input; see Agent input.
5
Name the trigger
Enter a Name, such as
Nightly report. The name is required, up to 255 characters, and labels the trigger in the workspace’s Triggers list.With the CLI
Agent input
Event triggers use the same agent input editor as schedule triggers. Open the Edit Trigger dialog to edit it. On desktop, a schema-driven panel appears on the right side of the dialog. On mobile, a text field appears instead. When you create a trigger for a text-input agent, the field pre-populates with a prompt template based on the integration name, event type, and action. Saving it stores it as a custom agent input. The backend default input applies only when the input is empty, for example when Pass the webhook payload unaltered is selected.Default agent input
Without a custom input, what the agent receives depends on its input schema:- An agent that takes text, such as an
llmAgentwith its default schema, or an agent with no input schema, receives a prompt that names the integration, event, and action, followed by the event payload as JSON. When the event has no action, the prompt names the action asNone. - An agent with a structured input schema receives the payload itself.
Custom agent input
To control the input, provide a customagent_input object when creating the trigger. It replaces the default input. Guild substitutes these placeholders anywhere in its string values:
Use custom agent input when you want to:
- Add instructions or fixed settings alongside the webhook payload
- Fill the fields of a structured input schema, using placeholders for the event details
agent_input can also be set from the web UI when creating or editing an event trigger.
Pass the webhook payload unaltered
When you create or edit an event trigger in the web UI, select Pass the webhook payload unaltered to give the agent the default input instead of a template. Checking this option disables and clears the input editor. This option corresponds to an emptyagent_input in the CLI and REST API, which gives the agent the default input.
Toggling Pass the webhook payload unaltered is non-destructive. If you uncheck it, the input editor restores the agent input template you previously entered.
Scope events with service_config
Use service_config to restrict event triggers to specific repositories, channels, or projects. Event triggers accept an optional service_config JSON object. When you omit it or set it to null, the trigger matches all events of the selected type (for example, every repository or every channel). Bitbucket is the exception: its triggers require workspace_slug.
service_config must be a JSON object. Do not pass an array or string at the top level.
Pass service_config when you create or update a trigger with the CLI:
Update an event trigger
Related pages
- Identity mapping so event-started runs act as the member who caused the event
- Review every new GitHub pull request for a GitHub event trigger built end to end
- Answer questions when someone mentions your agent in Slack for a Slack event trigger built end to end
- Draft a reply to every new Zendesk ticket for a Zendesk event trigger built end to end
guild triggerfor every flag oncreateandupdate