{
  "name": "contact-form-automation",
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "=Jeste\u015b asystentem firmy tworz\u0105cej strony internetowe i systemy automatyzacji AI dla ma\u0142ych i \u015brednich firm.\n\nTwoim zadaniem jest:\n\nOceni\u0107 potencjalnego klienta w skali 1\u201310 (lead_score).\n\nOszacowa\u0107 orientacyjn\u0105 cen\u0119 projektu w PLN (estimated_price) na podstawie zapytania.\n\nDane klienta:\n\nImi\u0119: {{ $json.body.firstName }}\nEmail: {{ $json.body.email }}\nTre\u015b\u0107 zapytania:\n{{ $json.body.message }}\n\nCennik orientacyjny:\n\nStrony internetowe\n\nStrona wizyt\u00f3wka: 2 500 \u2013 4 500 z\u0142\nStrona firmowa / CMS: 4 500 \u2013 8 000 z\u0142\nSklep internetowy: 8 000 \u2013 15 000 z\u0142\n\nAutomatyzacje AI / integracje\nAutomatyzacja biznesowa: 1 500 \u2013 7 000 z\u0142\n\nBackend / API\nBackend lub API: 5 000 \u2013 15 000 z\u0142\n\nInstrukcje:\n\nDok\u0142adnie przeanalizuj tre\u015b\u0107 zapytania.\n\nNa tej podstawie oce\u0144 lead_score (1\u201310).\n\nPodaj estimated_price mieszcz\u0105ce si\u0119 w odpowiednim zakresie.\n\nZwr\u00f3\u0107 odpowied\u017a wy\u0142\u0105cznie w JSON w formacie:\n\n{\n \"lead_score\": number,\n \"estimated_price\": text\n}",
        "needsFallback": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        80,
        32
      ],
      "id": "725369b7-5e8d-4d4b-af67-00a74e307601",
      "name": "AI Prepare data to Notion"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "contact-form",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -736,
        32
      ],
      "id": "91497a0c-8821-44fc-a1f0-7cadbf671e86",
      "name": "Webhook"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"status\": \"accepted\",\n  \"message\": \"Webhook received successfully\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        -544,
        32
      ],
      "id": "590a6e31-5031-4a9d-9c72-89bbefeab8b3",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.lead_score }}",
                    "rightValue": 7,
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "id": "c41f499d-7102-4106-9d15-cb99f7e20cf8"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Hot 7-10"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "71cafd10-39da-4737-9608-106816694746",
                    "leftValue": "={{ $json.lead_score }}",
                    "rightValue": 4,
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Warm 4-6"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "bdd98b99-2d01-438c-9345-b826d21c3946",
                    "leftValue": "={{ $json.lead_score }}",
                    "rightValue": 3,
                    "operator": {
                      "type": "number",
                      "operation": "lte"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Cold 0-3"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        656,
        16
      ],
      "id": "4144932f-6f7a-4d89-8d38-d615570657b7",
      "name": "Switch"
    },
    {
      "parameters": {
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "value": "32130768-f350-80b1-9e44-feab1624f82b",
          "mode": "list",
          "cachedResultName": "Lead Database",
          "cachedResultUrl": "https://www.notion.so/32130768f35080b19e44feab1624f82b"
        },
        "title": "=Lead {{ $('On form submission').item.json.Name }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{ $('On form submission').item.json.LastName }}"
            },
            {
              "key": "Lead_Score|number",
              "numberValue": "={{ $('Extract JSON').item.json.lead_score }}"
            },
            {
              "key": "Estimated_Price|rich_text",
              "textContent": "={{ $('Extract JSON').item.json.estimated_price }}"
            },
            {
              "key": "AI_Response|rich_text",
              "textContent": "={{ $json.output }}"
            },
            {
              "key": "Email|email",
              "emailValue": "={{ $('On form submission').item.json.email }}"
            },
            {
              "key": "Lead Status|rich_text",
              "textContent": "Hot"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        1232,
        -464
      ],
      "id": "66335a3f-988d-431d-aab4-42485236e46e",
      "name": "Add hot lead",
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "value": "32130768-f350-80b1-9e44-feab1624f82b",
          "mode": "list",
          "cachedResultName": "Lead Database",
          "cachedResultUrl": "https://www.notion.so/32130768f35080b19e44feab1624f82b"
        },
        "title": "=Lead {{ $('Webhook').item.json.body.firstName }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{ $('Webhook').item.json.body.lastName }}"
            },
            {
              "key": "Lead_Score|number",
              "numberValue": "={{$('AI Prepare data to Notion').item.json.output.lead_score}}"
            },
            {
              "key": "Estimated_Price|rich_text",
              "textContent": "={{ $('AI Prepare data to Notion').item.json.output.estimated_price }}"
            },
            {
              "key": "AI_Response|rich_text",
              "textContent": "={{ $json.output }}"
            },
            {
              "key": "Email|email",
              "emailValue": "={{ $('Webhook').item.json.body.email }}"
            },
            {
              "key": "Lead Status|rich_text",
              "textContent": "warm"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        1232,
        -80
      ],
      "id": "2b53e09a-7e36-421f-9645-a89646782d6b",
      "name": "Add warm lead",
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "value": "32130768-f350-80b1-9e44-feab1624f82b",
          "mode": "list",
          "cachedResultName": "Lead Database",
          "cachedResultUrl": "https://www.notion.so/32130768f35080b19e44feab1624f82b"
        },
        "title": "=Lead {{ $('Webhook').item.json.body.firstName }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{ $('Webhook').item.json.body.lastName }}"
            },
            {
              "key": "Lead_Score|number",
              "numberValue": "={{$('AI Prepare data to Notion').item.json.output.lead_score}}"
            },
            {
              "key": "Estimated_Price|rich_text",
              "textContent": "={{ $('AI Prepare data to Notion').item.json.output.estimated_price }}"
            },
            {
              "key": "AI_Response|rich_text",
              "textContent": "={{ $json.output }}"
            },
            {
              "key": "Email|email",
              "emailValue": "={{ $('Webhook').item.json.body.email }}"
            },
            {
              "key": "Lead Status|rich_text",
              "textContent": "cold"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        1232,
        320
      ],
      "id": "a3c8634f-8482-4b8d-99a4-ec511a7ec296",
      "name": "Add cold lead",
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "gracjangniot12@gmail.com",
        "toEmail": "gracjangniot@icloud.com",
        "subject": "wpad\u0142 hot lead ziutek",
        "html": "hot lead wpad\u0142 sprawd\u017a u siebie sytuacj\u0119, ponizej dane:\n",
        "options": {}
      },
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        1456,
        -464
      ],
      "id": "1f61ee62-f789-4e2a-8a99-e49b7174b750",
      "name": "Send an Email",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cab5fff9-b2ca-4723-a790-4b30151302ab",
              "name": "body.firstName",
              "value": "={{ $json.Name }}",
              "type": "string"
            },
            {
              "id": "177e4d22-79a1-47c8-aa08-97fc70fb0b22",
              "name": "body.lastName",
              "value": "={{ $json.LastName }}",
              "type": "string"
            },
            {
              "id": "d9b08b4a-ea36-4dca-b5c8-60c046e1eac4",
              "name": "body.email",
              "value": "={{ $json.email }}",
              "type": "string"
            },
            {
              "id": "81cecec3-9c02-4486-a76a-5d6b4c720e3d",
              "name": "body.message",
              "value": "={{ $json.message }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -368,
        32
      ],
      "id": "5cf5d019-1205-4a7c-8e26-42bd9d208987",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -144,
        32
      ],
      "id": "44d8e4c5-8baf-4927-8877-c178a1fbcc8f",
      "name": "Wait"
    },
    {
      "parameters": {
        "jsCode": "// Input: odpowied\u017a AI z poprzedniego node'a\nconst aiOutput = $('AI Prepare data to Notion').first().json.output; // dostosuj pole je\u015bli trzeba\n\n// Wyci\u0105gnij JSON z markdown code blocka lub czystego tekstu\nfunction extractJSON(text) {\n  // Usu\u0144 ```json ... ``` lub ``` ... ```\n  const codeBlockMatch = text.match(/```(?:json)?\\s*([\\s\\S]*?)```/);\n  if (codeBlockMatch) {\n    return JSON.parse(codeBlockMatch[1].trim());\n  }\n\n  // Spr\u00f3buj wyci\u0105gn\u0105\u0107 surowy JSON (np. { ... })\n  const rawMatch = text.match(/\\{[\\s\\S]*\\}/);\n  if (rawMatch) {\n    return JSON.parse(rawMatch[0].trim());\n  }\n\n  throw new Error('Nie znaleziono JSON-a w odpowiedzi AI');\n}\n\nconst parsed = extractJSON(aiOutput);\n\nreturn [{ json: parsed }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        432,
        32
      ],
      "id": "7c22e1bc-4079-4b55-9768-40727a9f3850",
      "name": "Extract JSON"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Jeste\u015b asystentem firmy tworz\u0105cej strony internetowe i automatyzacje z AI dla ma\u0142ych i \u015brednich firm.\n\nTwoim zadaniem jest napisa\u0107 naturaln\u0105 odpowied\u017a na zapytanie z formularza kontaktowego.\n\nDane klienta\n\nImi\u0119: {{ $('On form submission').item.json.Name }}\nEmail: {{ $('On form submission').item.json.email }}\nTre\u015b\u0107 zapytania: {{ $('On form submission').item.json.message }}\nOrientacyjna wycena: {{ $json.estimated_price }}\nLead score: {{ $json.lead_score }}\n\nZadanie\n\nNapisz kr\u00f3tk\u0105 odpowied\u017a mailow\u0105, kt\u00f3ra:\n\ndzi\u0119kuje za wiadomo\u015b\u0107\n\npokazuje, \u017ce rozumiesz zapytanie klienta\n\nje\u015bli zakres projektu jest jasny, podaje orientacyjn\u0105 wycen\u0119 (na podstawie estimated_price)\n\nzaznacza, \u017ce jest to wst\u0119pna wycena\n\nproponuje kr\u00f3tk\u0105 rozmow\u0119 15\u201320 minut, \u017ceby doprecyzowa\u0107 szczeg\u00f3\u0142y\n\nko\u0144czy si\u0119 pytaniem zach\u0119caj\u0105cym do dalszej rozmowy\n\nStyl naturalny, konkretny, ludzki, bez marketingowych slogan\u00f3w, bez emoji, kr\u00f3tki mail (kilka zda\u0144)\n\nU\u017cywaj znacznie cieplejszego tonu, b\u0105d\u017a bardziej uprzejmy i podkre\u015bl, \u017ce ta oferta jest wa\u017cna, u\u017cywaj zwrot\u00f3w grzeczno\u015bciowych\n\nOdpowied\u017a ma by\u0107 wy\u0142\u0105cznie tre\u015bci\u0105 maila (bez JSON).",
        "needsFallback": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        880,
        -464
      ],
      "id": "5612c8fa-010f-40fa-8150-612c2e0ad0de",
      "name": "Hot respond"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Jeste\u015b asystentem firmy tworz\u0105cej strony internetowe i automatyzacje z AI dla ma\u0142ych i \u015brednich firm.\n\nTwoim zadaniem jest napisa\u0107 naturaln\u0105 odpowied\u017a na zapytanie z formularza kontaktowego.\n\nDane klienta\n\nImi\u0119: {{ $('Webhook').item.json.body.firstName }}\nEmail: {{ $('Webhook').item.json.body.email }}\nTre\u015b\u0107 zapytania: {{ $('Webhook').item.json.body.message }}\nOrientacyjna wycena: {{ $json.estimated_price }}\nLead score: {{ $json.lead_score }}\n\nZadanie\n\nNapisz kr\u00f3tk\u0105 odpowied\u017a mailow\u0105, kt\u00f3ra:\n\ndzi\u0119kuje za wiadomo\u015b\u0107\n\npokazuje, \u017ce rozumiesz zapytanie klienta\n\nje\u015bli zakres projektu jest jasny, podaje orientacyjn\u0105 wycen\u0119 (na podstawie estimated_price)\n\nzaznacza, \u017ce jest to wst\u0119pna wycena\n\nproponuje kr\u00f3tk\u0105 rozmow\u0119 15\u201320 minut, \u017ceby doprecyzowa\u0107 szczeg\u00f3\u0142y\n\nko\u0144czy si\u0119 pytaniem zach\u0119caj\u0105cym do dalszej rozmowy\n\nStyl naturalny, konkretny, ludzki, bez marketingowych slogan\u00f3w, bez emoji, kr\u00f3tki mail (kilka zda\u0144)\n\nTon niech b\u0119dzie uprzejmy ale nie przesadnie\n\nOdpowied\u017a ma by\u0107 wy\u0142\u0105cznie tre\u015bci\u0105 maila (bez JSON).",
        "needsFallback": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        880,
        32
      ],
      "id": "37dda13d-0042-42b6-90fe-d41edfbcb0b4",
      "name": "Warm respond"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Jeste\u015b asystentem firmy tworz\u0105cej strony internetowe i automatyzacje z AI dla ma\u0142ych i \u015brednich firm.\n\nTwoim zadaniem jest napisa\u0107 naturaln\u0105 odpowied\u017a na zapytanie z formularza kontaktowego.\n\nDane klienta\n\nImi\u0119: {{ $('Webhook').item.json.body.firstName }}\nEmail: {{ $('Webhook').item.json.body.email }}\nTre\u015b\u0107 zapytania: {{ $('Webhook').item.json.body.message }}\nOrientacyjna wycena: {{ $json.estimated_price }}\nLead score: {{ $json.lead_score }}\n\nZadanie\n\nNapisz kr\u00f3tk\u0105 odpowied\u017a mailow\u0105, kt\u00f3ra:\n\ndzi\u0119kuje za wiadomo\u015b\u0107\n\npokazuje, \u017ce rozumiesz zapytanie klienta\n\nje\u015bli zakres projektu jest jasny, podaje orientacyjn\u0105 wycen\u0119 (na podstawie estimated_price)\n\nzaznacza, \u017ce jest to wst\u0119pna wycena\n\nproponuje kr\u00f3tk\u0105 rozmow\u0119 15\u201320 minut, \u017ceby doprecyzowa\u0107 szczeg\u00f3\u0142y\n\nko\u0144czy si\u0119 pytaniem zach\u0119caj\u0105cym do dalszej rozmowy\n\nStyl naturalny, konkretny, ludzki, bez marketingowych slogan\u00f3w, bez emoji, kr\u00f3tki mail (kilka zda\u0144)\n\nOdpowied\u017a ma by\u0107 wy\u0142\u0105cznie tre\u015bci\u0105 maila (bez JSON).",
        "needsFallback": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        880,
        416
      ],
      "id": "21d655e2-700f-4933-8157-0a76482ac6e5",
      "name": "Cold respond"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        80,
        240
      ],
      "id": "955415c5-2589-4220-a2e4-887d8ea6a6e5",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "Dzi\u0119kujemy za zapytanie GG Automations",
        "message": "=<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"font-family: Arial, sans-serif; background:#f5f5f5; padding:20px;\">   <tr>     <td align=\"center\">       <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background:#ffffff; border-radius:8px; overflow:hidden;\">                  <!-- Header / logo -->         <tr>           <td style=\"padding:20px; text-align:center; background:#0B0F1A;\">             <img src=\"https://ggautomations.com/logo.svg\" alt=\"GG AI Automations\" width=\"120\" style=\"display:block; margin:0 auto;\">           </td>         </tr>                  <!-- Body -->         <tr>           <td style=\"padding:30px; color:#111111; font-size:16px; line-height:1.5;\">            {{$json.output}}           </td>         </tr>                                    <!-- Footer / legal -->         <tr>           <td style=\"padding:20px; font-size:12px; color:#777777; text-align:center;\">             GG AI Automations<br>             ul. Agrestowa 40, Zielona G\u00f3ra, Poland<br>             Je\u015bli nie chcesz otrzymywa\u0107 od nas wiadomo\u015bci, kliknij <a href=\"#\" style=\"color:#3B82F6;\">tutaj</a>.           </td>         </tr>                </table>     </td>   </tr> </table>",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1248,
        -272
      ],
      "id": "33bd273a-11e9-4006-a2d8-9a2038b42caf",
      "name": "Create a draft",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "Dzi\u0119kujemy za zapytanie GG Automations",
        "message": "=<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"font-family: Arial, sans-serif; background:#f5f5f5; padding:20px;\">   <tr>     <td align=\"center\">       <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background:#ffffff; border-radius:8px; overflow:hidden;\">                  <!-- Header / logo -->         <tr>           <td style=\"padding:20px; text-align:center; background:#0B0F1A;\">             <img src=\"https://ggautomations.com/logo.svg\" alt=\"GG AI Automations\" width=\"120\" style=\"display:block; margin:0 auto;\">           </td>         </tr>                  <!-- Body -->         <tr>           <td style=\"padding:30px; color:#111111; font-size:16px; line-height:1.5;\">            {{$json.output}}           </td>         </tr>                                    <!-- Footer / legal -->         <tr>           <td style=\"padding:20px; font-size:12px; color:#777777; text-align:center;\">             GG AI Automations<br>             ul. Agrestowa 40, Zielona G\u00f3ra, Poland<br>             Je\u015bli nie chcesz otrzymywa\u0107 od nas wiadomo\u015bci, kliknij <a href=\"#\" style=\"color:#3B82F6;\">tutaj</a>.           </td>         </tr>                </table>     </td>   </tr> </table>",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1264,
        112
      ],
      "id": "bd7a71e3-d450-4209-837f-990d50639029",
      "name": "Create a draft1",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "Dzi\u0119kujemy za zapytanie GG Automations",
        "emailType": "html",
        "message": "=<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"font-family: Arial, sans-serif; background:#f5f5f5; padding:20px;\">\n  <tr>\n    <td align=\"center\">\n      <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background:#ffffff; border-radius:8px; overflow:hidden;\">\n        \n        <!-- Header / logo -->\n        <tr>\n          <td style=\"padding:20px; text-align:center; background:#0B0F1A;\">\n            <img src=\"https://ggautomations.com/logo.svg\" alt=\"GG AI Automations\" width=\"120\" style=\"display:block; margin:0 auto;\">\n          </td>\n        </tr>\n        \n        <!-- Body -->\n        <tr>\n          <td style=\"padding:30px; color:#111111; font-size:16px; line-height:1.5;\">\n           {{$json.output}}\n          </td>\n        </tr>\n        \n        \n        \n        <!-- Footer / legal -->\n        <tr>\n          <td style=\"padding:20px; font-size:12px; color:#777777; text-align:center;\">\n            GG AI Automations<br>\n            ul. Agrestowa 40, Zielona G\u00f3ra, Poland<br>\n            Je\u015bli nie chcesz otrzymywa\u0107 od nas wiadomo\u015bci, kliknij <a href=\"#\" style=\"color:#3B82F6;\">tutaj</a>.\n          </td>\n        </tr>\n        \n      </table>\n    </td>\n  </tr>\n</table>",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1232,
        560
      ],
      "id": "aa129ea1-85d8-44cc-8d34-88cdae65e59e",
      "name": "Create a draft2",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "openrouter/free",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        80,
        432
      ],
      "id": "cca87bd4-1129-47f6-b0ba-30feb55717ad",
      "name": "OpenRouter Fallback Agent",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "AI Prepare data to Notion": {
      "main": [
        [
          {
            "node": "Extract JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Hot respond",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Warm respond",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cold respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add hot lead": {
      "main": [
        [
          {
            "node": "Send an Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "AI Prepare data to Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract JSON": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hot respond": {
      "main": [
        [
          {
            "node": "Add hot lead",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Warm respond": {
      "main": [
        [
          {
            "node": "Add warm lead",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a draft1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cold respond": {
      "main": [
        [
          {
            "node": "Add cold lead",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a draft2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Prepare data to Notion",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Hot respond",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Cold respond",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Warm respond",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Fallback Agent": {
      "ai_languageModel": [
        [
          {
            "node": "AI Prepare data to Notion",
            "type": "ai_languageModel",
            "index": 1
          },
          {
            "node": "Hot respond",
            "type": "ai_languageModel",
            "index": 1
          },
          {
            "node": "Warm respond",
            "type": "ai_languageModel",
            "index": 1
          },
          {
            "node": "Cold respond",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": true,
    "timeSavedMode": "dynamic",
    "timezone": "Europe/Warsaw",
    "callerPolicy": "workflowsFromSameOwner",
    "timeSavedPerExecution": 2
  },
  "versionId": "185ca35d-c335-4814-88f7-160180b6b89e",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "8UZhyzF0sjONQQ71",
  "tags": []
}