lock

Exclusive content for registered members

Join the Academy for free and get immediate access

Sign in / Register for free ← Back to the preview
01
Module 1

Automation fundamentals with n8n

n8n (pronounced "n-eight-n") is an open-source automation tool that lets you connect hundreds of services and APIs without writing complex code. Unlike tools such as Zapier that are SaaS-only, n8n offers two options: using their managed Cloud, or Self-Hosting — running n8n on your own server. Self-Hosting means zero cost per execution, full control over the data and no limit on the number of executions.

n8n's power lies in its conceptual simplicity: every Workflow is built from Nodes connected to each other. Each Node receives data, processes it, and passes the result to the next Node. The data flows in JSON format — meaning each Node sees an array of Items and can act on each Item separately. This is the basis that lets you process thousands of records in a single automation.

Trigger types — what starts the Workflow?

Every Workflow starts with a Trigger Node — the component that decides when the flow runs. There are three main types. Webhook Trigger — n8n creates a unique URL; when someone sends an HTTP request to that address, the Workflow starts immediately. This is perfect for connecting with external services, lead forms or GitHub Events. Schedule Trigger (Cron) — the Workflow runs on a schedule: every hour, every morning at 7:00, every Sunday. Precise and reliable, perfect for daily reports and data updates. Manual Trigger — manual execution for testing and development.

HTTP Request Node — the universal connector

The HTTP Request Node is the most powerful tool in n8n. It lets you send GET, POST, PUT, DELETE requests to any API in the world. No dedicated Node for Anthropic Claude? No problem — the HTTP Request Node covers everything. Configuring the Node includes: Method (GET/POST/...), URL, Headers (including Authorization), and a Body in JSON format. When the API returns JSON, n8n parses it automatically and lets you access the fields directly in the following Nodes.

For error handling, n8n offers two main mechanisms. In Node Settings you can enable "Continue on Fail" — in case of an error the Workflow continues to process the rest of the Items. Right-clicking a Node gives access to "Add Error Handler" which adds a dedicated branch for error handling — failed Items go there, and you can log them to a Spreadsheet, send a Slack alert or retry.

lightbulb
Tip — Credentials, not API Keys in plain text

Never write API Keys directly in Node fields. Always use n8n Credentials — click "Create New Credential" in the Node and set the Key there. The Credential is encrypted and shared safely between Workflows. This also makes it easy to update an expired Key — one place, one fix, all the Workflows update.

  • n8n Cloud — a free plan with 5 active workflows and 5,000 executions per month
  • Self-Hosted — no limits, installed on Docker in minutes
  • Each Node receives and returns an array of Items in JSON format
  • Expressions let you access data from previous Nodes with a simple syntax
  • The n8n Code Node lets you run JavaScript for complex data processing
n8n HTTP Request — configuring a Claude API Call
{
  "method": "POST",
  "url": "https://api.anthropic.com/v1/messages",
  "authentication": "genericCredentialType",
  "headers": {
    "x-api-key": "={{ $credentials.anthropicApiKey }}",
    "anthropic-version": "2023-06-01",
    "content-type": "application/json"
  },
  "body": {
    "model": "claude-3-5-sonnet-20241022",
    "max_tokens": 512,
    "system": "Respond in JSON only.",
    "messages": [
      {
        "role": "user",
        "content": "={{ $json.user_message }}"
      }
    ]
  },
  "options": {
    "retry": { "enabled": true, "maxAttempts": 3 }
  }
}
02
Module 2

Make.com — complex Scenarios

Make.com (formerly Integromat) is a visual automation tool that specializes in a rich graphical interface and advanced methods for processing data. While n8n excels at Code Nodes and Self-Hosting, Make.com excels at a more convenient user interface and a larger number of built-in Native Integrations. Choosing between the two depends on the project: for organizations with DevOps — n8n Self-Hosted; for teams that want fast implementation without managing a server — Make.com.

A Scenario architecture in Make.com is built from Modules. Each Module is the operation on a specific service. Unlike n8n where each Item flows separately, in Make.com there is a Bundle — each Bundle is one "row of data". A Scenario runs as Scheduled (every X minutes/hours/days), as a Webhook (immediate), or Instantly (Real-time via Long Polling).

