This workflow automatically monitors a Google Sheet for failed trades, analyzes each failure using AI and updates the sheet with a probable root cause, confidence level and actionable next steps. It also sends alerts via Slack and email and creates a follow-up task to ensure the issue is reviewed.
This workflow automates the analysis of failed trades logged in a Google Sheet. Whenever a new trade is added, it validates whether the required failure details are present.
If valid, the workflow sends the trade details to Gemini AI, which returns a structured explanation including probable cause, confidence, next steps and a short ops summary. The workflow updates the same row with this analysis.
Once updated, alerts are sent to Slack and email and a follow-up Google Task is created for operational tracking. If required fields are missing, the workflow skips AI and marks the record as invalid.
Ensure your sheet contains fields like:
Gemini analyzes trade failure
Returns structured JSON:
There can be many more use cases depending on how the workflow is extended.
| Issue | Possible Cause | Solution |
|---|---|---|
| Workflow not triggering | Incorrect sheet or trigger setup | Verify sheet connection and activate workflow |
| Record marked invalid | Missing required fields | Ensure Trade ID, Error Code, Error Message are present |
| AI output missing | Invalid AI response | Ensure prompt enforces JSON format |
| Sheet not updating | Matching issue | Verify Trade ID mapping |
| Slack/email not sent | Credentials issue | Reconnect integrations |
| Task not created | Google Tasks not configured | Verify credentials |
If you need help setting up or customizing this workflow, our n8n developers at WeblineIndia can assist with implementation, integrations and scaling automation solutions.
Reach out to build tailored workflows for your business needs.