Quick Start Guide
Prerequisites
Before you begin, make sure you have:
- A NexusFlow account (sign up at free trial)
- Node.js 18+ installed
- An API key from your dashboard
Installation
npm install @nexusflow/sdk
Basic Usage
import { NexusFlow } from '@nexusflow/sdk';
const nf = new NexusFlow({
apiKey: process.env.NEXUSFLOW_API_KEY
});
// Create a simple workflow
const workflow = await nf.workflows.create({
name: 'PR Notification',
trigger: {
type: 'github.pull_request.opened'
},
actions: [{
type: 'slack.send_message',
config: {
channel: '#engineering',
message: 'New PR: {{trigger.title}}'
}
}]
});
console.log('Workflow created:', workflow.id);
Configuration Options
The SDK supports the following configuration:
apiKey- Your NexusFlow API key (required)baseUrl- API base URL (default: https://api.nexusflow.ai/v2)timeout- Request timeout in ms (default: 30000)retries- Number of retry attempts (default: 3)
Next Steps
Now that you've created your first workflow, explore our full API reference for advanced usage.