Router Module — branching logic

The Router Module is the most powerful tool in Make.com for complex automations. It splits the data flow into several parallel routes, each with its own conditions (Filters). For example: a Bundle comes in with a priority field. Route A runs if priority=high, Route B if priority=medium, Route C for everything else. Each route can contain dozens of additional Modules, connect to different services and perform entirely different actions.

Iterator + Aggregator is a Pattern essential for processing arrays. The Iterator breaks a JSON array into individual elements (like foreach), and lets you process each element separately. After processing, the Aggregator collects the results back into one structure — an array, a table, or a concatenated String. A common use: receiving a list of orders → Iterator for each order → computing price + discount for each order separately → an Array Aggregator to unite → saving to Google Sheets in one row.

lightbulb
Tip — Data Store in Make.com

Make.com includes a built-in Data Store — a simple database where you can save values between different runs of a Scenario. Perfect for preventing duplicates: before adding a record to the CRM, check whether the Email already exists in the Data Store. If so — skip. If not — add to the CRM and also to the Data Store. This saves expensive API calls for checking duplicates in the external service.

Make.com — Filter Condition Syntax
// Filter in Router Module — condition syntax
// condition 1: Urgency = high AND Category = sales
{
  "condition": [
    {
      "a": "{{1.urgency}}",
      "b": "high",
      "o": "text:equal"
    },
    {
      "a": "{{1.category}}",
      "b": "sales",
      "o": "text:equal"
    }
  ],
  "operator": "AND"
}

// condition 2: Score > 70
{
  "condition": [
    {
      "a": "{{1.lead_score}}",
      "b": "70",
      "o": "number:greater"
    }
  ]
}

// Else Route — default (no Filter)
// every Bundle that did not pass the two previous routes
  • Make.com offers 1,000 free Operations per month on the Free plan
  • Webhooks in Make.com are Instant — a response in under 5 seconds
  • Error Handler in Make.com: Break, Ignore, Resume, Rollback
  • Incomplete Executions — Make.com keeps failed Bundles for manual resumption
  • Scenario Versioning — Make.com keeps a version history of each Scenario
03
Module 3

Connecting to AI APIs

Connecting an AI model into a Workflow is not magic — it is an HTTP Request with JSON. Every leading AI model exposes a REST API that receives a POST request with instructions and returns text. Once you understand the basic structure, you can connect any AI model to any Workflow within minutes.

Claude API — Messages Array and System Prompt

Anthropic's Claude API is built around a structure Messages — an array of messages that represent the conversation. Each message includes role (user/assistant) and content (the text). The System Prompt is a global instruction that defines the AI's character — what it knows, how it behaves, in which language it answers and what format it returns. For automations, the System Prompt is very important: "always respond only in JSON, with no additional text" — a simple instruction that prevents parsing errors in the following steps.

Parameter max_tokens Controls the maximum response size. For classification and sorting — 256 tokens are enough. For summaries — 512–1024. For writing long content — 4096+. Managing max_tokens this correctly is cost management: Claude 3.5 Haiku is 10x cheaper than Sonnet, and for simple classification tasks — Haiku is entirely enough.

GPT-4o via OpenAI API

The OpenAI API is similar in structure to Claude: Messages Array, System Prompt, max_tokens. The main difference is in Function Calling — OpenAI lets you define functions the AI can "decide" to call when the user requests an action. For example: a function get_weather(city) is defined. The user writes "What is the weather in Tel Aviv?". The API returns a request to call get_weather with city="Tel Aviv". The Workflow detects the call, invokes the real Weather API, and returns the result to GPT to continue the response.

For cost management in a production environment: use Claude's Prompt Caching (keeping a fixed System Prompt) to cut costs by up to 90% on repeated requests. In OpenAI, always set a Seed for consistent results in tests. Add a Timeout to HTTP Request Nodes — a 30-second Timeout prevents Workflows from getting stuck due to a slow API.

warning
Note — Rate Limits

