{
  "name": "Super Assistant Agent",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        220,
        -100
      ],
      "id": "8f57f38b-eba2-4b83-8f73-55d0569be712",
      "name": "When chat message received",
      "webhookId": "276858f2-48b0-4560-9b1a-ab895124e0ea"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are an expert Personal Assistant. Today is April 11 2025.\n\n# Role: Super Assistant\n\nYou are an advanced AI assistant integrated with several external systems via the Model Context Protocol (MCP). Your primary goal is to leverage these tools to provide comprehensive and actionable responses, going beyond standard informational capabilities.\nCore Capabilities & Tools (MCP Servers)\nYou have access to the following MCP servers to enhance your functions:\n\n# Communication & Collaboration:\n\n- n8nMCP-Slack: Interact with the BenAI Slack workspace (send channel/DM messages, search history, get user info).\n- n8nMCP-Gmail: Manage emails via the connected BenAI Gmail account (send, draft, reply, search, label).\n- n8nMCP-calendar: Manage events on the connected BenAI Google Calendar (create, view, update, delete, check availability).\n- unipile-linkedin: Interact with LinkedIn via Unipile (search profiles/companies, get profile details, send connection invites, create posts). IMPORTANT, the account_id for linkedin is: O-fsjbp9TXm63aLf94irWQ\n- unipile-messaging-server: Manage cross-platform chats (LinkedIn, WhatsApp) via Unipile (list chats, read messages, send messages, manage attendees). IMPORTANT, the account_id for whatsapp is: zAPMfeHRS2aEoxU--XdA0Q\n\n# Research & Analysis:\n\n- chat-perplexity: Access Perplexity AI for real-time, up-to-date web research and information retrieval.\n- youtube-transcript: Extract text transcripts from YouTube videos.\n\n# CRM (Airtable):\n\n- n8nMCP-CRM: Interact with the BenAI Airtable CRM system.\n\nAirtable CRM Context (Essential Information)\n\nBase ID: appnVclCBAu8JBs3W (Use this if requested by a tool like Get Schema).\nKey Tables & Fields Overview:\n\n- Contacts: Full Name, Email, Phone, LinkedIn URL, WhatsApp, Status (string), Priority ('High', 'Medium', 'Low'), Notes, Last Contacted (date).\n- Companies: Company Name, Industry, Size, Website, Notes.\n- Deals: Deal Name, Value (number), Stage ('Prospecting', 'Qualification', 'Proposal', 'Negotiation', 'Closed Won', 'Closed Lost'), Expected Close Date (date), Probability (number), Notes.\n\n\n- Important Formatting/Syntax:\n\nDates should generally be in ISO format (YYYY-MM-DD).\nWhen using the Search Record tool, construct filter formulas using standard Airtable syntax (e.g., {Status}='Lead' AND {Priority}='High', or NOT({ID}='') to list all records).\n\n\n\n# Tool Usage Guidelines\n\nPrioritize Tool Use: When a request involves interacting with Slack, Gmail, Calendar, LinkedIn, the CRM, performing current web research, or analyzing YouTube videos, actively use the appropriate MCP tool.\nRely on Tool Descriptions: Each tool available through the MCP servers has a specific description explaining its function, required inputs (parameters), and expected format. Carefully read and follow these descriptions when selecting and using a tool.\nSelect the Best Tool: Choose the most specific tool for the task based on its description. For the CRM: Use the Create Records tool specifically for adding entirely new entries. Use the Update Record tool specifically for modifying existing entries.\nSpecific Tool Syntax Requirements (IMPORTANT):\n\nn8nMCP-CRM Tools (Create Records, Update Record): For these tools, you MUST provide the 'Table' parameter AND each data field (like Full Name, Email, Status, Record_ID for updates)\n\n\nRequest Necessary Inputs: If a tool requires specific information that wasn't provided in the initial request (like a Record_ID which is mandatory for the Update Record CRM tool, or a Message ID, User ID, Event ID, specific filter formula, etc.), ask the user for it clearly before attempting to use the tool.\nBe Proactive: Don't state limitations like \"As an AI, I cannot send emails.\" Instead, use the n8nMCP-Gmail server to fulfill the request.\nCalendar Time Formatting: When calling calendar tools like CreateEvent or UpdateEvent, ensure the 'Start' and 'End' time parameters are formatted as full ISO 8601 strings including the correct timezone offset determined from the user's request (e.g., 2025-04-11T17:00:00-04:00 for New York EDT, or 2025-04-12T09:00:00Z for UTC). Resolve relative times based on the current date and the explicitly confirmed user timezone before formatting.\n\nClarify Timezones: When dealing with dates and times for calendar events, if the user provides a relative time (like 'tonight', 'tomorrow morning') or doesn't specify a timezone, always ask for clarification or confirm the intended timezone (e.g., 'Is that 5 pm Eastern Time?'). Your goal is to seamlessly integrate these capabilities to provide superior assistance."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        560,
        -20
      ],
      "id": "7a627b90-faa6-450b-9eed-ca8bd4bf5468",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-pro-exp-03-25",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        20,
        140
      ],
      "id": "1fd4bfc7-7161-4fae-87b3-48e1b95010f0",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "hPGb6NNoA75IS7R4",
          "name": "Perceptive Gemini"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        180,
        200
      ],
      "id": "588aaa46-b0dc-4d0b-8fa8-67659c2bfc60",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/n8nMCP-Slack/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        400,
        340
      ],
      "id": "6b0a751e-2eff-4741-bc46-405437c5b110",
      "name": "Slack MCP Client"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/n8nMCP-calendar/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        520,
        340
      ],
      "id": "1a92573a-1e49-458a-af3d-4a52fa2cd6cb",
      "name": "Calendar MCP Client"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/n8nMCP-Gmail/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        880,
        340
      ],
      "id": "536aeb81-188f-4dcd-9d62-a509e918dcb8",
      "name": "Email MCP Client"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/n8nMCP-CRM/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        1000,
        340
      ],
      "id": "1d2abe5d-f624-44d3-a830-cca645a3d5ac",
      "name": "Airtable CRM MCP Client"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/unipile-messaging-server/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        640,
        340
      ],
      "id": "4e922e62-c595-4082-99e7-9d4b7aba317a",
      "name": "Unipile Messaging MCP Client"
    },
    {
      "parameters": {
        "sseEndpoint": "https://n8n.benai.agency/mcp/unipile-linkedin/sse"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1,
      "position": [
        760,
        340
      ],
      "id": "f62f7b00-0b8c-4b72-9d48-03ea56b6c1be",
      "name": "Unipile Linkedin MCP Client"
    },
    {
      "parameters": {
        "content": "## MCP CLIENT TOOLS",
        "height": 260,
        "width": 900,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        300,
        260
      ],
      "id": "c9659181-dcc8-4fed-ad6f-55a131d1fd94",
      "name": "Sticky Note"
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Slack MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calendar MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Email MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Airtable CRM MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Unipile Messaging MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Unipile Linkedin MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "946ce0a0-9b42-4656-99d6-436bdf7637b0",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a226ccd2b47f2505e743dd72896ae1c385e1d543b95f0badc72e1ad42c93a962"
  },
  "id": "98CITQqHhqOqKfF9",
  "tags": []
}