Title: AI-powered automation for client request filtering.
Context: Business.
Problem: As the store scales, a challenge arises in maintaining the quality of client request handling.
Solution: The system consists of 5 interconnected workflows in n8n that together form a complete audio call processing cycle.
Overall logic:
- Handle Audio Queue — the main orchestrator. Pulls calls from the queue (Google Sheets), routes them for processing, and manages the flow between all other workflows.
- AI Audio Assistant — an AI agent powered by an LLM (OpenRouter / Nemotron) that accepts user requests via chat and returns call statistics for any given time period. It understands imprecise date expressions — such as "last week" or "in March."
- Get Call Stats — a sub-workflow for statistics aggregation. Retrieves data from the spreadsheet and returns the total number of calls, the number of negative calls, and their percentage.
- Status Tone / Status Category — two separate workflows that write analysis results (call tone and category) back to Google Sheets. Both include overwrite protection — if a field is already populated, no re-writing occurs.
- Status Audio "Done" — marks the completion of processing: sets the status to
done and records the processing timestamp. Also protected against duplication.
Key feature: Each workflow is an independent module with a clearly defined input and output. This allows the system to scale — adding new analysis types or data sources without rewriting the entire logic.
Process:
1. Prompt Design
A system prompt was written for the AI agent, establishing its role as a customer request statistics assistant. The prompt dynamically passes the current date to the agent via $now — enabling it to correctly interpret relative time-based queries such as "this week" or "in the last 3 days" without requiring additional clarification from the user.
2. API Integration
The system integrates three external services:
- Google Sheets — as the primary storage for the call queue and analysis results (tone, category, status, and processing timestamp)
- OpenRouter (Nemotron 120B) — the LLM responsible for processing user requests and analyzing calls
- n8n DataTable — for storing aggregated statistics retrieved by
Get Call Stats
3. n8n Workflow