Every AI API limits the number of requests per minute (RPM) and the number of Tokens per minute (TPM). Claude 3.5 Sonnet on a free account: 50 RPM. If your Workflow processes 100 records in parallel, you will get a 429 error. The solution: add a "Wait" Node between AI calls, or use Batch Processing — group several Inputs into a single prompt and request a response for all of them.

Claude API — Email Classifier
// POST https://api.anthropic.com/v1/messages
{
  "model": "claude-3-5-haiku-20241022",
  "max_tokens": 256,
  "system": "You are an email classifier. Always respond with valid JSON only. No additional text.\n\nJSON schema: {\"category\": \"sales|support|billing|spam|internal\", \"urgency\": \"low|medium|high\", \"action\": \"reply|forward|archive|escalate\", \"summary\": \"string max 60 chars\"}",
  "messages": [
    {
      "role": "user",
      "content": "Classify this email:\n\nFrom: {{ $json.from }}\nSubject: {{ $json.subject }}\n\n{{ $json.body_preview }}"
    }
  ]
}

// response from Claude:
// {
//   "content": [
//     {
//       "type": "text",
//       "text": "{\"category\": \"support\", \"urgency\": \"high\", \"action\": \"escalate\", \"summary\": \"Customer reports a serious technical issue\"}"
//     }
//   ]
// }
//
// extraction in n8n: {{ JSON.parse($json.content[0].text) }}
  • Prompt Engineering for automations: always request JSON, always define a clear Schema
  • System Prompt Caching in Claude saves up to 90% of input Token cost
  • Gemini Flash 2.0 — the cheapest option for high-volume classification
  • Fallback Strategy: if Claude fails → try OpenAI → if it fails → save to a manual queue
  • Always check the usage field in the response to monitor Token Consumption
04
Module 4

Automating Email and Slack

Email is still the backbone of business communication, but managing it manually eats up valuable hours. The idea of Inbox Zero — an empty inbox at the end of each day — is not a distant dream when you have automation. n8n can be an "assistant" that reads new emails, classifies them with AI, replies to some automatically, forwards others and archives the rest.

Gmail Trigger in n8n — monitoring the inbox

n8n has a dedicated Node for Gmail. Choose "Gmail Trigger" and with a Google OAuth2 Credential, the Node runs the Workflow every time a new email arrives in your inbox — or by a specific Label. Setting a dedicated Label (for example "AutoProcess") with an automatic Gmail Filter lets you filter emails by sender or subject, and run the Workflow only on emails designated for processing — without exposing your entire inbox to automation.

A smart Auto-Reply process with AI: the trigger receives the Email. A Claude Node classifies it — category, urgency, recommended action. If the category is "FAQ" and urgency is "low" — Claude also generates an automatic reply based on a Knowledge Base in Google Sheets. A Gmail Send Node sends the reply. If the category is "escalate" — a Slack Node sends a message to the team with the email details.

Slack Webhooks for notifications

Slack Incoming Webhooks are the simplest way to send messages to a Slack channel from anywhere. Setting up a Webhook in Slack takes a minute: Slack Apps → Create New App → Incoming Webhooks → Activate → Add New Webhook to Workspace. You will get a unique URL. Now every HTTP POST to that address with JSON will send a message to the channel.

The recommended Priority Routing for smart management: emails with urgency=high → an immediate Slack message to the team with action buttons (Approve/Reject). Emails with urgency=medium → added to a daily queue. Emails with urgency=low → automatic archiving with a summary in Notion. Once a day at 8:00 a separate Workflow sends a Digest Summary of everything that happened — Slack with links.

lightbulb
Tip — Slack Block Kit

Instead of using plain text in Slack, use the Block Kit Builder — a visual Slack interface builder. Messages with Sections, Dividers, Markdown and Action Buttons provide a much more professional experience for your team. An "Approve lead" button next to an AI summary in Slack makes people act faster than a long email.

