Integration Wizard

AI-powered integration generation that instantly connects any API to your workflows - no coding required.

Overview

The Integration Wizard is a game-changing feature that uses AI to automatically generate integration code for any API integration. Simply describe what you want in natural language, and the wizard creates a fully functional integration that integrates seamlessly into your workflows.

How It Works

1. Natural Language Input

Describe your API integration needs in plain English:

  • "Send a Slack message when a task is completed"
  • "Create a Jira ticket from form submissions"
  • "Post to Twitter when a blog is published"
  • "Update Salesforce leads from webhook data"

2. AI Code Generation

The wizard uses advanced AI models to:

  • Understand your requirements
  • Generate the appropriate API connection code
  • Handle authentication and configuration
  • Create error handling and retries

3. Instant Integration

Your new integration is immediately available:

  • Appears in the sidebar as a draggable node
  • Fully configured and ready to use
  • Saved to your integration library for reuse

Using the Integration Wizard

Opening the Wizard

  1. Click Create Integration (the ✨ Create new integration with AI button by the Integrations section of the node palette)
  2. Or open it from the Integrations Library modal
  3. The wizard dialog opens automatically

Creating an Integration

Step 1: Describe Your Integration

Example prompts:
- "Send an email using SendGrid when a form is submitted"
- "Create a Google Calendar event with meeting details"
- "Post a message to Discord webhook with custom formatting"
- "Update a MySQL database with order information"

Step 2: Review Generated Code

The wizard shows you the generated integration code:

// Example: Slack Message Plugin
const { WebClient } = require('@slack/web-api');

module.exports = {
  name: 'Send Slack Message',
  description: 'Posts a message to a Slack channel',
  
  async execute(input, config) {
    const slack = new WebClient(config.token);
    
    const result = await slack.chat.postMessage({
      channel: config.channel || '#general',
      text: input.message,
      username: config.username || 'Circuitry Bot',
      icon_emoji: config.emoji || ':robot_face:'
    });
    
    return {
      success: true,
      messageId: result.ts,
      channel: result.channel
    };
  }
};

Step 3: Configure Settings

The wizard automatically creates configuration fields:

  • API keys and tokens
  • Endpoints and URLs
  • Custom parameters
  • Authentication methods

Step 4: Test Your Integration

Before saving, you can:

  • Test with sample data
  • Verify API connections
  • Check response formats
  • Debug any issues

Advanced Features

Multi-Step Workflows

Create complex integrations that:

  • Chain multiple API calls
  • Transform data between steps
  • Handle conditional logic
  • Aggregate responses
// Example: Multi-step CRM Update
async execute(input, config) {
  // Step 1: Search for existing contact
  const contact = await searchContact(input.email);
  
  // Step 2: Update or create
  if (contact) {
    await updateContact(contact.id, input.data);
  } else {
    await createContact(input.data);
  }
  
  // Step 3: Log activity
  await logActivity({
    type: 'data_update',
    contact: input.email,
    timestamp: new Date()
  });
}

Authentication Handling

The wizard supports various auth methods:

API Key Authentication

headers: {
  'X-API-Key': config.apiKey
}

Bearer Token

headers: {
  'Authorization': `Bearer ${config.token}`
}

OAuth 2.0

const token = await refreshOAuthToken(config.refreshToken);
headers: {
  'Authorization': `Bearer ${token}`
}

Basic Auth

const auth = Buffer.from(`${config.username}:${config.password}`).toString('base64');
headers: {
  'Authorization': `Basic ${auth}`
}

Error Handling

Generated integrations include robust error handling:

try {
  const response = await fetch(url, options);
  
  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }
  
  return await response.json();
} catch (error) {
  console.error('Plugin execution failed:', error);
  
  // Retry logic
  if (error.code === 'ECONNREFUSED' && retries > 0) {
    await sleep(1000);
    return execute(input, config, retries - 1);
  }
  
  throw error;
}

Supported Integrations

The Integration Wizard can generate integrations for:

Communication Platforms

  • Slack, Discord, Microsoft Teams
  • Email (SendGrid, Mailgun, AWS SES)
  • SMS (Twilio, Vonage)
  • WhatsApp Business API

Project Management

  • Jira, Asana, Trello
  • Monday.com, ClickUp
  • GitHub Issues, GitLab

CRM & Sales

  • Salesforce, HubSpot
  • Pipedrive, Zoho CRM
  • Intercom, Zendesk

Databases

  • PostgreSQL, MySQL, MongoDB
  • Redis, Elasticsearch
  • Supabase, Firebase

Cloud Services

  • AWS (S3, Lambda, DynamoDB)
  • Google Cloud (Storage, Functions)
  • Azure (Blob, Functions)

Social Media

  • Twitter/X API
  • LinkedIn, Facebook
  • Instagram Business

Analytics

  • Google Analytics
  • Mixpanel, Amplitude
  • Segment, PostHog

