Introduction
Zendesk is a popular customer service platform that, among many features, offers live chat support for real-time customer engagement. However, Zendesk can become costly for startups and small teams, especially if you only need a specific feature such as storing live chat logs. In this tutorial, we will demonstrate how to build an automation workflow using n8n that captures live chat messages and stores them automatically in Notion or Google Sheets, effectively replacing the Zendesk live chat logs feature while saving costs.
This workflow benefits customer support teams, operations specialists, and automation engineers in startups or SMEs who want to maintain detailed live chat logs without the overhead of a full Zendesk subscription. By integrating your live chat tool with n8n, Notion, and Google Sheets, you can achieve a lightweight, customizable, and scalable solution.
Tools and Services Integrated:
– n8n (automation platform)
– Your live chat software with webhook or API support (e.g., Tawk.to, Intercom, or custom chat solution)
– Notion (for log storage and collaboration)
– Google Sheets (as an alternative storage method for structured data)
How the Workflow Works
1. Trigger: A new live chat message event occurs in your chat service.
2. Format: The message data is parsed and structured.
3. Store: The chat log is appended to Notion or Google Sheets.
Step-by-Step Tutorial
Prerequisites:
– An n8n instance (self-hosted or cloud)
– A live chat platform that supports outgoing webhooks or APIs (e.g., Tawk.to, Intercom, Freshchat)
– Notion API credentials and a database to store chat logs OR a Google account with a Google Sheet prepared
Step 1: Set Up the Live Chat Webhook Trigger in n8n
– Navigate to n8n and create a new workflow.
– Add the ‘Webhook’ node as the trigger.
– Configure the webhook node to receive POST requests from your live chat platform.
– In your live chat software, configure the webhook URL (provided by the n8n webhook node URL) to send chat messages whenever a new message is sent or received.
– Test the webhook by sending a new message in your live chat and confirm the payload arrives in n8n.
Step 2: Extract and Format Chat Data
– Add a ‘Set’ node after the webhook to extract relevant fields, such as:
– Chat ID
– Timestamp
– Sender identity (agent or customer)
– Message content
– Use expressions in the ‘Set’ node to map fields from the webhook payload into a consistent format.
Step 3A: Store Logs in Notion
– Create a Notion database with columns matching your chat data: Chat ID, Timestamp, Sender, Message.
– Obtain an integration token from Notion and share the database with the integration.
– Add the ‘Notion’ node in n8n, configured for ‘Create a Page’ in the database.
– Map the data from the ‘Set’ node to corresponding Notion properties.
– This step creates a new page for each chat message in your Notion database.
Step 3B: (Alternative) Store Logs in Google Sheets
– Prepare a Google Sheet with columns: Chat ID, Timestamp, Sender, Message.
– In n8n, add the ‘Google Sheets’ node configured to ‘Append’ a row.
– Connect your Google account.
– Map chat data to the columns accordingly.
Step 4: Activate & Test the Workflow
– Save and activate the workflow.
– Test by sending new chat messages to verify they are stored in Notion or Google Sheets correctly.
Common Errors and Tips:
– Ensure webhook payload matches expected structure; use n8n’s ‘Function’ node for advanced parsing if necessary.
– Authorization errors may occur with Notion or Google Sheets if API tokens/scopes are incorrect—double-check credentials.
– Rate limits: Notion API has rate limits; batch processing or rate limiting in n8n helps make workflow more robust.
– Use ‘IF’ nodes to filter unwanted messages (e.g., system notifications).
How to Adapt or Scale This Workflow
– For higher chat volumes, batch messages into a single Notion page or spreadsheet batch appends.
– Add enrichment steps such as sentiment analysis or tagging with other n8n integrations.
– Integrate Slack notifications for urgent or flagged chat messages.
– Extend the workflow to create support tickets in alternative platforms.
Summary
By using this n8n workflow to log your live chat messages into Notion or Google Sheets, you effectively replace a costly Zendesk feature with a customizable and cost-effective solution. This approach empowers startup teams and automation engineers with full control over chat data handling and storage. The workflow is flexible enough to integrate with any chat service offering webhooks.
Bonus Tip
Consider using n8n’s ‘Cron’ node to periodically archive or summarize chat logs for better data management and analytics. Additionally, by leveraging n8n’s webhook security options, you can ensure only authorized data is captured, adding to your system’s robustness.