{
  "format": "podpislon-workflow",
  "version": 1,
  "exported_at": "2026-10-15T11:22:53+00:00",
  "workflow": {
    "name": "ИИ-агент для контроля подписания договоров",
    "definition": {
      "nodes": [
        {
          "id": "schedule",
          "type": "workflow-node",
          "dimensions": {
            "width": 251,
            "height": 88
          },
          "computedPosition": {
            "x": 0,
            "y": 0,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "schedule",
                "position": "right",
                "x": 244.4921875,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": null
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 0,
            "y": 0
          },
          "data": {
            "nodeType": "schedule_trigger",
            "label": "Проверка раз в день",
            "config": {
              "mode": "daily",
              "time": "10:00",
              "timezone": "Europe/Moscow",
              "enabled": false,
              "weekdays": [
                1,
                2,
                3,
                4,
                5
              ]
            }
          },
          "events": []
        },
        {
          "id": "deals",
          "type": "workflow-node",
          "dimensions": {
            "width": 224,
            "height": 88
          },
          "computedPosition": {
            "x": 300,
            "y": 0,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "deals",
                "position": "right",
                "x": 216.60934448242188,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "deals",
                "position": "left",
                "x": -5,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 300,
            "y": 0
          },
          "data": {
            "nodeType": "bitrix24_get_deals",
            "label": "Сделки, ждущие подписи",
            "config": {
              "connection_id": "",
              "f_UF_CRM_SIGN_STATUS": "отправлен,просрочен",
              "select_fields": "ID,TITLE,ASSIGNED_BY_ID,UF_CRM_PODPISLON_DOC_ID,UF_CRM_SIGN_STATUS,UF_CRM_SIGN_LINK"
            }
          },
          "events": []
        },
        {
          "id": "loop",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 600,
            "y": 0,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "body",
                "type": "source",
                "nodeId": "loop",
                "position": "right",
                "x": 253,
                "y": 29.359375,
                "width": 12,
                "height": 12
              },
              {
                "id": "done",
                "type": "source",
                "nodeId": "loop",
                "position": "right",
                "x": 253,
                "y": 63.7265625,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "loop",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 600,
            "y": 0
          },
          "data": {
            "nodeType": "for_each",
            "label": "Для каждой сделки",
            "config": {
              "source_path": "{{ deals.deals }}"
            }
          },
          "events": []
        },
        {
          "id": "docs",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 900,
            "y": 150,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "docs",
                "position": "right",
                "x": 253,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "docs",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 900,
            "y": 150
          },
          "data": {
            "nodeType": "podpislon_get_docs",
            "label": "Подпислон: статус документа",
            "config": {
              "connection_id": "",
              "filter_fio": null,
              "filter_status": null,
              "filter_phone": "",
              "filter_date_from": null,
              "filter_date_to": null,
              "ids": "{{ loop.item.UF_CRM_PODPISLON_DOC_ID }}"
            }
          },
          "events": []
        },
        {
          "id": "check",
          "type": "workflow-node",
          "dimensions": {
            "width": 226,
            "height": 88
          },
          "computedPosition": {
            "x": 1200,
            "y": 150,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "check",
                "position": "right",
                "x": 218.5546875,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "check",
                "position": "left",
                "x": -5,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 1200,
            "y": 150
          },
          "data": {
            "nodeType": "code",
            "label": "Подписан / просрочен?",
            "config": {
              "code": "const deal = input.loop.item;\nconst doc = (input.docs.docs || []).find((d) => String(d.id) === String(deal.UF_CRM_PODPISLON_DOC_ID));\nconst days = Number(input.variables.REMIND_DAYS || 3);\n\nif (!doc) {\n  throw new Error(`Документ ${deal.UF_CRM_PODPISLON_DOC_ID} по сделке ${deal.ID} не найден в Подпислоне`);\n}\n\nif (String(doc.status) === \"30\") {\n  return { state: \"signed\", deal_id: deal.ID, doc };\n}\n\nif (String(doc.status) === \"40\") {\n  return { state: \"cancelled\", deal_id: deal.ID, doc };\n}\n\n// 35 — запрошено аннулирование: решения ещё нет, клиенту не напоминаем и ждём\nif (String(doc.status) === \"35\") {\n  return { state: \"waiting\", deal_id: deal.ID };\n}\n\nconst ageDays = Math.floor((Date.now() - Date.parse(doc.date_create)) / 86400000);\n\nif (Number.isNaN(ageDays)) {\n  throw new Error(`Не удалось разобрать дату отправки документа: ${doc.date_create}`);\n}\n\nif (deal.UF_CRM_SIGN_STATUS === \"отправлен\" && ageDays >= days) {\n  return { state: \"overdue\", deal_id: deal.ID, age_days: ageDays, doc };\n}\n\nreturn { state: \"waiting\", deal_id: deal.ID, age_days: ageDays };"
            }
          },
          "events": []
        },
        {
          "id": "route",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 1500,
            "y": 150,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "case_0",
                "type": "source",
                "nodeId": "route",
                "position": "right",
                "x": 253,
                "y": 15.6171875,
                "width": 12,
                "height": 12
              },
              {
                "id": "case_1",
                "type": "source",
                "nodeId": "route",
                "position": "right",
                "x": 253,
                "y": 36.234375,
                "width": 12,
                "height": 12
              },
              {
                "id": "case_2",
                "type": "source",
                "nodeId": "route",
                "position": "right",
                "x": 253,
                "y": 56.8515625,
                "width": 12,
                "height": 12
              },
              {
                "id": "default",
                "type": "source",
                "nodeId": "route",
                "position": "right",
                "x": 253,
                "y": 77.46875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "route",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 1500,
            "y": 150
          },
          "data": {
            "nodeType": "switch",
            "label": "Условие",
            "config": {
              "field": "{{ check.state }}",
              "cases": "[{\"value\":\"signed\"},{\"value\":\"overdue\"},{\"value\":\"cancelled\"}]"
            }
          },
          "events": []
        },
        {
          "id": "mark_signed",
          "type": "workflow-node",
          "dimensions": {
            "width": 232,
            "height": 88
          },
          "computedPosition": {
            "x": 1800,
            "y": 50,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "mark_signed",
                "position": "right",
                "x": 224.7735595703125,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "mark_signed",
                "position": "left",
                "x": -5,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 1800,
            "y": 50
          },
          "data": {
            "nodeType": "bitrix24_update_deal",
            "label": "Сделка: договор подписан",
            "config": {
              "connection_id": "",
              "deal_id": "{{ loop.item.ID }}",
              "title": null,
              "stage_id": "{{ variables.STAGE_SIGNED }}",
              "category_id": "",
              "opportunity": null,
              "assigned_by_id": "",
              "contact_id": "",
              "company_id": "",
              "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"подписан\"\n}"
            }
          },
          "events": []
        },
        {
          "id": "resend",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 126
          },
          "computedPosition": {
            "x": 1800,
            "y": 250,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "resend",
                "position": "right",
                "x": 253.0001220703125,
                "y": 57.046875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "resend",
                "position": "left",
                "x": -5,
                "y": 57.046875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 1800,
            "y": 250
          },
          "data": {
            "nodeType": "podpislon_resend",
            "label": "Подпислон: переотправить ссылку",
            "config": {
              "connection_id": "",
              "package_id": "{{ check.doc.package }}",
              "contact": null
            }
          },
          "events": []
        },
        {
          "id": "mark_overdue",
          "type": "workflow-node",
          "dimensions": {
            "width": 220,
            "height": 88
          },
          "computedPosition": {
            "x": 2100,
            "y": 250,
            "z": 1000
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "mark_overdue",
                "position": "right",
                "x": 213,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "mark_overdue",
                "position": "left",
                "x": -5,
                "y": 38.1484375,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": true,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 2100,
            "y": 250
          },
          "data": {
            "nodeType": "bitrix24_update_deal",
            "label": "Сделка: просрочен",
            "config": {
              "connection_id": "",
              "deal_id": "{{ loop.item.ID }}",
              "title": null,
              "stage_id": "",
              "category_id": "",
              "opportunity": null,
              "assigned_by_id": "",
              "contact_id": "",
              "company_id": "",
              "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"просрочен\"\n}"
            }
          },
          "events": []
        },
        {
          "id": "mark_cancelled",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 109
          },
          "computedPosition": {
            "x": 1800,
            "y": 450,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "mark_cancelled",
                "position": "right",
                "x": 253.0001220703125,
                "y": 48.6484375,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "mark_cancelled",
                "position": "left",
                "x": -5,
                "y": 48.6484375,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 1800,
            "y": 450
          },
          "data": {
            "nodeType": "bitrix24_update_deal",
            "label": "Сделка: документ аннулирован",
            "config": {
              "connection_id": "",
              "deal_id": "{{ loop.item.ID }}",
              "title": null,
              "stage_id": "",
              "category_id": "",
              "opportunity": null,
              "assigned_by_id": "",
              "contact_id": "",
              "company_id": "",
              "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"аннулирован\"\n}"
            }
          },
          "events": []
        },
        {
          "id": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 2155.126285921131,
            "y": 41.557809909836834,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
                "position": "right",
                "x": 253,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 2155.126285921131,
            "y": 41.557809909836834
          },
          "data": {
            "nodeType": "wazzup_send_message",
            "label": "Wazzup: подписан",
            "config": {
              "connection_id": "",
              "channel_id": "",
              "chat_type": "telegram",
              "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
              "text": "Клиент подписал документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}). Сделка переведена на следующую стадию.",
              "content_uri": null
            }
          },
          "events": []
        },
        {
          "id": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 2385.4782176772846,
            "y": 241.55780990983686,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
                "position": "right",
                "x": 253,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 2385.4782176772846,
            "y": 241.55780990983686
          },
          "data": {
            "nodeType": "wazzup_send_message",
            "label": "Wazzup: просрочен",
            "config": {
              "connection_id": "",
              "channel_id": "",
              "chat_type": "telegram",
              "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
              "text": "Клиент не подписал документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}) уже {{ check.age_days }} дн. Ссылку отправили повторно — проверьте, всё ли в порядке.",
              "content_uri": null
            }
          },
          "events": []
        },
        {
          "id": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
          "type": "workflow-node",
          "dimensions": {
            "width": 260,
            "height": 105
          },
          "computedPosition": {
            "x": 2136.1313582182634,
            "y": 452.1105475225408,
            "z": 0
          },
          "handleBounds": {
            "source": [
              {
                "id": "out",
                "type": "source",
                "nodeId": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
                "position": "right",
                "x": 253,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ],
            "target": [
              {
                "id": "in-1",
                "type": "target",
                "nodeId": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
                "position": "left",
                "x": -5,
                "y": 46.546875,
                "width": 12,
                "height": 12
              }
            ]
          },
          "selected": false,
          "dragging": false,
          "resizing": false,
          "initialized": false,
          "isParent": false,
          "position": {
            "x": 2136.1313582182634,
            "y": 452.1105475225408
          },
          "data": {
            "nodeType": "wazzup_send_message",
            "label": "Wazzup: аннулирован",
            "config": {
              "connection_id": "",
              "channel_id": "",
              "chat_type": "telegram",
              "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
              "text": "Документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}) аннулирован в Подпислоне. Отправьте клиенту новый документ.",
              "content_uri": null
            }
          },
          "events": []
        }
      ],
      "edges": [
        {
          "id": "e-schedule-out-deals",
          "type": "default",
          "source": "schedule",
          "target": "deals",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "schedule",
            "type": "workflow-node",
            "dimensions": {
              "width": 251,
              "height": 88
            },
            "computedPosition": {
              "x": 0,
              "y": 0,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "schedule",
                  "position": "right",
                  "x": 244.4921875,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": null
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 0,
              "y": 0
            },
            "data": {
              "nodeType": "schedule_trigger",
              "label": "Проверка раз в день",
              "config": {
                "mode": "daily",
                "time": "10:00",
                "timezone": "Europe/Moscow",
                "enabled": false,
                "weekdays": [
                  1,
                  2,
                  3,
                  4,
                  5
                ]
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "deals",
            "type": "workflow-node",
            "dimensions": {
              "width": 224,
              "height": 88
            },
            "computedPosition": {
              "x": 300,
              "y": 0,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "deals",
                  "position": "right",
                  "x": 216.60934448242188,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "deals",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 300,
              "y": 0
            },
            "data": {
              "nodeType": "bitrix24_get_deals",
              "label": "Сделки, ждущие подписи",
              "config": {
                "connection_id": "",
                "f_UF_CRM_SIGN_STATUS": "отправлен,просрочен",
                "select_fields": "ID,TITLE,ASSIGNED_BY_ID,UF_CRM_PODPISLON_DOC_ID,UF_CRM_SIGN_STATUS,UF_CRM_SIGN_LINK"
              }
            },
            "events": []
          },
          "sourceX": 256.4921875,
          "sourceY": 44.1484375,
          "targetX": 295,
          "targetY": 44.1484375
        },
        {
          "id": "e-deals-out-loop",
          "type": "default",
          "source": "deals",
          "target": "loop",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "deals",
            "type": "workflow-node",
            "dimensions": {
              "width": 224,
              "height": 88
            },
            "computedPosition": {
              "x": 300,
              "y": 0,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "deals",
                  "position": "right",
                  "x": 216.60934448242188,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "deals",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 300,
              "y": 0
            },
            "data": {
              "nodeType": "bitrix24_get_deals",
              "label": "Сделки, ждущие подписи",
              "config": {
                "connection_id": "",
                "f_UF_CRM_SIGN_STATUS": "отправлен,просрочен",
                "select_fields": "ID,TITLE,ASSIGNED_BY_ID,UF_CRM_PODPISLON_DOC_ID,UF_CRM_SIGN_STATUS,UF_CRM_SIGN_LINK"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "loop",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 600,
              "y": 0,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "body",
                  "type": "source",
                  "nodeId": "loop",
                  "position": "right",
                  "x": 253,
                  "y": 29.359375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "done",
                  "type": "source",
                  "nodeId": "loop",
                  "position": "right",
                  "x": 253,
                  "y": 63.7265625,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "loop",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 600,
              "y": 0
            },
            "data": {
              "nodeType": "for_each",
              "label": "Для каждой сделки",
              "config": {
                "source_path": "{{ deals.deals }}"
              }
            },
            "events": []
          },
          "sourceX": 528.6093444824219,
          "sourceY": 44.1484375,
          "targetX": 595,
          "targetY": 52.546875
        },
        {
          "id": "e-loop-body-docs",
          "type": "default",
          "source": "loop",
          "target": "docs",
          "sourceHandle": "body",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "loop",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 600,
              "y": 0,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "body",
                  "type": "source",
                  "nodeId": "loop",
                  "position": "right",
                  "x": 253,
                  "y": 29.359375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "done",
                  "type": "source",
                  "nodeId": "loop",
                  "position": "right",
                  "x": 253,
                  "y": 63.7265625,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "loop",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 600,
              "y": 0
            },
            "data": {
              "nodeType": "for_each",
              "label": "Для каждой сделки",
              "config": {
                "source_path": "{{ deals.deals }}"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "docs",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 900,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "docs",
                  "position": "right",
                  "x": 253,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "docs",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 900,
              "y": 150
            },
            "data": {
              "nodeType": "podpislon_get_docs",
              "label": "Подпислон: статус документа",
              "config": {
                "connection_id": "",
                "filter_fio": null,
                "filter_status": null,
                "filter_phone": null,
                "filter_date_from": null,
                "filter_date_to": null,
                "ids": "{{ loop.item.UF_CRM_PODPISLON_DOC_ID }}"
              }
            },
            "events": []
          },
          "sourceX": 865,
          "sourceY": 35.359375,
          "targetX": 895,
          "targetY": 202.546875
        },
        {
          "id": "e-docs-out-check",
          "type": "default",
          "source": "docs",
          "target": "check",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "docs",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 900,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "docs",
                  "position": "right",
                  "x": 253,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "docs",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 900,
              "y": 150
            },
            "data": {
              "nodeType": "podpislon_get_docs",
              "label": "Подпислон: статус документа",
              "config": {
                "connection_id": "",
                "filter_fio": null,
                "filter_status": null,
                "filter_phone": null,
                "filter_date_from": null,
                "filter_date_to": null,
                "ids": "{{ loop.item.UF_CRM_PODPISLON_DOC_ID }}"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "check",
            "type": "workflow-node",
            "dimensions": {
              "width": 226,
              "height": 88
            },
            "computedPosition": {
              "x": 1200,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "check",
                  "position": "right",
                  "x": 218.5546875,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "check",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1200,
              "y": 150
            },
            "data": {
              "nodeType": "code",
              "label": "Подписан / просрочен?",
              "config": {
                "code": "const deal = input.loop.item;\nconst doc = (input.docs.docs || []).find((d) => String(d.id) === String(deal.UF_CRM_PODPISLON_DOC_ID));\nconst days = Number(input.variables.REMIND_DAYS || 3);\n\nif (!doc) {\n  throw new Error(`Документ ${deal.UF_CRM_PODPISLON_DOC_ID} по сделке ${deal.ID} не найден в Подпислоне`);\n}\n\nif (String(doc.status) === \"30\") {\n  return { state: \"signed\", deal_id: deal.ID, doc };\n}\n\nif (String(doc.status) === \"40\") {\n  return { state: \"cancelled\", deal_id: deal.ID, doc };\n}\n\n// 35 — запрошено аннулирование: решения ещё нет, клиенту не напоминаем и ждём\nif (String(doc.status) === \"35\") {\n  return { state: \"waiting\", deal_id: deal.ID };\n}\n\nconst ageDays = Math.floor((Date.now() - Date.parse(doc.date_create)) / 86400000);\n\nif (Number.isNaN(ageDays)) {\n  throw new Error(`Не удалось разобрать дату отправки документа: ${doc.date_create}`);\n}\n\nif (deal.UF_CRM_SIGN_STATUS === \"отправлен\" && ageDays >= days) {\n  return { state: \"overdue\", deal_id: deal.ID, age_days: ageDays, doc };\n}\n\nreturn { state: \"waiting\", deal_id: deal.ID, age_days: ageDays };"
              }
            },
            "events": []
          },
          "sourceX": 1165,
          "sourceY": 202.546875,
          "targetX": 1195,
          "targetY": 194.1484375
        },
        {
          "id": "e-check-out-route",
          "type": "default",
          "source": "check",
          "target": "route",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "check",
            "type": "workflow-node",
            "dimensions": {
              "width": 226,
              "height": 88
            },
            "computedPosition": {
              "x": 1200,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "check",
                  "position": "right",
                  "x": 218.5546875,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "check",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1200,
              "y": 150
            },
            "data": {
              "nodeType": "code",
              "label": "Подписан / просрочен?",
              "config": {
                "code": "const deal = input.loop.item;\nconst doc = (input.docs.docs || []).find((d) => String(d.id) === String(deal.UF_CRM_PODPISLON_DOC_ID));\nconst days = Number(input.variables.REMIND_DAYS || 3);\n\nif (!doc) {\n  throw new Error(`Документ ${deal.UF_CRM_PODPISLON_DOC_ID} по сделке ${deal.ID} не найден в Подпислоне`);\n}\n\nif (String(doc.status) === \"30\") {\n  return { state: \"signed\", deal_id: deal.ID, doc };\n}\n\nif (String(doc.status) === \"40\") {\n  return { state: \"cancelled\", deal_id: deal.ID, doc };\n}\n\n// 35 — запрошено аннулирование: решения ещё нет, клиенту не напоминаем и ждём\nif (String(doc.status) === \"35\") {\n  return { state: \"waiting\", deal_id: deal.ID };\n}\n\nconst ageDays = Math.floor((Date.now() - Date.parse(doc.date_create)) / 86400000);\n\nif (Number.isNaN(ageDays)) {\n  throw new Error(`Не удалось разобрать дату отправки документа: ${doc.date_create}`);\n}\n\nif (deal.UF_CRM_SIGN_STATUS === \"отправлен\" && ageDays >= days) {\n  return { state: \"overdue\", deal_id: deal.ID, age_days: ageDays, doc };\n}\n\nreturn { state: \"waiting\", deal_id: deal.ID, age_days: ageDays };"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "route",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 1500,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "case_0",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 15.6171875,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_1",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 36.234375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_2",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 56.8515625,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "default",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 77.46875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "route",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1500,
              "y": 150
            },
            "data": {
              "nodeType": "switch",
              "label": "Условие",
              "config": {
                "field": "{{ check.state }}",
                "cases": "[{\"value\":\"signed\"},{\"value\":\"overdue\"},{\"value\":\"cancelled\"}]"
              }
            },
            "events": []
          },
          "sourceX": 1430.5546875,
          "sourceY": 194.1484375,
          "targetX": 1495,
          "targetY": 202.546875
        },
        {
          "id": "e-route-case_0-mark_signed",
          "type": "default",
          "source": "route",
          "target": "mark_signed",
          "sourceHandle": "case_0",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "route",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 1500,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "case_0",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 15.6171875,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_1",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 36.234375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_2",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 56.8515625,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "default",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 77.46875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "route",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1500,
              "y": 150
            },
            "data": {
              "nodeType": "switch",
              "label": "Условие",
              "config": {
                "field": "{{ check.state }}",
                "cases": "[{\"value\":\"signed\"},{\"value\":\"overdue\"},{\"value\":\"cancelled\"}]"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "mark_signed",
            "type": "workflow-node",
            "dimensions": {
              "width": 232,
              "height": 88
            },
            "computedPosition": {
              "x": 1800,
              "y": 50,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_signed",
                  "position": "right",
                  "x": 224.7735595703125,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_signed",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 50
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: договор подписан",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": "{{ variables.STAGE_SIGNED }}",
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"подписан\"\n}"
              }
            },
            "events": []
          },
          "sourceX": 1765,
          "sourceY": 171.6171875,
          "targetX": 1795,
          "targetY": 94.1484375
        },
        {
          "id": "e-route-case_1-resend",
          "type": "default",
          "source": "route",
          "target": "resend",
          "sourceHandle": "case_1",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "route",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 1500,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "case_0",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 15.6171875,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_1",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 36.234375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_2",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 56.8515625,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "default",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 77.46875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "route",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1500,
              "y": 150
            },
            "data": {
              "nodeType": "switch",
              "label": "Условие",
              "config": {
                "field": "{{ check.state }}",
                "cases": "[{\"value\":\"signed\"},{\"value\":\"overdue\"},{\"value\":\"cancelled\"}]"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "resend",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 126
            },
            "computedPosition": {
              "x": 1800,
              "y": 250,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "resend",
                  "position": "right",
                  "x": 253.0001220703125,
                  "y": 57.046875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "resend",
                  "position": "left",
                  "x": -5,
                  "y": 57.046875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 250
            },
            "data": {
              "nodeType": "podpislon_resend",
              "label": "Подпислон: переотправить ссылку",
              "config": {
                "connection_id": "",
                "package_id": "{{ check.doc.package }}",
                "contact": null
              }
            },
            "events": []
          },
          "sourceX": 1765,
          "sourceY": 192.234375,
          "targetX": 1795,
          "targetY": 313.046875
        },
        {
          "id": "e-resend-out-mark_overdue",
          "type": "default",
          "source": "resend",
          "target": "mark_overdue",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "resend",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 126
            },
            "computedPosition": {
              "x": 1800,
              "y": 250,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "resend",
                  "position": "right",
                  "x": 253.0001220703125,
                  "y": 57.046875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "resend",
                  "position": "left",
                  "x": -5,
                  "y": 57.046875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 250
            },
            "data": {
              "nodeType": "podpislon_resend",
              "label": "Подпислон: переотправить ссылку",
              "config": {
                "connection_id": "",
                "package_id": "{{ check.doc.package }}",
                "contact": null
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "mark_overdue",
            "type": "workflow-node",
            "dimensions": {
              "width": 220,
              "height": 88
            },
            "computedPosition": {
              "x": 2100,
              "y": 250,
              "z": 1000
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_overdue",
                  "position": "right",
                  "x": 213,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_overdue",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": true,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 2100,
              "y": 250
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: просрочен",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": null,
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"просрочен\"\n}"
              }
            },
            "events": []
          },
          "sourceX": 2065.0001220703125,
          "sourceY": 313.046875,
          "targetX": 2095,
          "targetY": 294.1484375
        },
        {
          "id": "e-route-case_2-mark_cancelled",
          "type": "default",
          "source": "route",
          "target": "mark_cancelled",
          "sourceHandle": "case_2",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "route",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 1500,
              "y": 150,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "case_0",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 15.6171875,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_1",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 36.234375,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "case_2",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 56.8515625,
                  "width": 12,
                  "height": 12
                },
                {
                  "id": "default",
                  "type": "source",
                  "nodeId": "route",
                  "position": "right",
                  "x": 253,
                  "y": 77.46875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "route",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1500,
              "y": 150
            },
            "data": {
              "nodeType": "switch",
              "label": "Условие",
              "config": {
                "field": "{{ check.state }}",
                "cases": "[{\"value\":\"signed\"},{\"value\":\"overdue\"},{\"value\":\"cancelled\"}]"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "mark_cancelled",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 109
            },
            "computedPosition": {
              "x": 1800,
              "y": 450,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_cancelled",
                  "position": "right",
                  "x": 253.0001220703125,
                  "y": 48.6484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_cancelled",
                  "position": "left",
                  "x": -5,
                  "y": 48.6484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 450
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: документ аннулирован",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": null,
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"аннулирован\"\n}"
              }
            },
            "events": []
          },
          "sourceX": 1765,
          "sourceY": 212.8515625,
          "targetX": 1795,
          "targetY": 504.6484375
        },
        {
          "id": "vueflow__edge-mark_signedout-node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bdin-1",
          "type": "default",
          "source": "mark_signed",
          "target": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "mark_signed",
            "type": "workflow-node",
            "dimensions": {
              "width": 232,
              "height": 88
            },
            "computedPosition": {
              "x": 1800,
              "y": 50,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_signed",
                  "position": "right",
                  "x": 224.7735595703125,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_signed",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 50
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: договор подписан",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": "{{ variables.STAGE_SIGNED }}",
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"подписан\"\n}"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 2155.126285921131,
              "y": 41.557809909836834,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
                  "position": "right",
                  "x": 253,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "node-aa09d70d-a49e-4ab3-80ed-f63380c3d0bd",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 2155.126285921131,
              "y": 41.557809909836834
            },
            "data": {
              "nodeType": "wazzup_send_message",
              "label": "Wazzup: подписан",
              "config": {
                "connection_id": "",
                "channel_id": "",
                "chat_type": "telegram",
                "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
                "text": "Клиент подписал документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}). Сделка переведена на следующую стадию.",
                "content_uri": null
              }
            },
            "events": []
          },
          "sourceX": 2036.7735595703125,
          "sourceY": 94.1484375,
          "targetX": 2150.126285921131,
          "targetY": 94.10468490983683
        },
        {
          "id": "vueflow__edge-mark_overdueout-node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666in-1",
          "type": "default",
          "source": "mark_overdue",
          "target": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "mark_overdue",
            "type": "workflow-node",
            "dimensions": {
              "width": 220,
              "height": 88
            },
            "computedPosition": {
              "x": 2100,
              "y": 250,
              "z": 1000
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_overdue",
                  "position": "right",
                  "x": 213,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_overdue",
                  "position": "left",
                  "x": -5,
                  "y": 38.1484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": true,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 2100,
              "y": 250
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: просрочен",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": null,
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"просрочен\"\n}"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 2385.4782176772846,
              "y": 241.55780990983686,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
                  "position": "right",
                  "x": 253,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "node-3bb6f50c-dffa-4d4c-8b18-b6c9a2344666",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 2385.4782176772846,
              "y": 241.55780990983686
            },
            "data": {
              "nodeType": "wazzup_send_message",
              "label": "Wazzup: просрочен",
              "config": {
                "connection_id": "",
                "channel_id": "",
                "chat_type": "telegram",
                "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
                "text": "Клиент не подписал документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}) уже {{ check.age_days }} дн. Ссылку отправили повторно — проверьте, всё ли в порядке.",
                "content_uri": null
              }
            },
            "events": []
          },
          "sourceX": 2325,
          "sourceY": 294.1484375,
          "targetX": 2380.4782176772846,
          "targetY": 294.10468490983686
        },
        {
          "id": "vueflow__edge-mark_cancelledout-node-1b0014e1-d9df-407c-8945-5c87a31a21f9in-1",
          "type": "default",
          "source": "mark_cancelled",
          "target": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
          "sourceHandle": "out",
          "targetHandle": "in-1",
          "data": [],
          "events": [],
          "label": null,
          "style": {
            "strokeWidth": 2.5,
            "stroke": "#9ca3af"
          },
          "sourceNode": {
            "id": "mark_cancelled",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 109
            },
            "computedPosition": {
              "x": 1800,
              "y": 450,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "mark_cancelled",
                  "position": "right",
                  "x": 253.0001220703125,
                  "y": 48.6484375,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "mark_cancelled",
                  "position": "left",
                  "x": -5,
                  "y": 48.6484375,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 1800,
              "y": 450
            },
            "data": {
              "nodeType": "bitrix24_update_deal",
              "label": "Сделка: документ аннулирован",
              "config": {
                "connection_id": "",
                "deal_id": "{{ loop.item.ID }}",
                "title": null,
                "stage_id": null,
                "category_id": null,
                "opportunity": null,
                "assigned_by_id": null,
                "contact_id": null,
                "company_id": null,
                "extra_fields": "{\n  \"UF_CRM_SIGN_STATUS\": \"аннулирован\"\n}"
              }
            },
            "events": []
          },
          "targetNode": {
            "id": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
            "type": "workflow-node",
            "dimensions": {
              "width": 260,
              "height": 105
            },
            "computedPosition": {
              "x": 2136.1313582182634,
              "y": 452.1105475225408,
              "z": 0
            },
            "handleBounds": {
              "source": [
                {
                  "id": "out",
                  "type": "source",
                  "nodeId": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
                  "position": "right",
                  "x": 253,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ],
              "target": [
                {
                  "id": "in-1",
                  "type": "target",
                  "nodeId": "node-1b0014e1-d9df-407c-8945-5c87a31a21f9",
                  "position": "left",
                  "x": -5,
                  "y": 46.546875,
                  "width": 12,
                  "height": 12
                }
              ]
            },
            "selected": false,
            "dragging": false,
            "resizing": false,
            "initialized": false,
            "isParent": false,
            "position": {
              "x": 2136.1313582182634,
              "y": 452.1105475225408
            },
            "data": {
              "nodeType": "wazzup_send_message",
              "label": "Wazzup: аннулирован",
              "config": {
                "connection_id": "",
                "channel_id": "",
                "chat_type": "telegram",
                "chat_id": "{{ variables.MANAGER_CHAT_ID }}",
                "text": "Документ по сделке «{{ loop.item.TITLE }}» (ID {{ loop.item.ID }}) аннулирован в Подпислоне. Отправьте клиенту новый документ.",
                "content_uri": null
              }
            },
            "events": []
          },
          "sourceX": 2065.0001220703125,
          "sourceY": 504.6484375,
          "targetX": 2131.1313582182634,
          "targetY": 504.6574225225408
        }
      ],
      "viewport": {
        "x": 0,
        "y": 0,
        "zoom": 1
      }
    }
  },
  "variables": [
    {
      "type": "variable",
      "key": "MANAGER_CHAT_ID",
      "value": ""
    },
    {
      "type": "variable",
      "key": "STAGE_SIGNED",
      "value": ""
    },
    {
      "type": "variable",
      "key": "REMIND_DAYS",
      "value": ""
    }
  ]
}
