Skip to main content

Triggering Events

Trigger events from your application to start workflows. You can use the official Node.js SDK or make HTTP requests from any programming language.

Using the SDK

The Flowripple SDK provides a simple, type-safe way to trigger events from Node.js applications.

Installation

Initialization

Configuration Options

Basic Trigger

The trigger method accepts:
  • identifier (string): The event identifier (e.g., user.signup)
  • data (object, optional): JSON payload with event data
  • options (object, optional): Trigger options including idempotency key

Idempotent Requests

Use idempotency keys to safely retry requests without creating duplicate events. This is useful when network issues occur or you need to ensure exactly-once processing.
Key scoping: Idempotency keys are scoped per event identifier. This means:
  • user.signup with key abc123 and order.created with key abc123 are independent
  • The same key can be reused across different event types
Key requirements:
  • Maximum 256 characters
  • Alphanumeric characters, hyphens (-), underscores (_), colons (:), and periods (.) allowed
Use a unique value tied to your business logic, such as combining the entity type and ID (e.g., order-ord_456-creation). This ensures retries are safe while allowing different operations to proceed independently.
When a request with an idempotency key matches a previous request:
  • The cached response is returned immediately
  • No duplicate event is created
  • The response includes cached: true to indicate it was served from cache
Cached responses are stored for 24 hours.

Error Handling

By default, failed triggers throw an error:

Silent Mode

Enable silent mode to return false on failure instead of throwing:
Use silent mode in non-critical paths where you don’t want event failures to interrupt your application flow.

Using the HTTP API

Trigger events from any programming language using HTTP requests.

Endpoint

Headers

Request Body

Response

Success (200)
Success - Cached (200) When using an idempotency key that matches a previous request:
Error (4xx/5xx)

Code Examples

Auto-Creation on First Trigger

When you trigger an event identifier that doesn’t exist, Flowripple automatically creates the event:
The auto-created event:
  • Uses the identifier as the event name
  • Extracts variables from the payload
  • Appears in your dashboard immediately
Auto-creation is convenient for development. For production, consider pre-creating events in the dashboard to define expected payload structures.

Best Practices

Never hardcode API keys in your source code. Use environment variables or a secrets manager:
Decide how your application should behave if an event trigger fails:
Always send the same fields for a given event type:
Create different API keys for development, staging, and production to isolate environments and manage access.
For important events like payments or order creation, always use idempotency keys to prevent duplicates:
Good idempotency key patterns:
  • order-{orderId}-creation - for order events
  • payment-{paymentId}-{timestamp} - for payment events
  • user-{userId}-signup - for one-time user events

What’s Next?

Monitoring Captures

Track triggered events and analyze capture data.

Quickstart Guide

Complete end-to-end guide for your first workflow.