AutomationFlowsAI & RAG › Agente Contactos

Agente Contactos

Agente Contactos. Uses googleSheetsTool, agent, executeWorkflowTrigger, lmChatOpenAi. Event-driven trigger; 10 nodes.

Event trigger★★★☆☆ complexityAI-powered10 nodesGoogle Sheets ToolAgentExecute Workflow TriggerOpenAI Chat
AI & RAG Trigger: Event Nodes: 10 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → Execute Workflow Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Agente Contactos",
  "nodes": [
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1s1FrNJ2zP_zAI8X6k0ZIJJxzj2nLFXA7WvoNUNQQ4qw",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Hoja 1",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Nombre": "={{$fromAI(\"nombre\")}}",
            "Correo": "={{$fromAI(\"correo\")}}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Nombre",
              "displayName": "Nombre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Correo",
              "displayName": "Correo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": true
        }
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        -420,
        440
      ],
      "id": "6b4c2918-9c7e-4990-b59a-a20a054e4919",
      "name": "AddContactos",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "delete",
        "documentId": {
          "__rl": true,
          "value": "1s1FrNJ2zP_zAI8X6k0ZIJJxzj2nLFXA7WvoNUNQQ4qw",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Hoja 1",
          "cachedResultUrl": ""
        },
        "startIndex": "={{$fromAI (\"row_number\")}}",
        "numberToDelete": "={{ 1 }}"
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        -100,
        460
      ],
      "id": "89d253a8-24f5-487d-8cc6-12e72a86a225",
      "name": "EliminarContacto",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1s1FrNJ2zP_zAI8X6k0ZIJJxzj2nLFXA7WvoNUNQQ4qw",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Hoja 1",
          "cachedResultUrl": ""
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Nombre",
              "lookupValue": "={{ $fromAI(\"nombre\") }}"
            },
            {
              "lookupColumn": "Correo",
              "lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Value', ``, 'string') }}"
            }
          ]
        },
        "combineFilters": "OR",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        -580,
        440
      ],
      "id": "0621db9c-a940-4a28-89ba-a24d90a9c158",
      "name": "ObtenerContactos",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=Descripci\u00f3n General:\n\nEres un asistente de gesti\u00f3n de contactos. Tus responsabilidades incluyen buscar contactos, agregar nuevos contactos o actualizar la informaci\u00f3n de un contacto.  \n\nHerramientas: \n- Usa **ObtenerContactos** para obtener informaci\u00f3n de contacto. \n- Usa **AddContactos** para almacenar nueva informaci\u00f3n de contacto.\n- Usa **ActualizarContacto** para modificar y actualizar un contacto existente.\n- Usa **EliminarContacto** para eliminar la informaci\u00f3n de un contacto existente, debes obtener primero su \"row_number\" con la herramienta **ObtenerContactos**.\n- Usa **ObtenerTodosContactos** para devolver la lista entera de contactos sin ning\u00fan filtro. Cuando el usuario pida todos los contactos.\n\nReglas:\n\nPara obtener contactos con la herramienta **ObtenerContactos**, no es necesario que el nombre aportado coincida exactamente con el nombre a buscar, puede tener algunas variaciones como tildes.\n\nEjemplo:\n\nEntrada: busca el contacto Jos\u00e9 Manuel Fern\u00e1ndez.\n\nAccion: busca coincidencias por Jos\u00e9 Manuel Fern\u00e1ndez, pero tambi\u00e9n por Jose Manuel Fernandez, o por Jose Manuel Fern\u00e1ndez. Es decir, no hace falta que coincidan las tildes.",
          "maxIterations": 30
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        -540,
        100
      ],
      "id": "e5bb5101-3487-48da-a4ed-a204794d4fc2",
      "name": "Agente de Contactos",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4f360190-a717-4a93-8336-d03ea65975d5",
              "name": "response",
              "value": "Ha ocurrido un error. Por favor, int\u00e9ntalo de nuevo.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        20,
        240
      ],
      "id": "49b3fc65-4685-4b39-a115-36b38abfc2db",
      "name": "\u274c"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4f360190-a717-4a93-8336-d03ea65975d5",
              "name": "response",
              "value": "={{ $json.output }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        0,
        0
      ],
      "id": "d637f946-2b24-45a4-b98b-fb257d7f9ff8",
      "name": "\u2705"
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -780,
        100
      ],
      "id": "dbfbe446-a35e-4e25-a65e-800640fbe947",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -740,
        400
      ],
      "id": "81745490-aee6-4057-ae17-10fc25d9571b",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1s1FrNJ2zP_zAI8X6k0ZIJJxzj2nLFXA7WvoNUNQQ4qw",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Hoja 1",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Nombre": "={{ $fromAI(\"nombre\") }}",
            "Correo": "={{ $fromAI(\"correo\") }}"
          },
          "matchingColumns": [
            "Nombre"
          ],
          "schema": [
            {
              "id": "Nombre",
              "displayName": "Nombre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Correo",
              "displayName": "Correo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        -260,
        440
      ],
      "id": "cb51bb7d-3cbc-42a3-9d86-047a59068c38",
      "name": "ActualizarContacto",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1s1FrNJ2zP_zAI8X6k0ZIJJxzj2nLFXA7WvoNUNQQ4qw",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Hoja 1",
          "cachedResultUrl": ""
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        60,
        460
      ],
      "id": "043a83df-39bd-42ca-aa90-a7b1d88dd4a1",
      "name": "ObtenerTodosContactos",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "AddContactos": {
      "ai_tool": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "EliminarContacto": {
      "ai_tool": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "ObtenerContactos": {
      "ai_tool": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Agente de Contactos": {
      "main": [
        [
          {
            "node": "\u2705",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u274c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Agente de Contactos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "ActualizarContacto": {
      "ai_tool": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "ObtenerTodosContactos": {
      "ai_tool": [
        [
          {
            "node": "Agente de Contactos",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Madrid",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "nAWcsFqEIMIvT733"
  },
  "versionId": "90f57346-a097-4769-9e37-f822aaeec1cf",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "oapVBztBNel8AGIN",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Agente Contactos. Uses googleSheetsTool, agent, executeWorkflowTrigger, lmChatOpenAi. Event-driven trigger; 10 nodes.

Source: https://github.com/DragonJAR/n8n-workflows-esp/blob/5b7d3b288093125a02c8d1034fbf6107b85e4974/workflows/01514-Contactos_Manager.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Sub - Preisliste KI Agent. Uses executeWorkflowTrigger, agent, toolWorkflow, lmChatOpenAi. Event-driven trigger; 8 nodes.

Execute Workflow Trigger, Agent, Tool Workflow +3
AI & RAG

Financeiro. Uses executeWorkflowTrigger, agent, memoryBufferWindow, googleSheetsTool. Event-driven trigger; 6 nodes.

Execute Workflow Trigger, Agent, Memory Buffer Window +2
AI & RAG

This workflow is perfect for creators, solopreneurs, and personal brands who want to consistently publish bold, high-performing content on X (Twitter) — without writing a single line themselves. After

OpenAI Chat, Memory Buffer Window, Tool Workflow +10
AI & RAG

AI Blog Publisher – Automated Blog Content Workflow This workflow is designed for individuals and teams who regularly publish content on their blog and want to automate the entire process from start t

WordPress, HTTP Request, Memory Buffer Window +9
AI & RAG

Enrich Property Inventory Survey With Image Recognition And Ai Agent. Uses manualTrigger, lmChatOpenAi, airtable, executeWorkflowTrigger. Event-driven trigger; 29 nodes.

OpenAI Chat, Airtable, Execute Workflow Trigger +5