AutomationFlowsAI & RAG › Człowiek W Pętli

Człowiek W Pętli

Człowiek w pętli. Uses airtableTrigger, agent, lmChatAnthropic, airtableTool. Event-driven trigger; 13 nodes.

Event trigger★★★★☆ complexityAI-powered13 nodesAirtable TriggerAgentAnthropic ChatAirtable ToolOutput Parser StructuredGmailGoogle Gemini ChatText Classifier
AI & RAG Trigger: Event Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Airtabletool 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
{
  "name": "Cz\u0142owiek w p\u0119tli",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "authentication": "airtableTokenApi",
        "baseId": {
          "__rl": true,
          "value": "appyYJrKSh2myojgC",
          "mode": "id"
        },
        "tableId": {
          "__rl": true,
          "value": "tblSMz6kxTntSAAEs",
          "mode": "id"
        },
        "triggerField": "Created",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.airtableTrigger",
      "typeVersion": 1,
      "position": [
        -368,
        16
      ],
      "id": "8e843595-a569-4c90-94a3-3f5bceef71d7",
      "name": "Airtable Trigger",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Nowy potencjalny klient\n\nImie i nazwisko:{{ $json.fields['Imi\u0119 i nazwisko'] }}\n\nEmail:{{ $json.fields.Email }}\n\nNumer telefonu:{{ $json.fields['Numer Telefonu'] }}\n\nNazwa firmy: {{ $json.fields.nazwaFirmy }}\n\nIntencja:{{ $json.fields.Intencja }}\n\nBud\u017cet: {{ $json.fields['Bud\u017cet'] }}\n\nOpis projektu: {{ $json.fields.opisProjektu }}\n\nHarmonogram: {{ $json.fields.Harmonogram }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=Rola\nJeste\u015b ekspertem ds. sprzeda\u017cy w agencji dostarczaj\u0105cej rozwi\u0105zania AI. Twoim zadaniem jest odpowiadanie na nap\u0142ywaj\u0105ce leady, profesjonalnie odpowiadaj\u0105c na ich potrzeby. Otrzymasz informacje takie jak opis projektu i harmonogram, a Twoim celem jest przekonanie ich, \u017ce jeste\u015bmy najlepsz\u0105 agencj\u0105 AI na rynku.\nNarz\u0119dzia\n\nProjekty - tabela w bazie danych - u\u017cywaj tego narz\u0119dzia do przeszukiwania wcze\u015bniej zrealizowanych projekt\u00f3w.\n\nZasady\nOtrzymasz informacje o leadzie i musisz stworzy\u0107 zwi\u0119z\u0142y, profesjonalny e-mail.\n\nTw\u00f3j g\u0142\u00f3wny cel to przekonanie leada do um\u00f3wienia si\u0119 na drug\u0105 rozmow\u0119. Spraw, by uwierzy\u0142, \u017ce mo\u017cemy zrealizowa\u0107 jego projekt i przekroczy\u0107 oczekiwania.\n\nWyszukaj informacje o odpowiednich wcze\u015bniejszych projektach, aby przedstawi\u0107 je jako dow\u00f3d naszych kompetencji. Wspomnij o rezultacie, jaki pomogli\u015bmy osi\u0105gn\u0105\u0107 klientowi.\n\nDo\u0142\u0105cz link do um\u00f3wienia rozmowy: LINK\n\nPodpis e-mail\nPodpisuj e-maile jako:\nZesp\u00f3\u0142 XYZ\nHere is the current date/time: {{ $now }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        -160,
        16
      ],
      "id": "0d1b2095-2620-49b1-9e63-0f7897ed9da8",
      "name": "Agent sprzeda\u017cy"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-4-20250514",
          "mode": "list",
          "cachedResultName": "Claude Sonnet 4"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        368,
        464
      ],
      "id": "69380b34-8a42-4ba3-8a83-41eadd18c3e1",
      "name": "Anthropic Chat Model",
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appyYJrKSh2myojgC",
          "mode": "list",
          "cachedResultName": "Cz\u0142owiek w p\u0119tli",
          "cachedResultUrl": "https://airtable.com/appyYJrKSh2myojgC"
        },
        "table": {
          "__rl": true,
          "value": "tblUZ51DL9L3Z6W57",
          "mode": "list",
          "cachedResultName": "Projekty",
          "cachedResultUrl": "https://airtable.com/appyYJrKSh2myojgC/tblUZ51DL9L3Z6W57"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtableTool",
      "typeVersion": 2.1,
      "position": [
        -48,
        224
      ],
      "id": "893c719c-1562-4047-bce8-f2166f10d064",
      "name": "Projekty - tabela w bazie danych",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2574cc59-05fd-4b3b-b8b7-a2ec7dce7151",
              "name": "email",
              "value": "={{ $json.output.properties.email.description }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        192,
        16
      ],
      "id": "4776b883-2159-4f2d-8cca-bc80dd5b593f",
      "name": "Ustaw maila"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"subject\": {\n      \"type\": \"string\",\n      \"description\": \"The subcject line of the email\"\n    },\n    \"email\": {\n      \"type\": \"string\",\n      \"description\": \"The ody content of the email\"\n    }\n  },\n  \"required\": [\"subject\", \"email\"]\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        560,
        432
      ],
      "id": "a928a53d-819f-478e-9ef9-5387f19ca0af",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "operation": "sendAndWait",
        "sendTo": "testowynosiemn@gmail.com",
        "subject": "=WYMAGANA AKCEPTACJA DLA POTENCJALNEGO NOWEGO KLIENTA\n{{ $('Airtable Trigger').item.json.fields['Imi\u0119 i nazwisko'] }}",
        "message": "= {{ $('Airtable Trigger').item.json.fields['Imi\u0119 i nazwisko'] }}  z firmy {{ $('Airtable Trigger').item.json.fields.nazwaFirmy }} szuka {{ $('Airtable Trigger').item.json.fields.Intencja }} ich bud\u017cet {{ $('Airtable Trigger').item.json.fields['Bud\u017cet'] }} z harmonogramem {{ $('Airtable Trigger').item.json.fields.Harmonogram }}\n\nProsz\u0119 zatwierdzi\u0107 lub odrzuci\u0107 wys\u0142anie tej wiadomo\u015bci wygenerowanej przez Agenta AI\n\nTemat: {{ $('Agent sprzeda\u017cy').item.json.output.properties.subject.description }}\n\nEmail: {{ $('Agent sprzeda\u017cy').item.json.output.properties.email.description }}",
        "responseType": "freeText",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        400,
        16
      ],
      "id": "573ad388-b615-4dab-a1ea-40dca9404df2",
      "name": "Popro\u015b o opini\u0119",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        608,
        176
      ],
      "id": "b631fc21-726e-488a-8709-59f8662c6a5a",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Email: {{ $('Ustaw maila').item.json.email }}\n\nFeedback: {{ $('Popro\u015b o opini\u0119').item.json.data.text }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=Rola:\nJeste\u015b ekspertem w pisaniu maili. Twoim zadaniem jest wzi\u0105\u0107 otrzymanego e-maila i poprawi\u0107 go na podstawie opinii przes\u0142anej przez osob\u0119\n\nZasady:\nPodpisuj emaile jako: Zesp\u00f3\u0142 XYZ\nOto aktualna data/godzin: {{ $now }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        992,
        112
      ],
      "id": "3030e244-c04e-4248-9e78-521b3f6073c8",
      "name": "Agent korekty"
    },
    {
      "parameters": {
        "inputText": "={{ $json.data.text }}",
        "categories": {
          "categories": [
            {
              "category": "Zatwierdzone",
              "description": "=Email zosta\u0142 przejrzany i zaakceptowany w obecnej formie. Cz\u0142owiek wyra\u017ca wprost lub po\u015brednio akceptacj\u0119, wskazuj\u0105c, \u017ce nie s\u0105 potrzebne \u017cadne zmiany. Przyk\u0142adowe sformu\u0142owania: \"Wygl\u0105da dobrze\", \"Mo\u017cesz wys\u0142a\u0107\", \"To mi pasuje\", \"Zatwierdzone\", \"Nie s\u0105 potrzebne zmiany\""
            },
            {
              "category": "Odrzucone",
              "description": "=E-mail zosta\u0142 przejrzany, ale cz\u0142owiek prosi o wprowadzenie zmian przed wys\u0142aniem, takich jak poprawki, usuni\u0119cie fragment\u00f3w, przeredagowanie itp. Mo\u017ce to obejmowa\u0107 sugerowane edycje, zmian\u0119 sformu\u0142owa\u0144 lub wi\u0119ksze przer\u00f3bki. \n\nPrzyk\u0142adowe sformu\u0142owania: \u201eCzy mo\u017cemy poprawi\u0107 t\u0119 cz\u0119\u015b\u0107?\u201d, \u201eWymaga kilku zmian.\u201d, \u201eChcia\u0142bym to przeredagowa\u0107.\u201d, \u201eTo nie do ko\u0144ca to \u2013 poprawmy to.\u201d, \u201eMo\u017cesz to dostosowa\u0107 przed wys\u0142aniem?\u201d. Nie wspominaj, \u017ce nie mo\u017cemy tego zrobi\u0107."
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "typeVersion": 1.1,
      "position": [
        608,
        16
      ],
      "id": "d146141e-a3b6-4498-bb99-ce7655432ed6",
      "name": "Sprawdz feedback"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Airtable Trigger').item.json.fields.Email }}",
        "subject": "={{ $('Agent sprzeda\u017cy').item.json.output.properties.subject.description }}",
        "emailType": "text",
        "message": "={{ $('Ustaw maila').item.json.email }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        976,
        -208
      ],
      "id": "edaa89f2-4aab-4629-9fc3-4a4b817f3ac2",
      "name": "Wy\u015blij maila",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "\n\n## Agent sprzeda\u017cy\n",
        "height": 560,
        "width": 752,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -192
      ],
      "typeVersion": 1,
      "id": "204bd08c-3568-43bb-8a58-5b5dc55155b2",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "\n## Agent korekty je\u017celi cz\u0142owiekowi co\u015b nie pasuje\n\n",
        "height": 304,
        "width": 432
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -32
      ],
      "typeVersion": 1,
      "id": "2e3127f6-ef1a-4178-898f-564906de83f3",
      "name": "Sticky Note1"
    }
  ],
  "connections": {
    "Airtable Trigger": {
      "main": [
        [
          {
            "node": "Agent sprzeda\u017cy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent sprzeda\u017cy",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Agent korekty",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Projekty - tabela w bazie danych": {
      "ai_tool": [
        [
          {
            "node": "Agent sprzeda\u017cy",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Agent sprzeda\u017cy": {
      "main": [
        [
          {
            "node": "Ustaw maila",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Agent sprzeda\u017cy",
            "type": "ai_outputParser",
            "index": 0
          },
          {
            "node": "Agent korekty",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Ustaw maila": {
      "main": [
        [
          {
            "node": "Popro\u015b o opini\u0119",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Popro\u015b o opini\u0119": {
      "main": [
        [
          {
            "node": "Sprawdz feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Sprawdz feedback",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sprawdz feedback": {
      "main": [
        [
          {
            "node": "Wy\u015blij maila",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Agent korekty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent korekty": {
      "main": [
        [
          {
            "node": "Ustaw maila",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false,
    "timeSavedMode": "fixed",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "staticData": null,
  "triggerCount": 1,
  "meta": {
    "templateCredsSetupCompleted": true
  }
}

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

Człowiek w pętli. Uses airtableTrigger, agent, lmChatAnthropic, airtableTool. Event-driven trigger; 13 nodes.

Source: https://github.com/Kajhol/sales-workflow-n8n/blob/69a8ad9c7fd8a0857c2693112b4f6469873fc93f/sales-workflow.json — 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 n8n workflow automates sales processes using AI agents integrated with Airtable as a CRM and Gmail for email handling. It consists of two main workflows: one for handling Airtable status changes

Airtable Trigger, Agent, OpenAI Chat +9
AI & RAG

RESUME SCREENER. Uses agent, outputParserStructured, lmChatOpenAi, gmailTrigger. Event-driven trigger; 37 nodes.

Agent, Output Parser Structured, OpenAI Chat +7
AI & RAG

🧠 AI-Powered Lead Routing and Sales Team Distribution

HubSpot Trigger, HubSpot, Airtable +8
AI & RAG

This template and YouTube video goes over 5 different implementations of evaluations within n8n. Categorization Correctness Tools used String similarity Helpfulness

Evaluation, Evaluation Trigger, Google Gemini Chat +8
AI & RAG

This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents. ​

Tool Http Request, Agent, HTTP Request +27