And Many More!

The wizard can connect to any API with:

  • REST endpoints
  • GraphQL APIs
  • WebSocket connections
  • SOAP services

Best Practices

1. Clear Descriptions

Be specific about what you want:

  • ✅ "Send a Slack message to #sales channel when deal value exceeds $10,000"
  • ❌ "Send a message"

2. Include Authentication Details

Mention the auth method if known:

  • "Using API key authentication"
  • "Requires OAuth 2.0"
  • "Basic auth with username/password"

3. Specify Data Mappings

Describe how data should flow:

  • "Map the form.email field to contact.email"
  • "Use the webhook.timestamp as created_date"

4. Test Thoroughly

Always test your integration with:

  • Valid inputs
  • Edge cases
  • Error conditions
  • Different data types

5. Save and Version

  • Give integrations descriptive names
  • Add documentation comments
  • Version your integrations
  • Share with team members

Configuration Management

Using Connections

Integrations can use saved connections for secure credential storage:

  1. Create a connection in Settings
  2. Reference it in your integration:
module.exports = {
  name: 'My Plugin',
  connection: 'slack-connection', // Reference saved connection
  
  async execute(input, config, connection) {
    // connection.token is securely retrieved
    const slack = new WebClient(connection.token);
    // ...
  }
};

Environment Variables

For development and testing:

const apiKey = process.env.MY_API_KEY || config.apiKey;

Troubleshooting

Common Issues

"Plugin generation failed"

  • Check your description is clear and specific
  • Try breaking complex requirements into steps
  • Verify API documentation is accurate

"Authentication error"

  • Verify credentials are correct
  • Check token expiration
  • Ensure proper auth method is used

"Connection timeout"

  • Check network connectivity
  • Verify API endpoint is correct
  • Consider adding retry logic

"Invalid response format"

  • Check API documentation for response structure
  • Add response validation
  • Handle different response types

Getting Help

When the wizard can't generate what you need:

  1. Check existing integration templates
  2. Modify generated code manually
  3. Consult API documentation
  4. Ask in community forums

Examples

Example 1: Weather Alert Integration

Prompt: "Get weather data from OpenWeatherMap API and send alert if temperature exceeds 30°C"

Generated Integration:

const fetch = require('node-fetch');

module.exports = {
  name: 'Weather Alert',
  description: 'Monitors temperature and sends alerts',
  
  config: {
    apiKey: { type: 'string', required: true },
    city: { type: 'string', required: true },
    threshold: { type: 'number', default: 30 }
  },
  
  async execute(input, config) {
    const url = `https://api.openweathermap.org/data/2.5/weather?q=${config.city}&appid=${config.apiKey}&units=metric`;
    
    const response = await fetch(url);
    const data = await response.json();
    
    const temperature = data.main.temp;
    const shouldAlert = temperature > config.threshold;
    
    return {
      temperature,
      city: config.city,
      alert: shouldAlert,
      message: shouldAlert 
        ? `⚠️ High temperature alert: ${temperature}°C in ${config.city}`
        : `Temperature normal: ${temperature}°C in ${config.city}`
    };
  }
};

Example 2: Database Update Integration

Prompt: "Update PostgreSQL database with order information from webhook"

Generated Integration:

const { Client } = require('pg');

module.exports = {
  name: 'Update Order Database',
  description: 'Updates PostgreSQL with order data',
  
  config: {
    connectionString: { type: 'string', required: true, encrypted: true }
  },
  
  async execute(input, config) {
    const client = new Client({
      connectionString: config.connectionString
    });
    
    await client.connect();
    
    try {
      const query = `
        INSERT INTO orders (id, customer_email, total, items, created_at)
        VALUES ($1, $2, $3, $4, $5)
        ON CONFLICT (id) DO UPDATE
        SET total = $3, items = $4, updated_at = NOW()
      `;
      
      const values = [
        input.orderId,
        input.customerEmail,
        input.total,
        JSON.stringify(input.items),
        new Date()
      ];
      
      const result = await client.query(query, values);
      
      return {
        success: true,
        rowsAffected: result.rowCount,
        orderId: input.orderId
      };
    } finally {
      await client.end();
    }
  }
};

Tips and Tricks

1. Leverage AI Suggestions

The wizard can suggest improvements:

  • "Add retry logic for network failures"
  • "Include rate limiting"
  • "Add input validation"

2. Combine Multiple APIs

Create powerful integrations:

  • Get data from one API
  • Transform it
  • Send to another API
  • Log the results

3. Use Template Variables

Make integrations dynamic:

const endpoint = `${config.baseUrl}/${input.resource}/${input.id}`;

4. Add Custom Logic

Enhance generated code:

  • Data validation
  • Business rules
  • Calculated fields
  • Conditional flows

5. Create Reusable Components

Build a library of common patterns:

  • Authentication helpers
  • Error handlers
  • Data transformers
  • Response formatters

Next Steps