{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {},
      "id": "44bd18c9-197f-4c6c-b226-d1f2fd5ea8c1",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -688,
        352
      ]
    },
    {
      "parameters": {
        "content": "## Astra Email Extractor v2\n\n**\u041f\u043e\u0442\u043e\u043a:**\n1. \u0427\u0438\u0442\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 Google Sheets\n2. \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0433\u0434\u0435 E-mail 1 \u0443\u0436\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\n3. \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c URL > \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0430\u0439\u0442 > \u0438\u0449\u0435\u043c email\n4. \u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430\n5. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c E-mail 1 \u0438 E-mail 2 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\n\n**Batch:** 5 | **Timeout:** 10\u0441",
        "height": 280,
        "width": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        112,
        -48
      ],
      "id": "5ad9e33b-f737-47d0-8450-d9bc1dd082d5",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1228423008,
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=1228423008"
        },
        "options": {}
      },
      "id": "acea4e6c-f1e6-4d35-9e4f-651f1fcd35a6",
      "name": "Read \u0410\u0441\u0442\u0440\u0430",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        224,
        752
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "condition-empty-check",
              "leftValue": "={{ $json.mailing_prepared }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "071d9b55-f71f-4a05-8ebb-2296eb9b9456",
      "name": "IF Empty",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        448,
        752
      ]
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "options": {}
      },
      "id": "0e0025fc-149e-4c41-ac53-eafd540b7103",
      "name": "Read MAILING",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        672,
        752
      ],
      "alwaysOutputData": true,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const astraItems = $('IF Empty').all();\nconst mailingItems = $input.all();\n\nconst existingKeys = new Set();\nfor (const item of mailingItems) {\n  const k = (item.json.key || '').toString().trim();\n  if (k) existingKeys.add(k);\n}\n\nconst results = [];\n\nfor (const item of astraItems) {\n  const row = item.json;\n  const id = (row['ID'] || '').toString().trim();\n  if (!id) continue;\n\n  const company = (row['\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435'] || '').toString().trim();\n\n  // Segment detection from \u0420\u0443\u0431\u0440\u0438\u043a\u0438\n  const rubrics = (row['\u0420\u0443\u0431\u0440\u0438\u043a\u0438'] || '').toString().toLowerCase();\n  let segment = 'business';\n  if (rubrics.includes('\u0434\u0438\u0437\u0430\u0439\u043d') || rubrics.includes('\u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440') || rubrics.includes('\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442')) {\n    segment = 'designer';\n  }\n\n  const rawEmails = [row['E-mail 1'], row['E-mail 2']];\n  const emails = [...new Set(\n    rawEmails\n      .filter(e => e != null && e.toString().trim() !== '')\n      .map(e => e.toString().trim().toLowerCase())\n  )];\n  if (emails.length === 0) continue;\n\n  let website = '';\n  for (const f of ['\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 1', '\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 2', '\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 3']) {\n    const v = row[f];\n    if (v != null && v.toString().trim() !== '') {\n      website = v.toString().trim();\n      if (!/^https?:\\/\\//i.test(website)) website = 'http://' + website;\n      break;\n    }\n  }\n\n  for (const email of emails) {\n    const key = `${id}|${email}`;\n    results.push({\n      json: {\n        key, email, company, segment, website,\n        status: 'queued', sent_at: '', error: '',\n        source_rowNumber: row['row_number'],\n        source_ID: id,\n        _action: existingKeys.has(key) ? 'update' : 'append'\n      }\n    });\n  }\n}\n\nreturn results;\n"
      },
      "id": "f2a1cc96-625e-418a-ba00-efd8859f5949",
      "name": "Normalize & Lookup",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        896,
        752
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-action-check",
              "leftValue": "={{ $json._action }}",
              "rightValue": "update",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "725be2a7-69a4-43a0-a62a-fd54a0c212b2",
      "name": "IF Exists",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1104,
        752
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "email": "={{ $json.email }}",
            "company": "={{ $json.company }}",
            "website": "={{ $json.website }}",
            "status": "={{ $json.status }}",
            "sent_at": "={{ $json.sent_at }}",
            "error": "={{ $json.error }}",
            "segment": "={{ $json.segment }}"
          },
          "matchingColumns": [
            "key"
          ],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "segment",
              "displayName": "segment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "website",
              "displayName": "website",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "sent_at",
              "displayName": "sent_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "error",
              "displayName": "error",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            }
          ]
        },
        "options": {}
      },
      "id": "33247d6a-03ab-4d97-9394-142d9fa15965",
      "name": "Update MAILING",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1328,
        624
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "email": "={{ $json.email }}",
            "company": "={{ $json.company }}",
            "website": "={{ $json.website }}",
            "status": "={{ $json.status }}",
            "sent_at": "={{ $json.sent_at }}",
            "error": "={{ $json.error }}",
            "segment": "={{ $json.segment }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "segment",
              "displayName": "segment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "website",
              "displayName": "website",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "sent_at",
              "displayName": "sent_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "error",
              "displayName": "error",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            }
          ]
        },
        "options": {}
      },
      "id": "734584bb-2a20-45ba-8dc7-0b4628b0ed00",
      "name": "Append MAILING",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1344,
        896
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1228423008,
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=1228423008"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ID": "={{ $('Normalize & Lookup').item.json.source_ID }}",
            "mailing_prepared": "1",
            "mailing_prepared_at": "={{ $now.toISO() }}"
          },
          "matchingColumns": [
            "ID"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "mailing_prepared",
              "displayName": "mailing_prepared",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "mailing_prepared_at",
              "displayName": "mailing_prepared_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            }
          ]
        },
        "options": {}
      },
      "id": "17c7694d-add2-4317-b485-c5c0236117f2",
      "name": "Mark Prepared",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1552,
        752
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1228423008,
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=1228423008"
        },
        "options": {}
      },
      "id": "fc313f40-78bc-4626-aa54-dc3cad30c7cb",
      "name": "Get Rows1",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 3,
      "position": [
        -352,
        352
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const row = { ...$json };\n// == 1. SELECT BEST URL ==\nconst clean = (v) => (typeof v === 'string' ? v.trim() : '');\nlet url =\n  clean(row[\"\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 1\"]) ||\n  clean(row[\"\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 2\"]) ||\n  clean(row[\"\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 3\"]) ||\n  clean(row[\"2GIS URL\"]) || '';\nif (url) {\n  url = url\n    .replace(/^[\\s\"'<>()\\[\\]{}]+|[\\s\"'<>()\\[\\]{}]+$/g, '')\n    .split(/[\\s,;]+/)[0]\n    .replace(/[),.;:\\s]+$/g, '');\n  if (url === '-' || url === '\\u2013') url = '';\n}\nif (url) {\n  if (url.startsWith('//')) url = `http:${url}`;\n  else if (!/^https?:\\/\\//i.test(url)) url = `http://${url}`;\n}\n// == 2. FETCH (timeout 5s, limit 200KB) ==\nlet html = '';\nif (url && /^https?:\\/\\//i.test(url)) {\n  try {\n    const resp = await this.helpers.httpRequest({\n      method: 'GET',\n      url,\n      headers: {\n        'User-Agent':\n          'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',\n      },\n      timeout: 5000,\n      encoding: 'utf-8',\n    });\n    const raw = typeof resp === 'string' ? resp : JSON.stringify(resp ?? '');\n    html = raw.length > 200000 ? raw.slice(0, 200000) : raw;\n  } catch (e) {\n    // timeout / error \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c\n  }\n}\n// == 3. QUICK EXIT \u0435\u0441\u043b\u0438 HTML \u043f\u0443\u0441\u0442 ==\nif (!html) {\n  return { json: { ...row, email_1: '', email_2: '' } };\n}\n// == 4. FILTERS ==\nconst FAKE_TLDS = /\\.(png|jpg|jpeg|gif|svg|webp|css|js|woff2?|ttf|eot|ico|map|min)$/i;\nconst PLATFORM_DOMAINS = [\n  'wixpress.com','wix.com','wixsite.com',\n  'tilda.cc','tildacdn.com','tildacdn.info',\n  'wordpress.com','wordpress.org','wp.com',\n  'sentry.io','carrotquest.io','calltouch.ru','callibri.ru',\n  '2gis.ru','2gis.com',\n  'googleapis.com','googleusercontent.com','gstatic.com',\n  'cloudflare.com','cloudflare-dns.com',\n  'amazonaws.com',\n  'mailchimp.com','mandrillapp.com',\n  'sendgrid.net','sendgrid.com',\n  'mailgun.org','mailgun.com',\n  'bitrix24.com','bitrix.info','bitrix24.ru',\n  'jivosite.com','jivo.ru',\n  'yandex.net','yandex-team.ru',\n  'google.com','facebook.com','meta.com',\n  'w3.org','schema.org','ogp.me','gravatar.com',\n  'example.com','example.org','test.com',\n];\nconst JUNK_PREFIXES = /^(noreply|no-reply|no\\.reply|mailer-daemon|postmaster|bounce|auto|daemon|root|abuse|null|devnull|undisclosed)/i;\nconst HEX_HASH = /^[0-9a-f-]{24,}$/i;\nfunction isGoodEmail(email) {\n  const idx = email.lastIndexOf('@');\n  if (idx < 1) return false;\n  const local = email.slice(0, idx);\n  const domain = email.slice(idx + 1);\n  if (!domain || !domain.includes('.')) return false;\n  if (FAKE_TLDS.test(email)) return false;\n  if (PLATFORM_DOMAINS.some(d => domain === d || domain.endsWith('.' + d))) return false;\n  if (JUNK_PREFIXES.test(local)) return false;\n  const cleanLocal = local.replace(/[.\\-_]/g, '');\n  if (HEX_HASH.test(cleanLocal) && cleanLocal.length > 24) return false;\n  if (local.length > 50) return false;\n  return true;\n}\n// == 5. EXTRACT (limit 50 matches max) ==\nconst EMAIL_RE = /[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}/gi;\nconst allMatches = html.match(EMAIL_RE) || [];\nconst deduped = [];\nconst seen = new Set();\nfor (const raw of allMatches.slice(0, 50)) {\n  const e = raw.trim()\n    .replace(/^[<(\"`[{]+|[>\")'`\\]}.,;:]+$/g, '')\n    .toLowerCase();\n  if (!e || seen.has(e) || !isGoodEmail(e)) continue;\n  seen.add(e);\n  deduped.push(e);\n  if (deduped.length >= 2) break;\n}\nreturn {\n  json: {\n    ...row,\n    email_1: deduped[0] || '',\n    email_2: deduped[1] || '',\n  },\n};"
      },
      "id": "3f1db824-2f96-4426-8045-dc8ca0cab060",
      "name": "Fetch & Extract1",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        528,
        256
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "cond-email",
              "leftValue": "={{ $json.email_1 }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "id": "cond-id",
              "leftValue": "={{ String($json.ID ?? '') }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "8c0f4238-c8c3-4146-a261-93dac9381cce",
      "name": "Ready to Update?1",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        768,
        256
      ]
    },
    {
      "parameters": {
        "batchSize": 5,
        "options": {}
      },
      "id": "18e18da3-72a5-4b1f-949c-679b195b56ee",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        64,
        352
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"E-mail\"]}}",
              "operation": "isEmpty"
            }
          ]
        }
      },
      "id": "b549aa9f-8c27-4e6c-aea6-8b3d70ca587d",
      "name": "E-mail 1 is empty?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        288,
        352
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1228423008,
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=1228423008"
        },
        "columnToMatchOn": "ID",
        "valueToMatchOn": "={{ String($json[\"ID\"]).trim() }}",
        "fieldsUi": {
          "values": [
            {
              "column": "E-mail 1",
              "fieldValue": "={{$json[\"email_1\"]}}"
            },
            {
              "column": "E-mail 2",
              "fieldValue": "={{$json[\"email_2\"]}}"
            }
          ]
        },
        "options": {}
      },
      "id": "f687c80b-50fb-413e-bb89-b90925616a50",
      "name": "Update Row",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 3,
      "position": [
        1344,
        240
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## \u0424\u0438\u043b\u044c\u0442\u0440\u044b email\n\n\u041e\u0442\u0441\u0435\u043a\u0430\u0435\u0442:\n- \u0424\u0430\u0439\u043b\u044b (.png, .jpg)\n- \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b (wix, tilda, bitrix)\n- \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 (noreply, bounce)\n- \u0425\u0435\u0448-\u0430\u0434\u0440\u0435\u0441\u0430 (605a7bae...)\n- \u0414\u043b\u0438\u043d\u043d\u044b\u0435 (>50 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432)\n\n\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442: gmail.com, mail.ru, yandex.ru",
        "height": 230,
        "width": 300
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1168,
        352
      ],
      "id": "c0ed1d36-44c3-4319-8c87-9e3653863050",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "width": 448
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        672,
        400
      ],
      "id": "3ccba7ba-9284-433d-8544-0b6480bf67c5",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "amount": 2
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1072,
        240
      ],
      "id": "cbf8bef9-2745-43ab-93bf-24b1703658ce",
      "name": "Wait1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 1
          },
          "conditions": [
            {
              "id": "cond-queued",
              "leftValue": "={{ $json.status }}",
              "rightValue": "queued",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "94a46fa2-9446-4982-a758-6a696a2be6ca",
      "name": "IF Queued",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        448,
        1296
      ]
    },
    {
      "parameters": {
        "maxItems": 50
      },
      "id": "2d5d6447-b72e-410c-ad42-e88764d02a14",
      "name": "Limit 50",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        656,
        1296
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "c357ae7f-6903-4127-b140-8b01eac27bf5",
      "name": "Split In Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        848,
        1296
      ]
    },
    {
      "parameters": {},
      "id": "d9d1be2a-90c4-4ec1-bddb-c2a1930d2c4d",
      "name": "Wait 45s",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1056,
        1296
      ]
    },
    {
      "parameters": {
        "jsCode": "const segment = $('Split In Batches').item.json.segment || 'business';\n\nconst businessHtml = `<!DOCTYPE html>\n<html lang=\"ru\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <title>\u0410\u0421\u0422\u0420\u0410 \u2014 \u043c\u0435\u0431\u0435\u043b\u044c \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f</title>\n  <!--[if mso]><noscript><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]-->\n  <style type=\"text/css\">\n    body,table,td,a{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}\n    table,td{mso-table-lspace:0pt;mso-table-rspace:0pt}\n    img{-ms-interpolation-mode:bicubic;border:0;height:auto;line-height:100%;outline:none;text-decoration:none}\n    body{margin:0;padding:0;width:100%!important;height:100%!important}\n    @media only screen and (max-width:620px){\n      .email-container{width:100%!important}\n      .fluid{max-width:100%!important;height:auto!important}\n      .stack-column{display:block!important;width:100%!important;max-width:100%!important;padding:0!important;margin-bottom:6px!important}\n      .mobile-padding{padding-left:24px!important;padding-right:24px!important}\n      .hero-img-cell{padding:0 16px!important}\n    }\n  </style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f5f4f0;font-family:Georgia,'Times New Roman',serif;\">\n  <div style=\"display:none;font-size:1px;color:#f5f4f0;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;\">\u041c\u044f\u0433\u043a\u0430\u044f \u043c\u0435\u0431\u0435\u043b\u044c \u043d\u0430 \u0437\u0430\u043a\u0430\u0437 \u0434\u043b\u044f \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432, \u0433\u043e\u0441\u0442\u0438\u043d\u0438\u0446 \u0438 \u0431\u0430\u0437 \u043e\u0442\u0434\u044b\u0445\u0430. \u041f\u0440\u0435\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e.</div>\n  <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"background-color:#f5f4f0;\"><tr><td style=\"padding:24px 0;\">\n    <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"600\" align=\"center\" class=\"email-container\" style=\"margin:auto;background-color:#ffffff;\">\n      <tr><td style=\"padding:32px 40px 24px 40px;text-align:left;\" class=\"mobile-padding\">\n        <span style=\"font-family:Georgia,'Times New Roman',Times,serif;font-size:28px;color:#2c2c2c;font-weight:normal;letter-spacing:0.02em;\">\u0410<span style=\"font-size:8px;vertical-align:middle;padding:0 2px;\">&bull;</span>\u0421\u0422\u0420\u0410</span>\n      </td></tr>\n      <tr><td style=\"padding:0 40px;\" class=\"hero-img-cell\">\n        <img src=\"https://i.imgur.com/Pg5dZUH.png\" alt=\"\u0423\u0433\u043b\u043e\u0432\u043e\u0439 \u0434\u0438\u0432\u0430\u043d \u2014 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0410\u0421\u0422\u0420\u0410\" width=\"520\" style=\"display:block;width:100%;max-width:520px;height:auto;border-radius:2px;\" class=\"fluid\"/>\n      </td></tr>\n      <tr><td style=\"padding:32px 40px 0 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!</p>\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u042f&nbsp;\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0439 <strong>\u0410\u0421\u0422\u0420\u0410</strong>, \u0420\u0430\u0432\u0438\u043b\u044c \u0421\u0430\u0434\u044b\u043a\u043e\u0432. \u041c\u044b&nbsp;\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043c\u044f\u0433\u043a\u0443\u044e \u043c\u0435\u0431\u0435\u043b\u044c \u0434\u043b\u044f \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432, \u0433\u043e\u0441\u0442\u0438\u043d\u0438\u0446 \u0438&nbsp;\u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u2014 \u043e\u0442&nbsp;\u0434\u0438\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u043e\u043d \u0438&nbsp;\u043b\u043e\u0431\u0431\u0438 \u0434\u043e&nbsp;VIP-\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u043e\u0432.</p>\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0423\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0430\u0448\u0435\u043c\u0443 \u0431\u0438\u0437\u043d\u0435\u0441\u0443.</p>\n      </td></tr>\n      <tr><td style=\"padding:8px 40px;\" class=\"mobile-padding\">\n        <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"background-color:#2c2c2c;border-radius:2px;\"><tr><td style=\"padding:28px 32px;text-align:center;\">\n          <p style=\"margin:0 0 6px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;\">\u0427\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c</p>\n          <p style=\"margin:0 0 8px 0;font-family:Georgia,'Times New Roman',serif;font-size:26px;font-weight:normal;color:#ffffff;line-height:1.3;\">\u041c\u0435\u0431\u0435\u043b\u044c \u043f\u043e\u0434 \u0432\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440</p>\n          <p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;color:#d4cfc6;line-height:1.5;\">\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e&nbsp;\u0432\u0430\u0448\u0435\u043c\u0443 \u0422\u0417,<br>\u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u043d\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c</p>\n        </td></tr></table>\n      </td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 8px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\"><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441 \u043d\u0430\u043c\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c:</strong></p></td></tr>\n      <tr><td style=\"padding:12px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">1</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u041b\u044e\u0431\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f.</strong> \u041d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b, \u0438\u0437\u043e\u0433\u043d\u0443\u0442\u044b\u0435 \u0444\u043e\u0440\u043c\u044b, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0432\u0430\u043d\u044b \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u0434&nbsp;\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043b \u0438&nbsp;\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u043a\u0443.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:16px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">2</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u041a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u043a\u0430\u043d\u0438 \u0438&nbsp;\u043a\u043e\u0436\u0430.</strong> \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441&nbsp;\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u0438\u0437\u043d\u043e\u0441\u043e\u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u0438 \u2014 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0441&nbsp;\u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:16px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">3</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u041f\u0440\u0435\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043f\u043b\u0430\u0442\u044b.</strong> \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u2014 \u0432\u044b&nbsp;\u043f\u043b\u0430\u0442\u0438\u0442\u0435 \u0437\u0430&nbsp;\u043c\u0435\u0431\u0435\u043b\u044c, \u0430&nbsp;\u043d\u0435&nbsp;\u0437\u0430&nbsp;\u0431\u0440\u0435\u043d\u0434 \u0438&nbsp;\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u043e\u0432.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 12px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;text-align:center;\">\u0423\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441</p><img src=\"https://i.postimg.cc/52JwjWCL/Chat-GPT-Image-14-fevr-2026-g-20-06-34.png\" alt=\"\u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0410\u0421\u0422\u0420\u0410\" width=\"520\" style=\"display:block;width:100%;max-width:520px;height:auto;\" class=\"fluid\"/></td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 16px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;\">\u041d\u0430\u0448\u0438 \u0440\u0430\u0431\u043e\u0442\u044b</p></td></tr>\n      <tr><td style=\"padding:0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"33%\" style=\"padding-right:4px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/Plw2t9v.jpeg\" alt=\"\u0414\u0438\u0432\u0430\u043d\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td><td width=\"34%\" style=\"padding:0 2px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/1e0cuHA.jpeg\" alt=\"\u041a\u0440\u0435\u0441\u043b\u043e\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td><td width=\"33%\" style=\"padding-left:4px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/psLnSUr.jpeg\" alt=\"\u041a\u0440\u0435\u0441\u043b\u043e Heritage\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td></tr></table></td></tr>\n      <tr><td style=\"padding:32px 40px 0 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0412&nbsp;\u043e\u0442\u0432\u0435\u0442\u043d\u043e\u043c \u043f\u0438\u0441\u044c\u043c\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0440\u043e\u043a\u0438, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438&nbsp;\u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430.</p>\n        <p style=\"margin:0 0 24px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0443.</p>\n      </td></tr>\n      <tr><td style=\"padding:0 40px 12px 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"60\"><tr><td style=\"border-top:1.5px solid #2c2c2c;font-size:1px;line-height:1px;\">&nbsp;</td></tr></table></td></tr>\n      <tr><td style=\"padding:0 40px 40px 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 2px 0;font-family:Georgia,'Times New Roman',serif;font-size:15px;color:#2c2c2c;font-weight:bold;\">\u0420\u0430\u0432\u0438\u043b\u044c \u0421\u0430\u0434\u044b\u043a\u043e\u0432</p>\n        <p style=\"margin:0 0 12px 0;font-family:Georgia,'Times New Roman',serif;font-size:14px;color:#6b6560;line-height:20px;\">\u041e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0439 \u0410\u0421\u0422\u0420\u0410</p>\n        <p style=\"margin:0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;color:#6b6560;line-height:22px;\">\n          <a href=\"mailto:mebel@a-stra.ru\" style=\"color:#2c2c2c;text-decoration:none;\">mebel@a-stra.ru</a><br>\n          <a href=\"tel:+79136263444\" style=\"color:#6b6560;text-decoration:none;\">+7 913 626-34-44</a><br>\n          <a href=\"https://t.me/R2D2_55\" style=\"color:#6b6560;text-decoration:none;\">Telegram</a>\n        </p>\n      </td></tr>\n    </table>\n    <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"600\" align=\"center\" class=\"email-container\" style=\"margin:auto;\"><tr><td style=\"padding:20px 40px;text-align:center;\">\n      <p style=\"margin:0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;color:#a0998e;line-height:18px;\">\u041c\u0435\u0431\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0410\u0421\u0422\u0420\u0410 \u00b7 \u0420\u043e\u0441\u0441\u0438\u044f<br><a href=\"{{unsubscribe_link}}\" style=\"color:#a0998e;text-decoration:underline;\">\u041e\u0442\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438</a></p>\n    </td></tr></table>\n  </td></tr></table>\n</body>\n</html>\n`;\n\nconst designerHtml = `<!DOCTYPE html>\n<html lang=\"ru\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <title>\u0410\u0421\u0422\u0420\u0410 \u2014 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u0432</title>\n  <!--[if mso]><noscript><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]-->\n  <style type=\"text/css\">\n    body,table,td,a{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}\n    table,td{mso-table-lspace:0pt;mso-table-rspace:0pt}\n    img{-ms-interpolation-mode:bicubic;border:0;height:auto;line-height:100%;outline:none;text-decoration:none}\n    body{margin:0;padding:0;width:100%!important;height:100%!important}\n    @media only screen and (max-width:620px){\n      .email-container{width:100%!important}\n      .fluid{max-width:100%!important;height:auto!important}\n      .stack-column{display:block!important;width:100%!important;max-width:100%!important;padding:0!important;margin-bottom:6px!important}\n      .mobile-padding{padding-left:24px!important;padding-right:24px!important}\n      .hero-img-cell{padding:0 16px!important}\n    }\n  </style>\n</head>\n<body style=\"margin:0;padding:0;background-color:#f5f4f0;font-family:Georgia,'Times New Roman',serif;\">\n  <div style=\"display:none;font-size:1px;color:#f5f4f0;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;\">\u0414\u043e 15% \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u2014 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440\u0430.</div>\n  <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"background-color:#f5f4f0;\"><tr><td style=\"padding:24px 0;\">\n    <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"600\" align=\"center\" class=\"email-container\" style=\"margin:auto;background-color:#ffffff;\">\n      <tr><td style=\"padding:32px 40px 24px 40px;text-align:left;\" class=\"mobile-padding\">\n        <span style=\"font-family:Georgia,'Times New Roman',Times,serif;font-size:28px;color:#2c2c2c;font-weight:normal;letter-spacing:0.02em;\">\u0410<span style=\"font-size:8px;vertical-align:middle;padding:0 2px;\">&bull;</span>\u0421\u0422\u0420\u0410</span>\n      </td></tr>\n      <tr><td style=\"padding:0 40px;\" class=\"hero-img-cell\">\n        <img src=\"https://i.imgur.com/psLnSUr.jpeg\" alt=\"\u041a\u0440\u0435\u0441\u043b\u043e Heritage\" width=\"520\" style=\"display:block;width:100%;max-width:520px;height:auto;border-radius:2px;\" class=\"fluid\"/>\n      </td></tr>\n      <tr><td style=\"padding:32px 40px 0 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!</p>\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u042f&nbsp;\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0439 <strong>\u0410\u0421\u0422\u0420\u0410</strong>, \u0420\u0430\u0432\u0438\u043b\u044c \u0421\u0430\u0434\u044b\u043a\u043e\u0432. \u041c\u044b&nbsp;\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043c\u044f\u0433\u043a\u0443\u044e \u043c\u0435\u0431\u0435\u043b\u044c \u2014 \u043e\u0442&nbsp;\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0434\u0438\u0432\u0430\u043d\u043e\u0432 \u0434\u043e&nbsp;\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0435\u0441\u0435\u043b \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u2014 \u0438&nbsp;\u0438\u0449\u0435\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0441\u0442\u0432\u0430.</p>\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0423\u0432\u0435\u0440\u0435\u043d, \u043d\u0430\u0448\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b.</p>\n      </td></tr>\n      <tr><td style=\"padding:8px 40px;\" class=\"mobile-padding\">\n        <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"background-color:#2c2c2c;border-radius:2px;\"><tr><td style=\"padding:28px 32px;text-align:center;\">\n          <p style=\"margin:0 0 6px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;\">\u041f\u0430\u0440\u0442\u043d\u0451\u0440\u0441\u043a\u043e\u0435 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u0438\u0435</p>\n          <p style=\"margin:0 0 8px 0;font-family:Georgia,'Times New Roman',serif;font-size:42px;font-weight:normal;color:#ffffff;line-height:1.1;\">\u0434\u043e 15%</p>\n          <p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;color:#d4cfc6;line-height:1.5;\">\u043e\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430,<br>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0442 \u0432\u0430\u0441</p>\n        </td></tr></table>\n      </td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 8px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\"><strong>\u0427\u0442\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c:</strong></p></td></tr>\n      <tr><td style=\"padding:12px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">1</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u0418\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u0430\u0448\u0438\u043c \u044d\u0441\u043a\u0438\u0437\u0430\u043c.</strong> \u0412\u043e\u043f\u043b\u043e\u0442\u0438\u043c \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u043e\u0442&nbsp;\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0432\u0430\u043d\u0430 \u0434\u043e&nbsp;\u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u0440\u0435\u0441\u043b\u0430 \u0441&nbsp;\u0440\u0435\u0437\u044c\u0431\u043e\u0439. \u0412\u0430\u0448 \u0434\u0438\u0437\u0430\u0439\u043d, \u043d\u0430\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:16px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">2</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u0414\u0435\u043c\u043e\u043a\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u043f\u0440\u0438 \u043f\u0440\u0435\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435.</strong> \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441&nbsp;\u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0436\u0435\u0439, \u0431\u0430\u0440\u0445\u0430\u0442\u043e\u043c, \u0432\u0435\u043b\u044e\u0440\u043e\u043c, \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0412\u0430\u0448\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0431\u0435\u0437 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u043d\u0438\u043a\u0430.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:16px 40px 0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"36\" valign=\"top\" style=\"padding-top:2px;\"><span style=\"display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;background-color:#2c2c2c;color:#ffffff;font-family:'Trebuchet MS',Helvetica,sans-serif;font-size:12px;border-radius:1px;\">3</span></td><td style=\"padding-left:12px;\"><p style=\"margin:0;font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:24px;color:#2c2c2c;\"><strong>\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u043e \u0432\u0441\u0435\u0439 \u0420\u043e\u0441\u0441\u0438\u0438.</strong> \u0421\u0440\u043e\u043a\u0438 \u0438&nbsp;\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u2014 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441&nbsp;\u0447\u0430\u0441\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430\u043c\u0438 \u0438&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438.</p></td></tr></table></td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 12px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;text-align:center;\">\u041d\u0430\u043c \u0434\u043e\u0432\u0435\u0440\u044f\u044e\u0442</p><img src=\"https://i.postimg.cc/52JwjWCL/Chat-GPT-Image-14-fevr-2026-g-20-06-34.png\" alt=\"\u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0410\u0421\u0422\u0420\u0410\" width=\"520\" style=\"display:block;width:100%;max-width:520px;height:auto;\" class=\"fluid\"/></td></tr>\n      <tr><td style=\"padding:28px 40px 0 40px;\" class=\"mobile-padding\"><p style=\"margin:0 0 16px 0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:#a0998e;\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442</p></td></tr>\n      <tr><td style=\"padding:0 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr><td width=\"33%\" style=\"padding-right:4px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/Plw2t9v.jpeg\" alt=\"\u0414\u0438\u0432\u0430\u043d\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td><td width=\"34%\" style=\"padding:0 2px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/1e0cuHA.jpeg\" alt=\"\u041a\u0440\u0435\u0441\u043b\u043e\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td><td width=\"33%\" style=\"padding-left:4px;\" class=\"stack-column\"><img src=\"https://i.imgur.com/Pg5dZUH.png\" alt=\"\u0414\u0438\u0432\u0430\u043d \u0443\u0433\u043b\u043e\u0432\u043e\u0439\" width=\"168\" style=\"display:block;width:100%;height:auto;border-radius:2px;\" class=\"fluid\"/></td></tr></table></td></tr>\n      <tr><td style=\"padding:32px 40px 0 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 20px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0412&nbsp;\u043e\u0442\u0432\u0435\u0442\u043d\u043e\u043c \u043f\u0438\u0441\u044c\u043c\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0440\u043e\u043a\u0438, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438&nbsp;\u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430.</p>\n        <p style=\"margin:0 0 24px 0;font-family:Georgia,'Times New Roman',serif;font-size:16px;line-height:26px;color:#2c2c2c;\">\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0443.</p>\n      </td></tr>\n      <tr><td style=\"padding:0 40px 12px 40px;\" class=\"mobile-padding\"><table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"60\"><tr><td style=\"border-top:1.5px solid #2c2c2c;font-size:1px;line-height:1px;\">&nbsp;</td></tr></table></td></tr>\n      <tr><td style=\"padding:0 40px 40px 40px;\" class=\"mobile-padding\">\n        <p style=\"margin:0 0 2px 0;font-family:Georgia,'Times New Roman',serif;font-size:15px;color:#2c2c2c;font-weight:bold;\">\u0420\u0430\u0432\u0438\u043b\u044c \u0421\u0430\u0434\u044b\u043a\u043e\u0432</p>\n        <p style=\"margin:0 0 12px 0;font-family:Georgia,'Times New Roman',serif;font-size:14px;color:#6b6560;line-height:20px;\">\u041e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u043e\u0439 \u0410\u0421\u0422\u0420\u0410</p>\n        <p style=\"margin:0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:13px;color:#6b6560;line-height:22px;\">\n          <a href=\"mailto:mebel@a-stra.ru\" style=\"color:#2c2c2c;text-decoration:none;\">mebel@a-stra.ru</a><br>\n          <a href=\"tel:+79136263444\" style=\"color:#6b6560;text-decoration:none;\">+7 913 626-34-44</a><br>\n          <a href=\"https://t.me/R2D2_55\" style=\"color:#6b6560;text-decoration:none;\">Telegram</a>\n        </p>\n      </td></tr>\n    </table>\n    <table role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"600\" align=\"center\" class=\"email-container\" style=\"margin:auto;\"><tr><td style=\"padding:20px 40px;text-align:center;\">\n      <p style=\"margin:0;font-family:'Trebuchet MS',Helvetica,Arial,sans-serif;font-size:11px;color:#a0998e;line-height:18px;\">\u041c\u0435\u0431\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0410\u0421\u0422\u0420\u0410 \u00b7 \u0420\u043e\u0441\u0441\u0438\u044f<br>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u044d\u0442\u043e \u043f\u0438\u0441\u044c\u043c\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0435\u0441\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440\u043e\u0432.<br><a href=\"{{unsubscribe_link}}\" style=\"color:#a0998e;text-decoration:underline;\">\u041e\u0442\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438</a></p>\n    </td></tr></table>\n  </td></tr></table>\n</body>\n</html>\n`;\n\nif (segment === 'designer') {\n  $input.item.json.html_body = designerHtml;\n  $input.item.json.email_subject = '\u0420\u0430\u0432\u0438\u043b\u044c \u0421\u0430\u0434\u044b\u043a\u043e\u0432, \u0410\u0421\u0422\u0420\u0410 \u2014 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u044c\u0435\u0440\u0430';\n} else {\n  $input.item.json.html_body = businessHtml;\n  $input.item.json.email_subject = '\u041c\u0435\u0431\u0435\u043b\u044c \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u2014 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0410\u0421\u0422\u0420\u0410';\n}\nreturn $input.item;"
      },
      "id": "4dc04add-d0ea-4a4a-b719-1d74068803a8",
      "name": "Select Template",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1264,
        1296
      ]
    },
    {
      "parameters": {
        "fromEmail": "mebel@a-stra.ru",
        "toEmail": "={{ $('Split In Batches').item.json.email }}",
        "subject": "={{ $json.email_subject }}",
        "html": "={{ $json.html_body }}",
        "options": {
          "replyTo": "mebel@a-stra.ru"
        },
        "emailType": "html"
      },
      "id": "135d921c-b2f8-4b4d-8df4-c3b46d31df10",
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        1456,
        1296
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 1
          },
          "conditions": [
            {
              "id": "cond-error",
              "leftValue": "={{ $json.error }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "719271db-106a-4d5d-a19d-61ba76727cc0",
      "name": "IF Send Error",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1664,
        1296
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f-key",
              "name": "key",
              "value": "={{ $('Split In Batches').item.json.key }}",
              "type": "string"
            },
            {
              "id": "f-status",
              "name": "status",
              "value": "error",
              "type": "string"
            },
            {
              "id": "f-sent_at",
              "name": "sent_at",
              "value": "",
              "type": "string"
            },
            {
              "id": "f-error",
              "name": "error",
              "value": "={{ $json.error.message || $json.error.description || 'Unknown SMTP error' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "41fcac54-e125-445a-9670-1992bd068d94",
      "name": "Set Error",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1888,
        1408
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "status": "={{ $json.status }}",
            "sent_at": "={{ $json.sent_at }}",
            "error": "={{ $json.error }}"
          },
          "matchingColumns": [
            "key"
          ],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "sent_at",
              "displayName": "sent_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "error",
              "displayName": "error",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            }
          ]
        },
        "options": {}
      },
      "id": "02a9524b-1d8c-430f-a0c9-ccbdb4cdf910",
      "name": "Update Error",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2112,
        1408
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "options": {}
      },
      "id": "d17a250e-bba4-4757-97c7-a1ec8d7e222b",
      "name": "Read MAILING1",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        224,
        1296
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f-key",
              "name": "key",
              "value": "={{ $('Split In Batches').item.json.key }}",
              "type": "string"
            },
            {
              "id": "f-status",
              "name": "status",
              "value": "sent",
              "type": "string"
            },
            {
              "id": "f-sent_at",
              "name": "sent_at",
              "value": "={{ $now.toISO() }}",
              "type": "string"
            },
            {
              "id": "f-error",
              "name": "error",
              "value": "",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "ceba165d-78f9-4a47-a809-8e9e3fb00e61",
      "name": "Set Sent1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1888,
        1168
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw",
          "mode": "list",
          "cachedResultName": "\u041d\u0435\u0444\u0442\u044f\u043d\u043a\u0430 \u0421\u0424\u041e",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 2028224456,
          "mode": "list",
          "cachedResultName": "MAILING",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHdNp2IuOJUs-1gtmSVIJ__MsgEKyq3qDkFixUs86cw/edit#gid=2028224456"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "key": "={{ $json.key }}",
            "status": "={{ $json.status }}",
            "sent_at": "={{ $json.sent_at }}",
            "error": "={{ $json.error }}"
          },
          "matchingColumns": [
            "key"
          ],
          "schema": [
            {
              "id": "key",
              "displayName": "key",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "sent_at",
              "displayName": "sent_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "error",
              "displayName": "error",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            }
          ]
        },
        "options": {}
      },
      "id": "28d51821-58b2-4a4b-a9c8-f6d07d40d439",
      "name": "Update Sent1",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2112,
        1168
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Read \u0410\u0441\u0442\u0440\u0430": {
      "main": [
        [
          {
            "node": "IF Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Empty": {
      "main": [
        [
          {
            "node": "Read MAILING",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read MAILING": {
      "main": [
        [
          {
            "node": "Normalize & Lookup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize & Lookup": {
      "main": [
        [
          {
            "node": "IF Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Exists": {
      "main": [
        [
          {
            "node": "Update MAILING",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Append MAILING",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update MAILING": {
      "main": [
        [
          {
            "node": "Mark Prepared",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append MAILING": {
      "main": [
        [
          {
            "node": "Mark Prepared",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rows1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch & Extract1": {
      "main": [
        [
          {
            "node": "Ready to Update?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ready to Update?1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "E-mail 1 is empty?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "E-mail 1 is empty?": {
      "main": [
        [
          {
            "node": "Fetch & Extract1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Row": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Update Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Queued": {
      "main": [
        [
          {
            "node": "Limit 50",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit 50": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split In Batches": {
      "main": [
        [
          {
            "node": "Wait 45s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 45s": {
      "main": [
        [
          {
            "node": "Select Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Template": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "main": [
        [
          {
            "node": "IF Send Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Send Error": {
      "main": [
        [
          {
            "node": "Set Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Sent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Error": {
      "main": [
        [
          {
            "node": "Update Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Error": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read MAILING1": {
      "main": [
        [
          {
            "node": "IF Queued",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Sent1": {
      "main": [
        [
          {
            "node": "Update Sent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sent1": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Rows1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "184e4490-d750-417f-b49e-c5d46d0d3131",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "ES5c7KA6SLJnIQ5M",
  "tags": []
}