{
  "template_id": "TPL-05",
  "filename": "tpl_05_meta_ads_comment_lead_to_kanban.json",
  "name": "Plantilla 05 — Redes Sociales: Captación de Leads en Anuncios de Meta Ads hacia Kanban y Vendedores",
  "category": "Marketing / Redes Sociales",
  "tutorial_code": "FA-19",
  "trigger_type": "social_comment_received",
  "description": "Detecta comentarios realizados en anuncios publicitarios de Facebook e Instagram ({{ comment.is_ad }} == true), responde en público y por DM privado, crea la oportunidad en Kanban y transfiere al equipo comercial.",
  "definition": {
    "nodes": [
      {
        "id": "trig_ad",
        "type": "trigger",
        "position": {
          "x": 100,
          "y": 200
        },
        "data": {
          "mode": "event",
          "event": "social_comment_received",
          "one_run_per_contact": true
        }
      },
      {
        "id": "cond_is_ad",
        "type": "condition",
        "position": {
          "x": 380,
          "y": 200
        },
        "data": {
          "combinator": "and",
          "conditions": [
            {
              "left": "{{ comment.is_ad }}",
              "operator": "equals",
              "value": "true"
            }
          ]
        }
      },
      {
        "id": "act_ad_reply",
        "type": "action",
        "position": {
          "x": 660,
          "y": 120
        },
        "data": {
          "actions": [
            {
              "action": "add_label",
              "action_params": [
                "lead_meta_ads"
              ]
            },
            {
              "action": "reply_to_comment",
              "action_params": [
                "¡Gracias por comentar @{{ comment.username }}! Te escribimos por privado para asesorarte."
              ]
            },
            {
              "action": "send_private_reply",
              "action_params": [
                "¡Hola {{ contact.first_name }}! Gracias por tu interés en nuestra promoción. ¿Buscas compra minorista o mayorista?"
              ]
            }
          ]
        }
      },
      {
        "id": "kanban_ad",
        "type": "kanban",
        "position": {
          "x": 940,
          "y": 120
        },
        "data": {
          "mode": "create",
          "funnel_id": 1,
          "funnel_stage": "stage_1",
          "result_name": "card_ad"
        }
      },
      {
        "id": "end_ad",
        "type": "end",
        "position": {
          "x": 940,
          "y": 280
        },
        "data": {}
      }
    ],
    "edges": [
      {
        "id": "e1",
        "source": "trig_ad",
        "target": "cond_is_ad",
        "sourceHandle": "right"
      },
      {
        "id": "e2",
        "source": "cond_is_ad",
        "target": "act_ad_reply",
        "sourceHandle": "true"
      },
      {
        "id": "e3",
        "source": "cond_is_ad",
        "target": "end_ad",
        "sourceHandle": "false"
      },
      {
        "id": "e4",
        "source": "act_ad_reply",
        "target": "kanban_ad",
        "sourceHandle": "right"
      },
      {
        "id": "e5",
        "source": "kanban_ad",
        "target": "end_ad",
        "sourceHandle": "right"
      }
    ],
    "metadata": {
      "schema_version": 1
    }
  }
}