Skip to main content

Overview

The Omnara n8n integration (n8n-nodes-omnara) enables workflows to communicate with users in real-time through the Omnara platform. Perfect for approval workflows, agent conversations, and guided automation. Key Capabilities:
  • Send non-blocking status updates
  • Ask questions and wait for responses
  • AI Agent compatibility
  • Multi-channel notifications (email, SMS, push)
  • Session management

Installation

Install the community node in your n8n instance:
npm install n8n-nodes-omnara
Or via the n8n UI:
  1. Go to SettingsCommunity Nodes
  2. Search for n8n-nodes-omnara
  3. Click Install

View on npm

Full package documentation and changelog

Quick Start

1

Add Credentials

  1. In n8n, go to CredentialsNew
  2. Select Omnara API
  3. Enter your API key from omnara.com/dashboard
  4. Optionally set custom server URL for self-hosted instances
2

Add Omnara Node

Drag the Omnara node into your workflow
3

Configure Operation

Choose an operation:
  • Send Message: Non-blocking status update
  • Send and Wait: Ask question and pause workflow
  • End Session: Mark agent session as complete
4

Test It

Execute your workflow and check the Omnara dashboard for messages

Operations

Send Message (Non-blocking)

Send informational messages without waiting for response. When to use:
  • Progress updates
  • Status notifications
  • Logging agent actions
Example:
{
  "operation": "send",
  "agentType": "Deployment Agent",
  "message": "Build completed successfully ✅",
  "options": {
    "sendPush": true
  }
}
Returns:
  • message_id: ID of created message
  • agent_instance_id: Session identifier
  • queued_user_messages: Any pending user responses
Check queued_user_messages on every send to catch user responses sent between operations.

Send and Wait (Blocking)

Ask questions and pause workflow until user responds. When to use:
  • Approval workflows
  • User input required
  • Decision points
Two Modes:
  • Webhook Mode (Default)
  • Sync Mode (AI Agents)
For regular workflows
  • Uses n8n’s webhook system
  • Efficient, event-driven
  • Resumes workflow when user responds
  • Max wait: 7 days
{
  "operation": "sendAndWait",
  "message": "Approve deployment to production?",
  "limitWaitTime": true,
  "limitType": "afterTimeInterval",
  "resumeAmount": 1,
  "resumeUnit": "hours"
}

End Session

Mark agent session as completed.
{
  "operation": "endSession",
  "agentInstanceId": "{{ $json.agent_instance_id }}"
}

Configuration Examples

Simple Approval Workflow

{
  "nodes": [
    {
      "name": "Build App",
      "type": "n8n-nodes-base.executeCommand",
      "parameters": {
        "command": "npm run build"
      }
    },
    {
      "name": "Request Approval",
      "type": "n8n-nodes-omnara.omnara",
      "parameters": {
        "operation": "sendAndWait",
        "agentType": "Deployment Bot",
        "message": "Build complete. Deploy to production?",
        "options": {
          "sendEmail": true,
          "sendPush": true
        },
        "limitWaitTime": true,
        "resumeAmount": 1,
        "resumeUnit": "hours"
      }
    },
    {
      "name": "Deploy",
      "type": "n8n-nodes-base.executeCommand",
      "parameters": {
        "command": "npm run deploy"
      }
    }
  ]
}

AI Agent Integration

{
  "nodes": [
    {
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "parameters": {
        "tools": ["omnara"],
        "prompt": "You can ask the user questions using the omnara tool."
      }
    },
    {
      "name": "Omnara Tool",
      "type": "n8n-nodes-omnara.omnara",
      "parameters": {
        "operation": "sendAndWait",
        "message": "{{ $json.question }}",
        "options": {
          "syncMode": true,        // Required for AI Agents
          "syncTimeout": 600,
          "pollInterval": 5,
          "sendEmail": true
        }
      }
    }
  ]
}

Agent Instance Management

Session Tracking

