{
  "template_id": "TPL-06",
  "filename": "tpl_06_social_comment_antispam_moderation.json",
  "name": "Plantilla 06 — Redes Sociales: Moderación Automática Anti-Spam y Ocultamiento de Comentarios",
  "category": "Marketing / Moderación",
  "tutorial_code": "FA-20",
  "trigger_type": "social_comment_received",
  "description": "Detecta enlaces externos no autorizados o palabras de spam en comentarios de Facebook e Instagram y ejecuta automáticamente hide_comment y nota privada.",
  "definition": {
    "nodes": [
      {
        "id": "trig_mod",
        "type": "trigger",
        "position": {
          "x": 100,
          "y": 200
        },
        "data": {
          "mode": "event",
          "event": "social_comment_received"
        }
      },
      {
        "id": "cond_spam",
        "type": "condition",
        "position": {
          "x": 380,
          "y": 200
        },
        "data": {
          "combinator": "or",
          "conditions": [
            {
              "left": "{{ comment.text }}",
              "operator": "contains",
              "value": "http://"
            },
            {
              "left": "{{ comment.text }}",
              "operator": "contains",
              "value": "https://"
            },
            {
              "left": "{{ comment.text }}",
              "operator": "contains",
              "value": "cripto"
            }
          ]
        }
      },
      {
        "id": "act_hide",
        "type": "action",
        "position": {
          "x": 660,
          "y": 120
        },
        "data": {
          "actions": [
            {
              "action": "hide_comment",
              "action_params": []
            },
            {
              "action": "add_label",
              "action_params": [
                "comentario_oculto_spam"
              ]
            },
            {
              "action": "add_private_note",
              "action_params": [
                "Comentario ocultado automáticamente por filtro anti-spam: {{ comment.text }}"
              ]
            }
          ]
        }
      },
      {
        "id": "end_mod",
        "type": "end",
        "position": {
          "x": 940,
          "y": 200
        },
        "data": {}
      }
    ],
    "edges": [
      {
        "id": "e1",
        "source": "trig_mod",
        "target": "cond_spam",
        "sourceHandle": "right"
      },
      {
        "id": "e2",
        "source": "cond_spam",
        "target": "act_hide",
        "sourceHandle": "true"
      },
      {
        "id": "e3",
        "source": "cond_spam",
        "target": "end_mod",
        "sourceHandle": "false"
      },
      {
        "id": "e4",
        "source": "act_hide",
        "target": "end_mod",
        "sourceHandle": "right"
      }
    ],
    "metadata": {
      "schema_version": 1
    }
  }
}