Skip to main content

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 ended fires as soon as the player finishes the game. On cards where the entry form appears after gameplay (for example Photo Frame, where the form opens after the photo is created), Gameplay ended can fire before the player submits the form, so the workflow may run without the form details (for example email) or for players who never submit.If the workflow depends on the form details (sending a coupon or email, syncing to a CRM/Braze, adding to a list), use Data captured instead, which fires when the form is submitted.

Gameplay score variables

When Gameplay.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 — both score and correctCount are populated
  • Treasure Hunt — score is populated; correctCount is the completed checkpoint count
  • Memory Challenge — score is populated; correctCount is null
  • Other card types — both values are null
Use these variables to branch on performance (for example, only send a “high score” email when 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 as event.rejection_reason. You can reference it in split decisions, filters, and Liquid templates (for example, email content):
In an email template you can surface a friendly message based on the reason:

Coupon Triggers

Events related to coupon issuance and redemption. Use these when you need automations that react to coupons themselves (including coupons issued from a workflow Issue coupon step), not only prizes.

Filters and data

Both coupon triggers support these filters:
  • Coupon is
  • Coupon is in
  • Coupon is not
  • Coupon is not in
Each run is tied to the contact who was issued or redeemed the coupon. Event data fields: Pair the trigger with actions such as Add to list, Update, Send email, or Send HTTP request. Award points only appears if the workspace has the Loyalty Programs feature.

Example: Reminder list after coupon issue

Example: Follow up on redemption

Survey Triggers

Filters and data

Survey Completed supports these filters:
  • Survey is
  • Survey is in
  • Survey is not
  • Survey is not in
A workflow can also be scoped to one survey under Scope → Optional Scope → Survey. Each run is tied to the contact who completed the survey. Event data fields: Pair it with actions such as Add to list, Update, and Send email.

Example: Survey completion follow-up

Challenge Triggers

Events related to challenge progress, completion, and streak management. Filter these triggers to scope automations precisely.

Available filters

Challenge trigger filters are scoped per event:
  • Challenge — available on every Challenge trigger
  • Goal — only on Challenge.GoalCompleted and Challenge.GoalMilestoneCompleted
  • Milestone — only on Challenge.GoalMilestoneCompleted

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 select Webhook.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 the webhook namespace. For example, if your webhook payload includes user_id and amount fields, you can reference them as:
  • {{ webhook.user_id }}
  • {{ webhook.amount }}
Nested fields use dot notation. For example, a payload with a nested address.city field can be referenced as {{ webhook.address.city }}.

Example: External purchase sync

Setting up a webhook trigger

  1. Create a new workflow and select Webhook Received as the trigger event
  2. 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.
  3. 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
  4. 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 use pattern 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*)
Lookahead ((?=…), (?!…)) 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: POST only — other methods return 405
  • Body: JSON object (must be Content-Type: application/json). Arrays and primitives are rejected with 400 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 matching Authorization: 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 limit
  • Retry-After — seconds until the window resets (always 60)

Schema validation at delivery time

If you define a request schema, every payload is validated against it. Requests that fail validation return 422 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

  1. Start with broad triggers - Use Gameplay.Action to see all events
  2. Add logging - Use webhook actions to log trigger data
  3. Test with real data - Use actual user interactions, not simulated events
  4. Monitor execution volume - Check Workflow Runs for unexpected patterns

Best Practices

✅ Do This

  • Be specific - Use qualified triggers when possible (DataCapturedQualified vs DataCaptured)
  • 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.PropertyUpdated without 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?

Need help choosing the right trigger? Contact support at [email protected]