n8n Integration

Integrate Magnetite with n8n's powerful workflow automation platform

Overview

The Magnetite n8n community node allows you to generate AI-powered, personalized lead magnets directly within your n8n workflows. This integration is perfect for businesses using n8n for automation and wanting to add intelligent lead generation capabilities.

Available Operations
  • Generate: Create personalized lead magnets
  • Get Status: Check generation progress
Key Features
  • • Easy visual workflow integration
  • • Support for all lead data fields
  • • Custom fields via JSON
  • • Error handling and retries

Installation

1

Enable Community Nodes

In your n8n instance, go to Settings → Community Nodes and enable community nodes if not already enabled.

2

Install the Magnetite Node

Click Install and enter the package name:

n8n-nodes-magnetite
3

Agree to Install

Agree to the risks of installing unverified code from a public source and select Install.

Configuration

Setting up Credentials

Before using the Magnetite node, you need to configure your API credentials:

1

Get Your API Key

From your Magnetite dashboard:

  1. Go to your project settings
  2. Navigate to API & Integrations
  3. Copy your API key
2

Configure n8n Credentials

In n8n, create new Magnetite credentials with:

API Key: Your Magnetite API key (starts with "sk_")
Base URL: https://magnetite.ai (default)

Usage Examples

Basic Lead Magnet Generation

Here's a simple workflow that generates a lead magnet from webhook data:

{
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "new-lead",
        "httpMethod": "POST"
      }
    },
    {
      "name": "Magnetite",
      "type": "n8n-nodes-magnetite.magnetite",
      "parameters": {
        "operation": "generate",
        "projectId": "abc123def456ghi789jkl012mno345pq",
        "email": "={{$json.email}}",
        "leadData": {
          "fullName": "={{$json.name}}",
          "company": "={{$json.company}}",
          "domain": "={{$json.domain}}",
          "title": "={{$json.title}}"
        }
      }
    },
    {
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "email": "={{$node.Webhook.json.email}}",
        "subject": "Your Personalized Business Analysis",
        "message": "Hi {{$node.Webhook.json.name}},\n\nI've prepared a personalized analysis for {{$node.Webhook.json.company}}. You can view it here: {{$node.Magnetite.json.leadMagnetUrl}}"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Magnetite",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Magnetite": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Advanced Workflow with Status Checking

For more complex workflows, you can check the generation status and wait for completion:

{
  "nodes": [
    {
      "name": "Generate Lead Magnet",
      "type": "n8n-nodes-magnetite.magnetite",
      "parameters": {
        "operation": "generate",
        "projectId": "abc123def456ghi789jkl012mno345pq",
        "email": "john@example.com",
        "leadData": {
          "fullName": "John Smith",
          "company": "Acme Corp"
        }
      }
    },
    {
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "parameters": {
        "amount": 30,
        "unit": "seconds"
      }
    },
    {
      "name": "Check Status",
      "type": "n8n-nodes-magnetite.magnetite",
      "parameters": {
        "operation": "getStatus",
        "jobId": "={{$node['Generate Lead Magnet'].json.jobId}}"
      }
    },
    {
      "name": "If Completed",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.status}}",
              "operation": "equal",
              "value2": "completed"
            }
          ]
        }
      }
    }
  ]
}

Node Configuration

Generate Operation

ParameterRequiredDescription
Project IDYesYour Magnetite project ID
EmailYesLead's email address
Full NameNoLead's full name
CompanyNoCompany name
DomainNoCompany website domain
TitleNoJob title
IndustryNoIndustry or sector
Company SizeNoNumber of employees
PhoneNoContact phone number
Custom FieldsNoAdditional data as JSON string

Get Status Operation

ParameterRequiredDescription
Job IDYesJob ID from generate operation

Common Patterns

CRM Integration
Generate lead magnets for new CRM records

Trigger: Airtable/Notion/Google Sheets - New Record

Action: Magnetite - Generate Lead Magnet

Action: Update CRM record with lead magnet URL

Email Marketing Automation
Create personalized content for email campaigns

Trigger: Mailchimp/ActiveCampaign - New Subscriber

Action: Magnetite - Generate Lead Magnet

Action: Send personalized email with content

Slack Notifications
Notify team when lead magnets are generated

Trigger: Webhook - New Lead

Action: Magnetite - Generate Lead Magnet

Action: Slack - Send notification with URL

Error Handling

The n8n node includes built-in error handling for common scenarios:

Insufficient Credits

When you don't have enough credits, the node will return an error with details about upgrading your plan.

Error: Insufficient credits. Please upgrade your plan.
Rate Limiting

If you exceed rate limits, the node will provide retry information.

Error: Rate limit exceeded. Please retry in 60 seconds.
Invalid Data

Missing required fields or invalid data will be clearly indicated.

Error: Missing required field: email

Version History

v1.0.2 - Latest

Released: December 2024

  • Fixed credential test endpoint
  • Improved connection reliability
  • Better error messages

v1.0.1

Released: November 2024

  • Updated GitHub repository URL
  • Documentation improvements

v1.0.0

Released: October 2024

  • Initial release
  • Generate and status check operations
  • Support for all standard lead fields
  • Custom fields via JSON

Resources

Get additional help and resources for your n8n integration.