Slack Webhook — a Priority Alert message
// POST https://hooks.slack.com/services/YOUR/WEBHOOK/URL
{
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "🚨 New urgent email"
      }
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*From:*\n{{ $json.from }}"
        },
        {
          "type": "mrkdwn",
          "text": "*Category:*\n{{ $json.ai_category }}"
        }
      ]
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*AI Summary:*\n{{ $json.ai_summary }}"
      }
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": { "type": "plain_text", "text": "Open in Gmail" },
          "url": "{{ $json.gmail_link }}",
          "style": "primary"
        }
      ]
    }
  ]
}
  • Gmail OAuth2 in n8n — configuring Credentials with a minimal read-only Scope
  • Using Label Filtering prevents processing the whole inbox on every Trigger
  • Slack Rate Limit: 1 message per second per Webhook URL
  • For large Teams — use a Slack API App Token rather than a Webhook for full control
  • Set "Deduplication" in the n8n Gmail Trigger to prevent processing the same email twice
05
Module 5

Data management and integrations

Automation without organized data is like a machine with no raw material. In most projects, the data lives in several places at once: Google Sheets for reports and a non-technical team, Airtable for structured data with views and relations, Notion for knowledge and task management. The challenge is to make them all talk to each other — and that is where automation comes in.

Google Sheets as a Database for automations

Google Sheets is not just a Spreadsheet — for small teams it can serve as a simple and effective Database. n8n and Make.com have dedicated Nodes for Sheets that allow reading, writing and updating rows. The common approach: save the Row ID (row number) in the Workflow to update a specific row without scanning the entire Sheet. It is better to add a unique ID column (for example Email or UUID) and search by it instead of by a row number that changes.

Airtable adds a layer of capabilities beyond Sheets: Records with a fixed ID that does not change, Relations between Tables, Formula Fields that compute values automatically, and Views that display the same data in different ways. The RESTful Airtable API allows Upsert (update if it exists, add if it is new) — a Pattern critical for automations that run repeatedly on the same Dataset.

Notion for knowledge and task management

The Notion API lets you create new Pages, update Properties of Database Records, and add Blocks (content) into existing Pages. A common use: every new meeting in the CRM → an automatic Notion Page with a Meeting Notes template + Properties like Company, Owner, Stage. After the meeting, an AI summarizes the notes and adds a Summary Block to that Page automatically.

lightbulb
Tip — processing Hebrew Text in JSON

JSON supports full Unicode, including Hebrew, with no need for special encoding. Hebrew issues in n8n usually come from a wrong Charset in the HTTP Response. If you receive fields with ?? instead of Hebrew, add to the HTTP Request Node header: Accept-Charset: utf-8 and check that the Response arrives as UTF-8 and not ISO-8859-8. In most modern APIs this is not an issue, but old Israeli interfaces may require it.

Airtable Upsert — preventing duplicates
// step 1: search by Email
// GET https://api.airtable.com/v0/{baseId}/{tableId}
// Query: filterByFormula=({Email}="{{ $json.email }}")

// step 2 (IF Node): was a row found?
// IF records.length > 0 → Update
// ELSE → Create

// Update Record:
// PATCH https://api.airtable.com/v0/{baseId}/{tableId}/{recordId}
{
  "fields": {
    "Last Contact": "{{ $now }}",
    "Lead Score": "{{ $json.new_score }}",
    "Stage": "{{ $json.stage }}",
    "AI Summary": "{{ $json.ai_summary }}"
  }
}

// Create Record:
// POST https://api.airtable.com/v0/{baseId}/{tableId}
{
  "fields": {
    "Name": "{{ $json.name }}",
    "Email": "{{ $json.email }}",
    "Lead Score": "{{ $json.score }}",
    "Created": "{{ $now }}",
    "Source": "{{ $json.utm_source }}"
  }
}
  • Google Sheets takes 1–2 seconds per operation — not suitable for frequent Real-Time automations
  • An Airtable Record ID is fixed — always save it after creation for future updates
  • The Notion API limits 3 requests per second per Integration Token
  • Changing Date Formats: an n8n Code Node with moment.js, or a Set Node with an expression
  • For high-efficiency data — consider Supabase (PostgreSQL) instead of Sheets/Airtable
06
Module 6

Capstone project — a Lead Pipeline system

In the final project we build a full end-to-end business-automation system. The story: a potential customer fills out a lead form on the site. From that second, a complete automatic process begins — with no human touch — until a human touch is truly needed.

