daimon.email
ExamplesFrameworks

n8n Workflows

Integrating daimon.email into n8n automation workflows

Overview

Build visual email automation workflows with daimon.email and n8n. Create no-code/low-code integrations that respond to email events, automate responses, and integrate email into your broader automation workflows.

Info

Visual automation: Use n8n's drag-and-drop interface to build complex email workflows without writing code. Perfect for citizen developers and rapid prototyping.

Installation

# Self-hosted n8n
npm install -g n8n

# Or use n8n Cloud
# Visit https://n8n.io

Setting Up daimon.email in n8n

1. Create Credentials

In n8n, create a new credential:

Credential Type: Header Auth
Name: daimon.email
Header Name: Authorization
Header Value: Bearer dm_live_your_api_key_here

2. HTTP Request Node Configuration

daimon.email doesn't have a dedicated n8n node (yet), but works perfectly with the HTTP Request node:

{
  "name": "daimon.email API",
  "type": "n8n-nodes-base.httpRequest",
  "typeVersion": 4.1,
  "position": [250, 300],
  "credentials": {
    "httpHeaderAuth": {
      "id": "1",
      "name": "daimon.email"
    }
  }
}

Complete Workflows

Workflow 1: Auto-Reply to Emails

{
  "name": "Email Auto-Reply",
  "nodes": [
    {
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "*/5 * * * *"
            }
          ]
        }
      },
      "position": [250, 300]
    },
    {
      "name": "Check Messages",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "https://api.daimon.email/v1/inboxes/{{ $env.INBOX_ID }}/messages",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "options": {}
      },
      "position": [450, 300]
    },
    {
      "name": "Filter Unread",
      "type": "n8n-nodes-base.filter",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.read }}",
              "operation": "equals",
              "value2": "false"
            }
          ]
        }
      },
      "position": [650, 300]
    },
    {
      "name": "Send Reply",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://api.daimon.email/v1/inboxes/{{ $env.INBOX_ID }}/send",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "to",
              "value": "={{ $json.from }}"
            },
            {
              "name": "subject",
              "value": "Re: {{ $json.subject }}"
            },
            {
              "name": "body",
              "value": "Thank you for your email. We have received your message and will respond shortly."
            }
          ]
        }
      },
      "position": [850, 300]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Check Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Messages": {
      "main": [
        [
          {
            "node": "Filter Unread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unread": {
      "main": [
        [
          {
            "node": "Send Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Workflow 2: Service Signup Automation

{
  "name": "Automated Service Signup",
  "nodes": [
    {
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [250, 300]
    },
    {
      "name": "Create Inbox",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://api.daimon.email/v1/inboxes",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "username",
              "value": "n8n-signup-{{ $now.format('yyyyMMddHHmmss') }}"
            }
          ]
        }
      },
      "position": [450, 300]
    },
    {
      "name": "Sign Up for Service",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://external-service.com/api/signup",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "={{ $json.result.address }}"
            },
            {
              "name": "name",
              "value": "n8n Agent"
            }
          ]
        }
      },
      "position": [650, 300]
    },
    {
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "parameters": {
        "amount": 30,
        "unit": "seconds"
      },
      "position": [850, 300]
    },
    {
      "name": "Check for Confirmation",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "https://api.daimon.email/v1/inboxes/={{ $node['Create Inbox'].json.result.id }}/messages"
      },
      "position": [1050, 300]
    },
    {
      "name": "Extract Confirmation Link",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const messages = $input.all();\nconst confirmationMsg = messages.find(m => \n  m.json.subject.toLowerCase().includes('confirm') ||\n  m.json.subject.toLowerCase().includes('verify')\n);\n\nif (confirmationMsg) {\n  const ctaLinks = confirmationMsg.json.cta_links || [];\n  const confirmLink = ctaLinks[0]?.url;\n  \n  return [{ json: { confirmLink } }];\n}\n\nreturn [];"
      },
      "position": [1250, 300]
    },
    {
      "name": "Click Confirmation Link",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "={{ $json.confirmLink }}"
      },
      "position": [1450, 300]
    }
  ]
}

Workflow 3: Webhook-Triggered Email Response

