Plugin Wizard

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

Overview

The Plugin Wizard is a game-changing feature that uses AI to automatically generate plugin code for any API integration. Simply describe what you want in natural language, and the wizard creates a fully functional plugin 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 plugin is immediately available:

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

Using the Plugin Wizard

Opening the Wizard

  1. Click the Plugin Wizard node in the sidebar under the "Actions & Plugins" section
  2. Or drag it directly onto the canvas
  3. The wizard dialog opens automatically

Creating a Plugin

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 plugin 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 Plugin

Before saving, you can:

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

Advanced Features

Multi-Step Workflows

Create complex plugins 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 plugins 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 Plugin Wizard can generate plugins 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 plugin with:

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

5. Save and Version

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

Configuration Management

Using Connections

Plugins can use saved connections for secure credential storage:

  1. Create a connection in Settings
  2. Reference it in your plugin:
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 plugin templates
  2. Modify generated code manually
  3. Consult API documentation
  4. Ask in community forums

Examples

Example 1: Weather Alert Plugin

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

Generated Plugin:

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 Plugin

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

Generated Plugin:

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 plugins 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