Skip to main content

Overview

The lua integrations command enables you to connect your agent to third-party services like Linear, Discord, Google Calendar, HubSpot, and 250+ other integrations via Unified.to. When you connect an integration:
  • An MCP server is automatically created to expose tools to your agent
  • Triggers can be set up to wake up your agent when events occur in the connected service
Limit: Only 1 connection per integration type is allowed per agent. To change scopes, use lua integrations update.

How It Works

  1. Connect: Authenticate with a third-party service via OAuth or API token
  2. Auto-MCP: An MCP server is automatically created and activated for the connection
  3. Agent Access: Your agent can now use tools from that integration (e.g., create Linear issues, send Discord messages)
  4. Triggers (optional): Set up event-driven triggers to wake up your agent when things happen (e.g., a task is created, a message is received). Triggers are opt-in — you can skip them at connect and add them later.

Commands

lua integrations connect

Connect a new third-party integration with optional triggers.
What happens:
  1. CLI fetches available integrations
  2. You select or specify an integration and auth method
  3. Browser opens for OAuth authorization (or you enter API credentials)
  4. Connection is established and stored
  5. MCP server is automatically created and activated
  6. In interactive mode, you’re asked whether to configure triggers now (opt-in, default: skip). If triggers are specified via --triggers, they are created immediately.
Triggers are opt-in: The interactive flow asks “Do you want to configure triggers now?” and defaults to skip — add only what you actually need. You can always add triggers later with lua triggers create. When using --triggers non-interactively, triggers are created immediately.

lua integrations list

View all connected integrations and their status.
Output:
Status Icons:
  • 🟢 Active - Connection healthy, tools available
  • 🟡 Connected (tools pending) - Connection healthy, MCP server inactive
  • 🔴 Unhealthy - Re-authorization required
  • ⏸️ Paused - Connection paused

lua integrations info

View detailed information about an integration type, including available OAuth scopes and triggers. This is useful for discovering what’s available before connecting.
Output:
Friendly Labels: Scopes and triggers display user-friendly descriptions (e.g., “A new issue was created in Linear” instead of “task_task.created”) to help non-technical users understand what each option does.

lua integrations available

List all available integrations you can connect.
Shows integrations grouped by category (task, messaging, crm, etc.) with auth type indicators:
  • 🔐 OAuth only
  • 🔑 API Token only
  • 🔐🔑 Both available

lua integrations update

Update an existing connection’s OAuth scopes. This re-authorizes the connection with new permissions.
Update deletes the old connection and creates a new one with updated scopes. You’ll need to re-authorize in the browser.

lua integrations disconnect

Remove a connected account. This also deletes the associated MCP server and any webhook subscriptions.

lua integrations webhooks

Manage triggers (webhook subscriptions) for connected integrations. Triggers let your agent receive events when things happen in connected services (e.g., task created, message received).
List all triggers:
Output:
Status Icons:
  • ✅ Active — trigger is running
  • ⏸️ Paused by you — you paused this trigger; resume with lua triggers resume
  • 💳 Credit-suspended — paused due to credit depletion; add credits to re-enable
  • 🔴 Unhealthy — requires re-authorization
  • ⚪ Paused externally — paused from outside Lua (e.g., Unified.to dashboard)
JSON Output:
Webhook IDs are displayed for each trigger, making it easy to reference them for pause/resume/delete operations.

lua integrations mcp

Manage MCP servers for connections. MCP servers are automatically created when you connect an integration, but you can activate/deactivate them manually.
List connections with MCP server status:
Output:

Non-Interactive Mode

All integrations commands support non-interactive mode for CI/CD, automation, and AI coding assistants.

Discovery Commands

Use these to discover available options before connecting:

Connect Options

Info Options

Disconnect Options

Trigger/Webhook Options

MCP Options

Examples

Workflow Example

1

Discover Available Integrations

View available integrations, their OAuth scopes, and trigger events.
2

Connect the Integration

Complete OAuth in the browser. MCP server is auto-created and activated. Add triggers now or skip and add them later with lua triggers create.
3

Verify Connection

Confirm the connection shows as Active (🟢) and triggers are configured.
4

Test with Agent

Your agent should now have access to Linear tools.
5

Manage Triggers

When events occur in Linear, your agent will be notified automatically. Pause/resume any time without losing the subscription.

Event-Driven Triggers

Triggers are a powerful way to make your agent reactive to external events. Instead of polling or manually checking for updates, your agent automatically wakes up when something happens.

How Triggers Work

  1. You connect an integration with triggers enabled
  2. Unified.to monitors the connected service for events
  3. When an event occurs (e.g., a task is created), Unified.to sends a webhook
  4. Your agent wakes up with the event data in runtimeContext
  5. The agent can respond based on what happened

Example: React to New Linear Issues

When a new issue is created in Linear, your agent receives the event data and can:
  • Send a notification to Slack
  • Update a dashboard
  • Assign the issue to a team member
  • Any other action your agent is configured to perform

Trigger Types

Most integrations use virtual webhooks. The polling interval can be configured:

Authentication Types

  • Secure authorization flow via browser
  • Scope selection for fine-grained permissions
  • Automatic token refresh
  • Requires OAuth to be configured for the integration in your Unified.to workspace

API Token / Personal Access Token

  • Direct credential entry
  • Simpler setup
  • Token fields vary by integration (e.g., API Key, Personal Access Token, Bot Token)
  • Instructions shown during connection for where to obtain credentials

Tips

Triggers make your agent reactive to external events. They are opt-in — add only what you actually need:
Your agent automatically wakes up when events occur — no polling required!
Use discovery commands to understand what’s available:
This is especially useful for AI coding assistants building agents programmatically.
By default, --hide-sensitive true is enabled, which hides sensitive fields from MCP tool responses. Disable only if your agent needs access to sensitive data:
When using OAuth, select only the scopes your agent needs. Use all during development, then restrict to specific scopes in production:
Each agent can have only one connection per integration type. To change accounts or scopes, use lua integrations update or disconnect and reconnect.
Use --json for machine-readable output:
Perfect for CI/CD pipelines and AI coding assistants.

MCP Command

Manage all MCP servers (including non-integration servers)

Chat Command

Test your agent with integration tools

See Also