The system architecture

The full flow: (1) The lead form sends a Webhook to n8n with name, Email, company, budget. (2) n8n sends the data to the Claude API: "Give me a Lead Score from 0 to 100 and explain why, based on: budget, company size, industry". (3) Claude returns a Score + Rationale. (4) IF Score > 70: send a Slack Alert to the sales team with an "Open in CRM" button. (5) Create a new Airtable Record with all the data + AI Score + Rationale. (6) Send an automatic Email to the Lead with personalized content written by Claude. (7) If Score > 70, create a Google Calendar Event and an Invite for an automatic intro meeting.

This project demonstrates the true power of combining AI with automation: not just moving data, but automatic decision-making. The AI does not just assist — it is part of the business Routing mechanism. A high-quality lead gets a response within 3 minutes of submitting, 24/7.

n8n Workflow JSON — Lead Pipeline Skeleton
{
  "name": "Lead Pipeline — AI Qualification",
  "nodes": [
    {
      "name": "Webhook — New Lead",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "new-lead",
        "responseMode": "responseNode"
      }
    },
    {
      "name": "Claude — Lead Scorer",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.anthropic.com/v1/messages",
        "method": "POST",
        "body": {
          "model": "claude-3-5-haiku-20241022",
          "max_tokens": 512,
          "system": "Score leads 0-100. Return JSON: {score, rationale_he, recommended_action}",
          "messages": [{
            "role": "user",
            "content": "Lead: {{ $json.name }}, Budget: {{ $json.budget }}, Company: {{ $json.company }}"
          }]
        }
      }
    },
    {
      "name": "IF — High Value Lead",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "number": [{ "value1": "={{ $json.score }}", "operation": "larger", "value2": 70 }]
        }
      }
    },
    {
      "name": "Airtable — Upsert Lead",
      "type": "n8n-nodes-base.airtable",
      "parameters": {
        "operation": "upsert",
        "table": "Leads",
        "fieldsToMatchOn": ["Email"]
      }
    },
    {
      "name": "Slack — Sales Alert",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#sales-leads",
        "messageType": "block"
      }
    },
    {
      "name": "Google Calendar — Schedule Meeting",
      "type": "n8n-nodes-base.googleCalendar",
      "parameters": {
        "operation": "create",
        "calendar": "primary",
        "attendees": "={{ $json.email }}"
      }
    }
  ]
}

Testing strategy

Before going to production, test the Workflow in three stages. Unit Testing: run each Node separately with dummy data — make sure the Claude Prompt returns valid JSON, that the Airtable Upsert works without duplicates, that the Slack Message is sent in the correct format. Integration Testing: run the whole Workflow with 5 fictitious Leads with different data — 2 with a high Score, 2 with a low Score, 1 with missing data. Edge Cases: what happens if the Claude API returns broken JSON? Add a Try/Catch in the Code Node that parses the AI Response and returns a default value if there is an error.

A Deployment Checklist for production

  • All API Keys moved to n8n Credentials — no hardcoded Keys in Nodes
  • Error Handler Nodes configured for every critical Node — errors logged to Slack
  • Retry configured on HTTP Request Nodes to AI APIs (3 attempts, 5 seconds wait)
  • The Webhook URL secured with Header Auth — not open to anyone who guesses the URL
  • Rate Limit Handling — a Wait Node before high-volume AI calls
  • Monitoring: a dedicated Workflow that runs every hour and checks that the Pipeline works correctly
  • Backup: Export all the Workflows to JSON into a Git folder
  • Documentation: Sticky Notes in n8n on each Node explaining what it does
lightbulb
Tip — Iterative Improvement

After the system has been running for a week — check the Execution History. Which Nodes fail the most? Where is the bottleneck? How many Tokens does the AI Scorer use on average? This data will show you exactly how to improve. For example: if 40% of the Leads get a Score of 65–75 (borderline), improve the System Prompt to get a clearer split. Better results, lower cost — just like Continuous Improvement in software development.

emoji_events

You finished the course — congratulations!

Now you have the tools to build any automation system you can imagine. The next step — join the community and share the project you built.