📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials AI Agents and Automation Workflow Automation with n8n and AI

Workflow Automation with n8n and AI

5 min read
n8n connects AI models with 400+ integrations — build visual LLM-powered automation workflows.

n8n + AI Workflow Automation

# n8n: open-source workflow automation (like Zapier/Make)
# Install: npm install -g n8n
# Start:   n8n start

# n8n workflow with AI node (JSON definition)
{
  "nodes": [
    {
      "name": "Trigger",
      "type": "n8n-nodes-base.webhook",
      "parameters": {"path": "/new-lead"}
    },
    {
      "name": "AI Lead Qualifier",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "parameters": {
        "model": "claude-opus-4-5",
        "messages": {
          "values": [{
            "role": "user",
            "content": "Score this lead 1-10 and explain: {{json.lead_data}}"
          }]
        }
      }
    },
    {
      "name": "High Priority Router",
      "type": "n8n-nodes-base.if",
      "parameters": {"condition": "{{json.score}} >= 8"}
    },
    {
      "name": "CRM Update",
      "type": "n8n-nodes-base.hubspot"
    }
  ]
}

# Python SDK for n8n
import requests
requests.post("http://localhost:5678/webhook/new-lead",
              json={"lead_data": lead})