{
  "name": "Webhook Email Response",
  "nodes": [
    {
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "daimon-webhook",
        "responseMode": "responseNode",
        "options": {}
      },
      "webhookId": "abc-123",
      "position": [250, 300]
    },
    {
      "name": "Filter Event Type",
      "type": "n8n-nodes-base.switch",
      "parameters": {
        "rules": {
          "rules": [
            {
              "operation": "equals",
              "value1": "={{ $json.event }}",
              "value2": "message.received"
            }
          ]
        }
      },
      "position": [450, 300]
    },
    {
      "name": "Analyze with AI",
      "type": "n8n-nodes-base.openAi",
      "parameters": {
        "operation": "message",
        "messages": {
          "values": [
            {
              "role": "user",
              "message": "Analyze this email and suggest a response:\n\nFrom: {{ $json.message.from }}\nSubject: {{ $json.message.subject }}\nBody: {{ $json.message.body }}"
            }
          ]
        }
      },
      "position": [650, 300]
    },
    {
      "name": "Send AI Response",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://api.daimon.email/v1/inboxes/={{ $node['Webhook Trigger'].json.inbox_id }}/send",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "to",
              "value": "={{ $node['Webhook Trigger'].json.message.from }}"
            },
            {
              "name": "subject",
              "value": "Re: {{ $node['Webhook Trigger'].json.message.subject }}"
            },
            {
              "name": "body",
              "value": "={{ $json.choices[0].message.content }}"
            }
          ]
        }
      },
      "position": [850, 300]
    },
    {
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"processed\" } }}"
      },
      "position": [1050, 300]
    }
  ]
}

Common Use Cases

Use Case 1: Customer Support Triage

Trigger: Schedule (every 5 minutes)

Check Messages (GET /v1/messages)

Filter: New messages only

Classify with AI: urgent/normal/spam

If urgent → Send to Slack channel
If normal → Add to queue
If spam → Delete

Use Case 2: Lead Capture

Trigger: Webhook (message.received)

Extract: Sender email and message

Add to CRM (Airtable/HubSpot/etc.)

Send confirmation email

Notify sales team via Slack

Use Case 3: Email Newsletter Signup

Trigger: Form submission (Typeform/etc.)

Create inbox for user

Add to email list

Send welcome email via daimon.email

Track engagement

Integration with Other n8n Nodes

Airtable + daimon.email

Check Messages

For each message:
  → Add row to Airtable
  → Fields: from, subject, body, received_at
  → Link to thread

Slack + daimon.email

Webhook: message.received

Format message for Slack

Post to Slack channel

Add reaction buttons: ✅ Reply, ❌ Delete, 🔖 Save

OpenAI + daimon.email

Check Messages

Send to OpenAI for classification

Route based on category:
  - Question → Draft answer
  - Complaint → Escalate
  - Feedback → Save to database

Error Handling

{
  "name": "Error Handler",
  "type": "n8n-nodes-base.errorTrigger",
  "parameters": {},
  "position": [250, 500],
  "continueOnFail": true
}

Add error handling to catch:

  • Rate limit errors (429)
  • Tier limit errors (SEND_REQUIRES_PAID)
  • Network timeouts
  • Invalid API keys

Environment Variables in n8n

Set environment variables for configuration:

DAIMON_API_KEY=dm_live_your_key_here
INBOX_ID=inb_abc123
WEBHOOK_SECRET=your_webhook_secret

Reference in workflows:

{{ $env.DAIMON_API_KEY }}
{{ $env.INBOX_ID }}

Testing Workflows

  1. Use Manual Trigger for development
  2. Test with sample data using Set node
  3. Check execution logs for errors
  4. Use Error Trigger to catch failures
  5. Deploy to production once validated

n8n Cloud vs Self-Hosted

n8n Cloud

  • Hosted solution, no setup required
  • Built-in credentials management
  • Automatic updates
  • Team collaboration features

Self-Hosted

  • Full control over infrastructure
  • Custom nodes possible
  • No execution limits
  • Can run on-premise

Both work perfectly with daimon.email!

Custom n8n Node (Coming Soon)

We're working on a dedicated n8n node for daimon.email with:

  • Visual inbox selection
  • Pre-built operations (create, send, check)
  • Automatic credential management
  • Type-safe parameters
  • Better error messages

Next Steps