LOW / CODEBlueprints
engineeringai

AI Error Log Pattern Analyzer

Feed application error logs to Claude AI, which detects patterns, groups related errors by root cause, identifies systemic issues, and sends a structured daily digest to Slack with prioritized action items.

Intermediate~25 minn8nMake.com 185 downloads 522 views

Setup Instructions

1. Create a Google Sheet named "Error Logs" with columns: Timestamp, Service, Error Type, Message, Stack Trace, Count. Populate it via your logging pipeline (or manually for testing). This sheet acts as the input source. 2. In your automation platform, create a Schedule trigger that runs daily at 8 AM. 3. Add a Google Sheets node to read all rows from the last 24 hours. Filter by the Timestamp column to only pull recent errors. 4. Add a Code/Function node to aggregate errors: group by error type, count occurrences, and format into a concise summary. Limit to the top 50 unique errors to stay within Claude's context window. 5. Add an HTTP Request node to call the Claude API (POST https://api.anthropic.com/v1/messages). Set headers: x-api-key, anthropic-version: 2023-06-01. Use model "claude-sonnet-4-20250514" with max_tokens 1024. Prompt Claude to: group related errors, identify root causes, rank by severity and frequency, and suggest fixes. 6. Parse Claude's response and format it into a Slack message with sections: Critical Issues, Error Clusters, Trends, and Recommended Actions. 7. Add a Slack node to post the digest to #engineering-alerts. Use Slack Block Kit for rich formatting with severity indicators. 8. Test with sample error data in your sheet and verify the digest is actionable and well-structured.
Troubleshooting
**Claude's analysis is too surface-level:** Include more context in your prompt — specify the tech stack, common error patterns, and what constitutes a critical vs. low-priority error. Add examples of good analysis output. Ask Claude to "think step by step about root causes before grouping." **Token limits with many error logs:** Pre-aggregate errors before sending to Claude. Group identical errors and send counts instead of duplicates. Summarize stack traces to the first 3 frames. If you have 1,000+ unique errors, batch into multiple Claude calls by service. **Google Sheets read is slow or times out:** If your error log sheet has thousands of rows, use a filter view or a separate "daily snapshot" sheet that your logging pipeline populates. Alternatively, use the Google Sheets API with a query parameter to filter by date range server-side. **Rate limiting from Anthropic API:** The Claude API has rate limits based on your plan. For daily digests this is rarely an issue, but if you add real-time analysis, implement exponential backoff. Check the response headers for x-ratelimit-remaining.

Need a custom version?

We can build a tailored automation workflow for your specific needs.

New blueprints weekly

Get notified when we publish new automation workflows.