This workflow automates customer service queries using Anthropic’s Claude-3-7-sonnet with an auto-fixing output parser for structured responses and memory. Key nodes include Manual Trigger (initiates workflow), Input Validation (sets user_query, session_id), Validate Input (ensures query length ≥3 characters), AI Agent (processes query), Auto-fixing Output Parser (corrects output format), Structured Output Parser (ensures resolution, reasoning fields), Window Buffer Memory (stores session data), Anthropic Chat Model (processes with Claude), OpenAI Chat Model Auto-fixer (fixes output using GPT-4o-mini), Format Success Response (returns resolution, reasoning, session_id), and Format Validation Error (handles invalid inputs). It uses Anthropic and OpenAI APIs.\n\nSetup Requirements and Configuration: Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io. Follow installation prompts or create a cloud account. Obtain an Anthropic API key from console.anthropic.com and an OpenAI API key from platform.openai.com under ‘API Keys.’ In n8n, import the JSON workflow. Configure Anthropic Chat Model and OpenAI Chat Model Auto-fixer nodes with respective API keys under ‘Credentials’ > ‘Anthropic API’ and ‘OpenAI API.’ Replace Manual Trigger with a Webhook Trigger: set path to ‘auto-fix-agent,’ configure for POST requests, and optionally add header authentication with a secure key. Ensure sufficient server resources for dual API calls and memory.\n\nTesting and Deployment Steps: Test via Postman with a POST request to the Webhook URL. Example JSON: {'user_query': 'What time is my check-in?', 'session_id': 'test_session'} with authentication header if set. Alternatively, use Manual Trigger. ‘Format Success Response’ returns a 200 status with resolution (e.g., ‘Check-in is at 3 PM’), reasoning, session_id, or ‘Format Validation Error’ (400 status) for queries shorter than 3 characters. Check logs for errors like ‘Invalid API key’ or ‘Output parsing failed,’ and verify credentials or session_id consistency. Activate workflow in n8n. Validate output to ensure resolution and reasoning are structured and relevant to user_query.
$6.99
Workflow steps: 11
Integrated apps: manualTrigger, set, if