n8n

How to Connect Google Docs Chat for Customer Support?

Turn your chat into a helpful support assistant that remembers past details. It pulls older notes from Google Docs, answers new questions, and writes fresh memories back to Docs so the history grows over time. Great for support teams that need fast context and clean records.

When a message comes in, the system loads long term memories and notes from two Google Docs files, merges them, and feeds that context to an AI agent. The agent uses gpt 4o mini, keeps a rolling window of 50 messages, and can call tools that save new memories with a date stamp. Replies go back to the chat and can also be posted to a Telegram chat. Merge and Aggregate nodes combine sources so the agent sees a single context snapshot.

Setup needs Google Docs, Telegram, and OpenAI. Paste the two Google Doc links in the retrieve and save nodes, set a real Telegram chat ID, and add your OpenAI key. Expect quicker replies, less manual note taking, and better handoffs. Use it for support queues, onboarding FAQs, or internal help where remembering past answers and user history matters.

What are the key features?

  • Chat trigger captures each incoming message and starts the flow.
  • Retrieves long term memories and notes from two Google Docs files.
  • Merges and aggregates all sources so the agent gets one clean context.
  • Window Buffer Memory keeps the last 50 messages for short term recall.
  • AI Tools Agent runs on gpt 4o mini and decides when to store new memories.
  • Google Docs Tool writes new memory items with a timestamp.
  • Telegram Response sends the final answer to a chosen Telegram chat.
  • Chat Response node formats the answer for the chat interface.
  • Optional second model node is present for model testing if needed.

What are the benefits?

  • Reduce manual note taking from 30 minutes per day to 5 minutes
  • Streamline context handoffs by 60 percent with shared memory
  • Improve answer consistency by 40 percent using stored history
  • Connect chat, Google Docs, and Telegram in one flow
  • Support up to 5 times more chats with the same team size

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Docs, Telegram and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Open the When chat message received node and enable it. This will be the entry point for your messages in the n8n chat interface.
  4. In the n8n credentials manager, create an OpenAI credential. If unsure, double click the gpt 4o mini node, choose Create new credential, then follow on screen steps to add your OpenAI API key from your OpenAI account.
  5. In the credentials manager, create a Google Docs OAuth2 credential. Double click each Google Docs and Google Docs Tool node, choose Create new credential, and follow the on screen Google login prompts. Make sure the Google account can access the target documents.
  6. Prepare two Google Docs files: one for Long Term Memories and one for Notes. Copy their share links. Paste each link into the documentURL fields in Retrieve Long Term Memories, Retrieve Notes, Save Long Term Memories, and Save Notes nodes.
  7. Create a Telegram bot with BotFather and copy the bot token. In n8n credentials, create a Telegram credential using that token. In the Telegram Response node, replace the chatId with your real chat or channel ID and keep parse_mode as HTML.
  8. Check the Window Buffer Memory node. It uses the sessionId from the chat trigger and keeps 50 messages. Adjust the window size if you need longer or shorter short term memory.
  9. Review the AI Tools Agent connections. Ensure gpt 4o mini is connected as the language model, the memory node is attached, and the Save Notes and Save Long Term Memories tools are connected to the ai_tool input.
  10. Optional: If you want to test the alternate model, connect the DeepSeek V3 Chat node to the AI Tools Agent language model input and disable the gpt 4o mini node.
  11. Activate the workflow. Send a test message through the n8n chat panel. Confirm you receive a reply, see a Telegram message in your chat, and find a new memory entry added to the Google Docs file.
  12. Troubleshoot common issues: if Docs do not update, check documentURL links and OAuth access; if Telegram fails, verify bot token and chat ID; if memory does not save, confirm the AI tools are connected and the Google Docs Tool actions are set to insert or update.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Docs

Sign up

Free: $0, Google Docs API usage at no additional cost (quota limits apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.