The official Node.js SDK for Flowripple - a visual workflow automation platform.
Install the package using npm:
npm install @flowripple/sdkOr using yarn:
yarn add @flowripple/sdkOr using pnpm:
pnpm add @flowripple/sdkFirst, import and initialize the FlowrippleClient with your API key:
import { FlowrippleClient } from '@flowripple/sdk';
const client = new FlowrippleClient({
apiKey: 'frp_your-api-key'
});Then use the client to trigger workflow events:
// Trigger a simple event
await client.trigger('user.signup', {
userId: '123',
email: 'user@example.com'
});
// Trigger an event with custom data
await client.trigger('order.completed', {
orderId: 'ord_123',
amount: 99.99,
currency: 'USD',
items: [
{ id: 'prod_1', name: 'T-Shirt', quantity: 2 }
]
});The FlowrippleClient constructor accepts a configuration object with the following properties:
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string | Yes | - | Your Flowripple API Key (starts with frp_) |
baseUrl |
string | No | 'https://api.flowripple.com' | Custom API base URL |
silent |
boolean | No | false | If true, failed API calls return false instead of throwing errors |
Triggers a workflow by sending an event to the Flowripple API.
identifier: The event identifier to trigger (e.g., 'user.signup', 'order.completed')data: Optional object containing the event data- Returns: A promise that resolves to
voidon success, orfalseif the request fails and silent mode is enabled - Throws: An error if the request fails and silent mode is not enabled
By default, the SDK will throw errors when API requests fail. You can enable silent mode to return false instead:
const client = new FlowrippleClient({
apiKey: 'frp_your-api-key',
silent: true
});
// This will return false instead of throwing if the request fails
const result = await client.trigger('user.signup', { userId: '123' });
if (result === false) {
console.log('Event trigger failed');
}MIT