Triggers

Triggers define how workflows start in ADK Studio. Every workflow begins with a Trigger node that determines the entry point β€” whether from user input, an HTTP webhook, a cron schedule, or an external event.

Trigger Properties Panel

Trigger Types

TypeDescriptionUse Case
ManualUser-initiated via chat inputInteractive agents, testing
WebhookHTTP endpoint (POST/GET)API integrations, CI/CD pipelines
ScheduleCron-based timingPeriodic reports, data sync
EventExternal system eventsMicroservice orchestration, event-driven workflows

Manual Triggers

The default trigger type. When a workflow has a manual trigger, the chat input is shown with a configurable label and placeholder.

Configuration:

PropertyTypeDefault
inputLabelstring"Enter your message"
defaultPromptstring"What can you help me build with ADK-Rust today?"

The input label appears above the chat input field, and the default prompt is used as placeholder text.


Webhook Triggers

Expose an HTTP endpoint that starts the workflow when called. Useful for integrating with external services, CI/CD pipelines, or other applications.

Configuration:

PropertyTypeDescription
pathstringURL path (e.g., /my-webhook)
methodGET, POSTHTTP method to accept
authnone, bearer, api_keyAuthentication requirement

Endpoints

Each webhook trigger creates two endpoints:

EndpointBehavior
/api/projects/:id/webhook/*pathAsync β€” returns session ID immediately
/api/projects/:id/webhook-exec/*pathSync β€” waits for workflow completion and returns result

GET webhooks also work:

GET /api/projects/:id/webhook/my-path?message=Hello

Authentication

Bearer token:

curl -X POST "http://localhost:3000/api/projects/{id}/webhook/my-path" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message": "Process this"}'

API key:

curl -X POST "http://localhost:3000/api/projects/{id}/webhook/my-path" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Process this"}'

Webhook Event Notifications

Subscribe to real-time webhook execution events via SSE:

GET /api/projects/:id/webhook-events

This stream emits events as webhooks are received and processed.


Schedule Triggers

Run workflows on a recurring schedule using cron expressions.

Configuration:

PropertyTypeDescription
cronstring5-field cron expression
timezonestringIANA timezone (e.g., America/New_York)
defaultPromptstring?Input text sent when schedule fires

Cron Syntax

Standard 5-field cron expressions:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0-59)
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0-23)
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of month (1-31)
β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1-12)
β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of week (0-6, Sun=0)
β”‚ β”‚ β”‚ β”‚ β”‚
* * * * *

Examples:

ExpressionMeaning
* * * * *Every minute
0 9 * * *Daily at 9:00 AM
0 0 * * 0Weekly on Sunday at midnight
0 */6 * * *Every 6 hours
30 8 * * 1-5Weekdays at 8:30 AM

The schedule service tracks last_executed timestamps to prevent duplicate runs.


Event Triggers

Start workflows in response to external system events. Events are matched by source and eventType, with optional JSONPath filtering on the event data.

Configuration:

PropertyTypeDescription
sourcestringEvent source identifier (e.g., payment-service)
eventTypestringEvent type to match (e.g., payment.completed)
filterstring?JSONPath expression to filter events

Sending Events

curl -X POST "http://localhost:3000/api/projects/{id}/events" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "payment-service",
    "eventType": "payment.completed",
    "data": {
      "orderId": "12345",
      "amount": 99.00,
      "status": "active"
    }
  }'

JSONPath Filters

Filter events so the workflow only triggers when specific conditions are met:

Filter ExpressionMatches When
$.data.status == 'active'Status field equals "active"
$.data.amount > 100Amount exceeds 100
$.data.priority == 'high'Priority is "high"

Events that don't match the filter are silently ignored.


Trigger-Aware Run Button

The Studio UI adapts based on the active trigger type:

  • Manual β€” Standard chat input with the configured label and placeholder
  • Webhook β€” Run button sends a simulated webhook payload
  • Schedule β€” Run button sends the configured default prompt
  • Event β€” Run button sends a simulated event payload

When a workflow has changed since the last build, the Send button transforms into a Build button to prompt recompilation.


API Reference

EndpointMethodDescription
/api/projects/:id/webhook/*pathPOST, GETAsync webhook trigger
/api/projects/:id/webhook-exec/*pathPOSTSync webhook trigger (waits for result)
/api/projects/:id/webhook-eventsGETSSE stream for webhook notifications
/api/projects/:id/eventsPOSTEvent trigger

Previous: ← Action Nodes | Next: Development Guidelines β†’