AutomationFlowsAI & RAG › Hostinger Form Lead Capture & Qualification with Openai, Beehiiv & Google Sheets

Hostinger Form Lead Capture & Qualification with Openai, Beehiiv & Google Sheets

ByAitor | 1Node @aitoralonso on n8n.io

This n8n workflow provides a robust solution for Hostinger website owners looking to streamline their lead capture and qualification process. By integrating AI and popular marketing tools, it ensures efficient management of new leads.

Event trigger★★★★☆ complexityAI-powered8 nodesHTTP RequestOpenAIGmail TriggerGoogle Sheets
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★★☆ AI nodes: yes Added:
Hostinger Form Lead Capture & Qualification with Openai, Beehiiv & Google Sheets — n8n workflow card showing HTTP Request, OpenAI, Gmail Trigger integration

This workflow corresponds to n8n.io template #4575 — we link there as the canonical source.

This workflow follows the Gmail Trigger → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "NYq3UCwuVeSy4t2X",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Hostinger website form lead qualification",
  "tags": [
    {
      "id": "55FGhjeaCcjBUam6",
      "name": "1node",
      "createdAt": "2025-04-30T08:13:16.484Z",
      "updatedAt": "2025-04-30T08:13:16.484Z"
    },
    {
      "id": "33yuvdx4oQ05TZoD",
      "name": "newsletter",
      "createdAt": "2025-05-02T08:18:43.148Z",
      "updatedAt": "2025-05-02T08:18:43.148Z"
    }
  ],
  "nodes": [
    {
      "id": "79eb3b2e-7039-4462-b63a-941a8b7ed5c5",
      "name": "List Beehiiv publications",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -684,
        -40
      ],
      "parameters": {
        "url": "https://api.beehiiv.com/v2/publications",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "495b8118-f0dc-442e-8b52-48cd3b698753",
      "name": "Add Beehiiv subscriber",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        -40
      ],
      "parameters": {
        "url": "=https://api.beehiiv.com/v2/publications/{{ $json.data[0].id }}/subscriptions",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "={{ $('Extract & Qualify').item.json.message.content.email }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3ae5298e-c0bf-44ef-9f1b-d6f1b8964c73",
      "name": "Extract & Qualify",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1060,
        -40
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a lead qualification engine. You will receive the text of an email containing a form response.\n\nHere is the form response: \n{{ $json.text }} \n\nYour task is to evaluate the fields: \"email\", \"company name\", and \"website\" to determine if a lead is qualified, as well as extracting the rest of the variables in the form response to output a JSON with all the fields.\n\n\"isQualified\" \u2192 true or false\n\"reason\" \u2192 short explanation if unqualified, empty string if qualified\n\nRules:\n\nIf the email domain is from a free provider (e.g., gmail.com, yahoo.com, hotmail.com, outlook.com), set isQualified = false and set reason = \"Personal email used\".\n\nIf the website field is missing, invalid, or not a proper URL, set isQualified = false and set reason = \"Invalid or missing website\".\n\nIf both email and website are acceptable, set isQualified = true and set reason = \"\".\n\nResponse format: Only return JSON with all the variables. No explanations, no additional text."
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "e35a283f-7ddd-4d20-b3cb-2a2d57cb1a36",
      "name": "New form trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -1280,
        -40
      ],
      "parameters": {
        "simple": false,
        "filters": {
          "sender": "user@example.com"
        },
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "172514fb-f8b5-4bf9-940c-edf115f6448d",
      "name": "insert in Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -244,
        -40
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('Extract & Qualify').item.json.message.content.name }}",
            "Role": "={{ $('Extract & Qualify').item.json.message.content.role }}",
            "Size": "={{ $('Extract & Qualify').item.json.message.content.companySize }}",
            "Email": "={{ $('Extract & Qualify').item.json.message.content.email }}",
            "Budget": "={{ $('Extract & Qualify').item.json.message.content.projectBudget }}",
            "Reason": "={{ $('Extract & Qualify').item.json.message.content.reason }}",
            "Company": "={{ $('Extract & Qualify').item.json.message.content.companyName }}",
            "Message": "={{ $('Extract & Qualify').item.json.message.content.howCanWeHelp }}",
            "Website": "={{ $('Extract & Qualify').item.json.message.content.companyWebsite }}",
            "Services": "={{ $('Extract & Qualify').item.json.message.content.servicesInterested }}",
            "Is Qualified": "={{ $('Extract & Qualify').item.json.message.content.isQualified }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Role",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Role",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Size",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Budget",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Budget",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Services",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Services",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Is Qualified",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Is Qualified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": true
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XpNF2nQfYkSCOYQbG-KR0PT3iisVyjO50p-GwhO_IMo/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XpNF2nQfYkSCOYQbG-KR0PT3iisVyjO50p-GwhO_IMo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XpNF2nQfYkSCOYQbG-KR0PT3iisVyjO50p-GwhO_IMo/edit?usp=drivesdk",
          "cachedResultName": "Website form responses"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "cbdae788-7246-4efa-adfe-1db0a395ce50",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -260
      ],
      "parameters": {
        "width": 300,
        "height": 380,
        "content": "## Set up steps\n- Create an account on [Hostinger](https://hostinger.es?REFERRALCODE=6MKHELLOUQOS) \n- Set up a form in your website and send a test response\n- Check your email to map the hostinger sender "
      },
      "typeVersion": 1
    },
    {
      "id": "738d2276-6cc0-41c8-9eec-ca26aba6a164",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -754,
        -260
      ],
      "parameters": {
        "width": 460,
        "height": 380,
        "content": "## Newsletter sync \nEvery time a user fills your contact form, they will be added to your newsletter on [Beehiiv](https://www.beehiiv.com?via=1node-ai). Just make sure you have added this inside your terms and conditions.\n\nWe have tried other tools but this one remains the strongest, offering flexible features for free"
      },
      "typeVersion": 1
    },
    {
      "id": "e99246b5-38a2-4c3b-bfc1-dfacb6ad208f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1060,
        -260
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "content": "## Extract form response\nOne of Hostinger's weaknesses is not being able to store form data. This is where we message an OpenAI model to extract email data as JSON"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "timezone": "Europe/Madrid",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "qFOYM3IA9QZ7fMym",
    "executionOrder": "v1"
  },
  "versionId": "8c6c1826-b6fd-46f7-88fd-0986d99fe7e1",
  "connections": {
    "New form trigger": {
      "main": [
        [
          {
            "node": "Extract & Qualify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "insert in Sheets": {
      "main": [
        []
      ]
    },
    "Extract & Qualify": {
      "main": [
        [
          {
            "node": "List Beehiiv publications",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Beehiiv subscriber": {
      "main": [
        [
          {
            "node": "insert in Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Beehiiv publications": {
      "main": [
        [
          {
            "node": "Add Beehiiv subscriber",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow provides a robust solution for Hostinger website owners looking to streamline their lead capture and qualification process. By integrating AI and popular marketing tools, it ensures efficient management of new leads.

Source: https://n8n.io/workflows/4575/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow converts emailed timesheets into structured invoice rows in Google Sheets and stores them in the correct Google Drive folder structure.

Gmail Trigger, OpenAI, Google Sheets +2
AI & RAG

This n8n workflow — HRMate — streamlines your entire recruitment process by automatically parsing incoming job applications, evaluating candidate fit using AI, and sending personalized acceptance or r

HTTP Request, Gmail Trigger, OpenAI +2
AI & RAG

Overview

Gmail Trigger, Google Drive, OpenAI +4
AI & RAG

Small teams, solo operators, and security-conscious individuals who receive email attachments from external senders. Useful for freelancers, agencies, HR teams, and anyone handling CVs, invoices, or d

Gmail Trigger, HTTP Request, OpenAI +4
AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2