Workflow Triggers
Triggers are the events that start your workflows. Choose the right trigger to ensure your automations fire at exactly the right moment in your user’s journey.How to Choose the Right Trigger
Contact Triggers
Events related to contact creation, updates, and list management.Example: Welcome New Users
Gameplay Triggers
Events that fire during user interactions with your experiences.Gameplay score variables
WhenGameplay.Ended fires, the trigger payload includes score data you can reference in downstream steps (filters, decisions, email/SMS templates, webhooks):
Score availability by card type:
- Quiz, Trivia, Predictive, Swiper, Memory Challenge — both
scoreandcorrectCountare populated - Treasure Hunt —
scoreis populated,correctCountisnull - Other card types — both values are
null
score exceeds a threshold) or to award bonus loyalty points proportional to correctCount.
Example: Lead Qualification Flow
Example: Route rejected receipts by reason
When a receipt validation is rejected, the rejection reason is exposed asevent.rejection_reason. You can reference it in split decisions, filters, and Liquid templates (for example, email content):
Prize Triggers
Events related to prize awards and winner management.Example: Winner Notification System
Card Triggers
Events related to card interactions and engagement.Example: Interest Tracking
Loyalty Triggers
Events related to loyalty program activities.Example: Tier Upgrade Celebration
Webhook Triggers
Events triggered by external systems sending data to your workflow’s webhook URL.How webhook triggers work
When you selectWebhook.Received as your trigger, Komo generates a unique webhook URL for your workflow. External systems can send HTTP POST requests to this URL to trigger the workflow.
You can define a JSON schema for your expected webhook payload. This schema tells the workflow editor what fields to expect, so you can reference them in your workflow steps using Liquid template variables.
Using webhook data in workflow steps
Once you define a schema for your webhook payload, the fields become available as Liquid template variables under thewebhook namespace. For example, if your webhook payload includes user_id and amount fields, you can reference them as:
{{ webhook.user_id }}{{ webhook.amount }}
address.city field can be referenced as {{ webhook.address.city }}.
Example: External purchase sync
Setting up a webhook trigger
- Create a new workflow and select Webhook.Received as the trigger event
- A unique webhook slug is generated for your workflow — this forms your webhook URL. You can regenerate the slug at any time if the URL needs to be rotated.
- Send a few sample requests to the webhook URL to capture draft events (see below), or define a request schema by hand using JSON Schema format to describe the expected payload structure
- Use the schema fields as Liquid variables in your workflow actions (e.g., email templates, contact updates, filters)
Capturing draft events
Before publishing your workflow, send sample requests to the webhook URL to capture real payloads as draft events. Komo stores the 10 most recent requests received against the trigger, so you can inspect them in the workflow editor and confirm the data looks right. Draft events make it much faster to wire up downstream steps because you can see exactly what each external system sends — including nested objects and arrays — without having to read the third-party docs first.Auto-generating a request schema
Once a draft event has been captured, you can generate a JSON schema from any sample payload with one click. Komo inspects the structure of the request body and produces a matching JSON Schema definition for you. This means you usually don’t need to write the schema by hand — just send a representative request, pick the draft event, and generate the schema. You can then edit the generated schema if you need to make fields optional, tighten types, or add validation rules.Schema validation and limits
To keep webhook triggers safe and performant, request schemas have a few limits:
An empty schema (
{}) or no schema at all is treated as “accept any payload” and skips these checks. Schemas must be valid JSON Schema (comments and trailing commas aren’t allowed).
Supported regex patterns
Komo blocks regex constructs that can enable catastrophic backtracking or stall the runtime. When you usepattern or patternProperties, the following are not supported:
- Backreferences (
\1,\k<name>) - Lookbehind assertions (
(?<=…),(?<!…)) - Atomic groups (
(?>…)) - Conditionals (
(?(…)…)) - Inline comments (
(?#…)) - Anchors
\A,\G,\Z, and\z(use^and$instead) - More than one broad wildcard repetition (for example two
.*/.+in the same pattern) - Unbounded repetition (
*,+,{n,}) applied to a group that contains alternation (|) - Unbounded repetition applied to a group that already contains unbounded repetition
- Adjacent unbounded repetitions (for example
a*b*)
(?=…), (?!…)) and non-capturing groups ((?:…)) are supported.
Komo validates the schema when you save it and surfaces a clear error for the exact path that’s invalid (for example, $.properties.email.pattern).
Webhook delivery requirements
When external systems send requests to your webhook URL, Komo enforces the following limits and behaviors:Request format
- Method:
POSTonly — other methods return405 - Body: JSON object (must be
Content-Type: application/json). Arrays and primitives are rejected with400 Invalid JSON Object - Maximum payload size: 512 KB. Larger requests return
413 Payload Too Large
Authentication
Webhooks are unauthenticated by default. If you add one or more webhook keys to a trigger, every request must include a matchingAuthorization: Bearer <token> header. Requests without a valid key return 401 Unauthorized.
Rate limits
Each webhook is rate-limited per 60-second window. Limits depend on your plan and the trigger mode:
When the limit is exceeded, requests return
429 Rate limit exceeded with the following headers:
X-RateLimit-Limit— your current limitRetry-After— seconds until the window resets (always60)
Schema validation at delivery time
If you define a request schema, every payload is validated against it. Requests that fail validation return422 and are not delivered to your workflow. Payloads that pass validation return 202 Accepted along with a trackingId you can use to correlate the request to a workflow run.
Response codes summary
Advanced Trigger Strategies
1. Trigger Stacking
Use multiple related triggers for comprehensive coverage:2. Qualification Layering
Combine broad triggers with specific filters:3. Time-Based Follow-ups
Chain triggers for timed sequences:Troubleshooting Triggers
Common Issues
Testing Tips
- Start with broad triggers - Use
Gameplay.Actionto see all events - Add logging - Use webhook actions to log trigger data
- Test with real data - Use actual user interactions, not simulated events
- Monitor execution volume - Check Workflow Runs for unexpected patterns
Best Practices
✅ Do This
- Be specific - Use qualified triggers when possible (
DataCapturedQualifiedvsDataCaptured) - Add context filters - Narrow scope with contact properties or gameplay data
- Plan for scale - Consider execution volume for broad triggers
- Document trigger purpose - Name workflows clearly to indicate trigger intent
❌ Avoid This
- Don’t use overly broad triggers without filters (
Contact.PropertyUpdatedwithout field specification) - Don’t stack identical triggers - Combine similar workflows instead
- Don’t ignore data availability - Ensure required data exists when trigger fires
- Don’t skip testing - Always verify triggers fire as expected
What’s Next?
- Browse workflow actions → - Explore actions to pair with these triggers
- Back to workflows guide → - Return to main workflows documentation
