Filtro (Whitelist de Desarrollo)
El nodo Filtro (implementado aquí mediante un nodo If) actúa como una barrera de seguridad crítica durante la fase de pruebas. Su función es validar el número de teléfono entrante ($json.body.phone) contra una lista predefinida de números autorizados.
¿Para qué sirve esto? Este mecanismo asegura que solo el equipo de desarrollo y testers pueda interactuar con el bot. Evita que usuarios externos o clientes reales activen flujos experimentales, consuman créditos de IA o reciban mensajes de prueba mientras se realizan ajustes en la lógica.


JSON del nodo para copiar y pegar
Este nodo If está configurado para dejar pasar solo a los números listados en las condiciones "OR".
json
{
"nodes": [
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "fc71bf04-76e8-47d3-996b-29183feb840a",
"leftValue": "=+584120000000",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "9eb80656-73ff-4d73-ac07-e5b1b387c768",
"leftValue": "+17860000000",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "e1a92c3d-7f78-4c2e-96c9-38eed56aaad9",
"leftValue": "+584240000000",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "89978f6b-1c20-4bce-ba05-eb47948b4631",
"leftValue": "+17860000001",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "a6e1ea9b-ce3c-4008-9f5a-36795128842f",
"leftValue": "+584120000001",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "a422cea5-5950-4ba7-9e50-394c94c2ae22",
"leftValue": "=+584240000001",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "9184ae73-6f18-4ccb-93dc-c6390987aacf",
"leftValue": "+17860000002",
"rightValue": "={{ $json.body.phone }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
128,
1136
],
"id": "7acc5797-b4ba-417e-9b87-19f1223102d2",
"name": "Filtro_Dev1"
}
],
"connections": {
"Filtro_Dev1": {
"main": [
[]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "fc59ec4675a2b9056a2988260954715519d888519e3f03cd8f1ae3b29dcec973"
}
}