Each workflow execution should use a consistent agent_instance_id: Pattern 1: Webhook-triggered (Recommended)
// Omnara dashboard triggers workflow with pre-generated ID
{
  "agent_instance_id": "{{ $json.agent_instance_id }}", // From webhook
  "agent_type": "{{ $json.agent_type }}"
}
Pattern 2: Self-generated
// Generate UUID in Set node
{
  "agent_instance_id": "{{ $uuid() }}",
  "agent_type": "My Workflow"
}
// Reference in all subsequent Omnara nodes

Queued Messages

Omnara returns queued user messages with every agent message:
const response = await omnaraNode.execute();
// response.queued_user_messages contains any user responses since last check
This ensures you never miss user input, even if timing is off.

Notifications

Control how users are notified:
sendEmail
boolean
default:"false"
Send email notification
sendSMS
boolean
default:"false"
Send SMS notification (requires phone verification)
sendPush
boolean
default:"false"
Send push notification (via mobile app or web push)
Priority:
  1. Message-level override (in request)
  2. User preferences (in dashboard)
  3. Default: no notifications

Error Handling

{
  "nodes": [
    {
      "name": "Omnara",
      "type": "n8n-nodes-omnara.omnara",
      "continueOnFail": true,
      "parameters": {
        "operation": "send",
        "message": "Status update"
      }
    }
  ]
}
With continueOnFail: true, errors are returned as data:
{
  "error": "Failed to send message: Connection timeout",
  "resource": "message",
  "operation": "send",
  "itemIndex": 0
}

Troubleshooting

Causes:
  • Using sync mode in regular workflow (use webhook mode)
  • Webhook URL incorrect in message metadata
  • Workflow execution already timed out
Fix:
// Ensure sync mode is false (or omitted) for regular workflows
{
  "options": {
    "syncMode": false  // or omit entirely
  }
}
Causes:
  • Missing syncMode: true
  • Using webhook mode in AI Agent context
Fix:
// MUST use sync mode for AI Agents
{
  "options": {
    "syncMode": true,
    "syncTimeout": 600,
    "pollInterval": 5
  }
}
Causes:
  • Incorrect API key
  • Wrong server URL
  • Network/firewall issues
Fix:
  1. Test credentials: Check credential test passes
  2. Verify server URL (default: https://agent.omnara.com)
  3. Check n8n logs for error details
Causes:
  • User didn’t respond in time
  • Poll interval too long
  • Sync timeout too short
Fix:
// Adjust timeouts
{
  "limitWaitTime": true,
  "resumeAmount": 2,       // 2 hours instead of 1
  "resumeUnit": "hours",
  "options": {
    "syncTimeout": 1200,   // 20 minutes
    "pollInterval": 3      // Check every 3 seconds
  }
}

API Endpoints

The n8n node uses these Omnara API endpoints:
EndpointMethodPurpose
/api/v1/messages/agentPOSTSend message (both send & sendAndWait)
/api/v1/messages/pendingGETPoll for user responses (sync mode)
/api/v1/sessions/endPOSTEnd agent session
/api/v1/auth/verifyGETValidate credentials

Best Practices

// Good
agentType: "Deployment Bot - Production"

// Bad
agentType: "Bot"
Helps identify sessions in dashboard when running multiple workflows.
// For urgent approvals
resumeAmount: 30
resumeUnit: "minutes"

// For non-urgent requests
resumeAmount: 24
resumeUnit: "hours"
Balance between user convenience and workflow efficiency.
// Add at end of workflow
{
  "name": "End Session",
  "operation": "endSession",
  "agentInstanceId": "{{ $('Request Approval').item.json.agent_instance_id }}"
}
Keeps dashboard clean and marks sessions as complete.
// Check for user responses on every send
const response = await omnaraNode.send(message);
if (response.queued_user_messages.length > 0) {
  // Process user feedback
  const userMessage = response.queued_user_messages[0];
  console.log('User said:', userMessage.content);
}
Ensures you don’t miss user input sent between operations.