This workflow corresponds to n8n.io template #15857 — we link there as the canonical source.
This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "YXpgz3BOKrCesKum",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Failed Trade Root Cause Explainer",
"tags": [],
"nodes": [
{
"id": "59dccebb-7088-4b36-83b5-08b651ae8463",
"name": "Watch Failed Trade Log",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-112,
-48
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit?usp=drivesdk",
"cachedResultName": "Failed Trade Log"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "16118f0f-1a73-406b-b1ef-fdc0738667dc",
"name": "Prepare Failed Trade Record",
"type": "n8n-nodes-base.set",
"position": [
112,
-48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "8d810935-ee79-4b6c-8b56-d57f7d9cd543",
"name": "id",
"type": "string",
"value": "={{$json[\"ID\"]}}"
},
{
"id": "0e3f64b5-ad4f-4c05-a58f-9019677f4d8e",
"name": "logged_at",
"type": "string",
"value": "={{$json[\"Logged At\"]}}"
},
{
"id": "dd1621b9-2f02-43ad-8048-39875af75956",
"name": "trade_id",
"type": "string",
"value": "={{$json[\"Trade ID\"]}}"
},
{
"id": "1f460341-3ff8-468d-a9bc-92ad3aef6869",
"name": "client_name",
"type": "string",
"value": "={{$json[\"Client Name\"]}}"
},
{
"id": "e4fe0e32-f41b-473d-818d-36ae54f7f306",
"name": "instrument",
"type": "string",
"value": "={{$json[\"Instrument\"]}}"
},
{
"id": "33c08940-5828-47a1-9be4-04661155d9df",
"name": "trade_type",
"type": "string",
"value": "={{$json[\"Trade Type\"]}}"
},
{
"id": "0fccf02c-8818-4174-9c4c-9d36bd3667b7",
"name": "quantity",
"type": "number",
"value": "={{$json[\"Quantity\"]}}"
},
{
"id": "212ba568-bc6a-42a2-8b63-734c8a61d39a",
"name": "price",
"type": "number",
"value": "={{$json[\"Price\"]}}"
},
{
"id": "26c666e2-dee0-4dd4-80ec-767793725416",
"name": "trade_date",
"type": "string",
"value": "={{$json[\"Trade Date\"]}}"
},
{
"id": "92f2d0db-31bc-4b51-99cf-75af46fdb03c",
"name": "counterparty",
"type": "string",
"value": "={{$json[\"Counterparty\"]}}"
},
{
"id": "22fb92ca-e282-43c3-9504-f60e5599cfd1",
"name": "venue",
"type": "string",
"value": "={{$json[\"Venue\"]}}"
},
{
"id": "61a580fb-5434-4bd2-9173-b22cd3031bae",
"name": "error_code",
"type": "string",
"value": "={{$json[\"Error Code\"]}}"
},
{
"id": "b857cd2a-df45-4e91-8306-1eee863d24d1",
"name": "error_message",
"type": "string",
"value": "={{$json[\"Error Message\"]}}"
},
{
"id": "db9bd273-0365-4bc7-99e3-814ab772f4ce",
"name": "failure_stage",
"type": "string",
"value": "={{$json[\"Failure Stage\"]}}"
},
{
"id": "f63a804c-6062-4a02-8767-02af9864e365",
"name": "status",
"type": "string",
"value": "={{$json[\"Status\"]}}"
},
{
"id": "a78a8e6f-5ad1-4c51-9dc4-a146c877eb90",
"name": "priority",
"type": "string",
"value": "={{$json[\"Priority\"]}}"
},
{
"id": "d46ed06d-54e1-4981-ac13-ed0c0e0d73d3",
"name": "analysis_status",
"type": "string",
"value": "={{$json[\"Analysis Status\"]}}"
},
{
"id": "b83a63bd-9f6f-4d10-ab35-43c931fba5ac",
"name": "alert_sent",
"type": "string",
"value": "={{$json[\"Alert Sent\"]}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "745c44bd-79b9-4ae6-b149-260dfa30afab",
"name": "Check Required Trade Fields",
"type": "n8n-nodes-base.if",
"position": [
336,
-48
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "322fd424-51a4-44ae-b0e7-a49c58b6346f",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json[\"trade_id\"] }}",
"rightValue": ""
},
{
"id": "95cad963-e644-45de-87fc-ec9ed1593875",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.error_code }}",
"rightValue": ""
},
{
"id": "39c28a99-92e3-4ed8-83a3-ee3c2c9f5b0c",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.error_message }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.3
},
{
"id": "1d2719da-da05-46ad-a963-a0c194640c4d",
"name": "Analyze Failed Trade with AI",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
640,
-320
],
"parameters": {
"text": "=You are a trade operations analyst helping explain failed trades.\n\nAnalyze the failed trade details below and identify the most probable operational root cause.\n\nReturn your answer as valid JSON only, with no markdown, no code block and no extra text.\n\nRequired JSON format:\n{\n \"probable_cause\": \"\",\n \"confidence\": \"\",\n \"next_steps\": [\"\", \"\"],\n \"ops_summary\": \"\"\n}\n\nRules:\n- Be specific and practical.\n- Use the error code, error message and trade details together.\n- Do not invent facts that are not supported by the input.\n- confidence must be one of: High, Medium, Low.\n- next_steps must contain 2 to 4 short actionable items for the operations team.\n- ops_summary must be 1 to 2 concise sentences.\n- probable_cause must be a short explanation, not a paragraph.\n\nFailed trade details:\nTrade ID: {{$json.trade_id}}\nClient Name: {{$json.client_name}}\nInstrument: {{$json.instrument}}\nTrade Type: {{$json.trade_type}}\nQuantity: {{$json.quantity}}\nPrice: {{$json.price}}\nTrade Date: {{$json.trade_date}}\nCounterparty: {{$json.counterparty}}\nVenue: {{$json.venue}}\nError Code: {{$json.error_code}}\nError Message: {{$json.error_message}}\nFailure Stage: {{$json.failure_stage}}\nStatus: {{$json.status}}\nPriority: {{$json.priority}}",
"options": {},
"promptType": "define"
},
"typeVersion": 3.1
},
{
"id": "bc542684-e437-4f31-878f-e1f35c8d2928",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
640,
-128
],
"parameters": {
"options": {},
"modelName": "models/gemini-flash-lite-latest"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "85923367-c1fb-47d8-9c4b-7e47f0d55bdc",
"name": "Parse AI Analysis",
"type": "n8n-nodes-base.code",
"position": [
960,
-320
],
"parameters": {
"jsCode": "return JSON.parse($input.first().json.output);"
},
"typeVersion": 2
},
{
"id": "201f676a-bee2-4d82-8041-0476c13b1485",
"name": "Prepare Trade Log Update",
"type": "n8n-nodes-base.set",
"position": [
1264,
-240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "68134ed2-e8cc-4a3d-915b-4433cb1ee9ae",
"name": "ID",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.id }}"
},
{
"id": "d668f981-6702-419b-a6ae-e78635e1a4f6",
"name": "Logged At",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.logged_at }}"
},
{
"id": "0ee0797b-5c27-4fa1-b237-14628a3d1689",
"name": "Trade ID",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.trade_id }}"
},
{
"id": "4953cc3d-7830-472c-913d-6aca70bdb5ff",
"name": "Client Name",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.client_name }}"
},
{
"id": "46385b5e-b12d-42c8-a271-f3b42f676d81",
"name": "Instrument",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.instrument }}"
},
{
"id": "8bd31441-e476-4c6e-ae1b-a5f68a3f90dc",
"name": "Trade Type",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.trade_type }}"
},
{
"id": "d09a91b9-7049-4828-a1a5-28138b51153b",
"name": "Quantity",
"type": "number",
"value": "={{ $('Check Required Trade Fields').item.json.quantity }}"
},
{
"id": "4ecd883c-e4ff-4971-8c1f-ee1857ac9e72",
"name": "Price",
"type": "number",
"value": "={{ $('Check Required Trade Fields').item.json.price }}"
},
{
"id": "03f1bfd7-76bd-47d2-a77a-16a3d3c9b9f2",
"name": "Trade Date",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.trade_date }}"
},
{
"id": "a09f69e3-924a-4d1d-82f7-6d3fed4ed20a",
"name": "Counterparty",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.counterparty }}"
},
{
"id": "36723737-a1b9-4928-afaa-00d4e9cb0018",
"name": "Venue",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.venue }}"
},
{
"id": "de7c7527-dcd9-4aa8-bce1-26bb8caf3065",
"name": "Error Code",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.error_code }}"
},
{
"id": "4c155a4f-0c3f-4d54-ae0d-9b30880916e0",
"name": "Error Message",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.error_message }}"
},
{
"id": "d1a6faba-1cd8-49b2-be57-c8d0c67d33e2",
"name": "Failure Stage",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.failure_stage }}"
},
{
"id": "0327cf3a-2ce4-4a75-ac7f-dded3eee80d8",
"name": "Status",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.status }}"
},
{
"id": "45bd4598-baa7-4f85-a4e3-90cb5d8f5bbe",
"name": "Priority",
"type": "string",
"value": "={{ $('Check Required Trade Fields').item.json.priority }}"
},
{
"id": "06743cbd-3823-4e46-b9f4-1cb03aba33cd",
"name": "AI Probable Cause",
"type": "string",
"value": "={{ $json.probable_cause }}"
},
{
"id": "d339bea7-4998-44b4-ac7e-f7c8e002558d",
"name": "AI Confidence",
"type": "string",
"value": "={{ $json.confidence }}"
},
{
"id": "389740aa-686a-4258-97cd-570bea525552",
"name": "Recommended Next Steps",
"type": "string",
"value": "={{ Array.isArray($json.next_steps) ? '- ' + $json.next_steps.join('\\n- ') : '' }}"
},
{
"id": "e7e3d0f7-8c64-4361-9bbe-0cfe01df6112",
"name": "Ops Summary",
"type": "string",
"value": "={{ $json.ops_summary }}"
},
{
"id": "2913ce46-66db-4f18-a7d6-8febdae7a658",
"name": "Analysis Status",
"type": "string",
"value": "Completed"
},
{
"id": "dae84e00-bfef-4f8e-a0e3-97472a984d5c",
"name": "Reviewed At",
"type": "string",
"value": "={{ $now }}"
},
{
"id": "b69442a8-9d25-4ea7-ae13-4d28f40e17af",
"name": "Alert Sent",
"type": "string",
"value": "No"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "abef21ae-7966-4b7a-bc1e-2a746cfd779c",
"name": "Update Failed Trade Sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1488,
-240
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $json.ID }}",
"Price": "={{ $json.Price }}",
"Venue": "={{ $json.Venue }}",
"Status": "={{ $json.Status }}",
"Priority": "={{ $json.Priority }}",
"Quantity": "={{ $json.Quantity }}",
"Trade ID": "={{ $json[\"Trade ID\"] }}",
"Logged At": "={{ $json[\"Logged At\"] }}",
"Alert Sent": "=No",
"Error Code": "={{ $json[\"Error Code\"] }}",
"Instrument": "={{ $json.Instrument }}",
"Trade Date": "={{ $json[\"Trade Date\"] }}",
"Trade Type": "={{ $json[\"Trade Type\"] }}",
"Client Name": "={{ $json[\"Client Name\"] }}",
"Ops Summary": "={{ $json[\"Ops Summary\"] }}",
"Reviewed At": "={{ $now }}",
"Counterparty": "={{ $json.Counterparty }}",
"AI Confidence": "={{ $json[\"AI Confidence\"] }}",
"Error Message": "={{ $json[\"Error Message\"] }}",
"Failure Stage": "={{ $json[\"Failure Stage\"] }}",
"Analysis Status": "=Completed",
"AI Probable Cause": "={{ $json[\"AI Probable Cause\"] }}",
"Recommended Next Steps": "={{ $json[\"Recommended Next Steps\"] }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Logged At",
"type": "string",
"display": true,
"required": false,
"displayName": "Logged At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Trade ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Client Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Client Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Instrument",
"type": "string",
"display": true,
"required": false,
"displayName": "Instrument",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Type",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Quantity",
"type": "string",
"display": true,
"required": false,
"displayName": "Quantity",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Price",
"type": "string",
"display": true,
"required": false,
"displayName": "Price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Counterparty",
"type": "string",
"display": true,
"required": false,
"displayName": "Counterparty",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Venue",
"type": "string",
"display": true,
"required": false,
"displayName": "Venue",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Code",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Failure Stage",
"type": "string",
"display": true,
"required": false,
"displayName": "Failure Stage",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Priority",
"type": "string",
"display": true,
"required": false,
"displayName": "Priority",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Probable Cause",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Probable Cause",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Confidence",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Confidence",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Recommended Next Steps",
"type": "string",
"display": true,
"required": false,
"displayName": "Recommended Next Steps",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Ops Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Ops Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analysis Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Analysis Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reviewed At",
"type": "string",
"display": true,
"required": false,
"displayName": "Reviewed At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Alert Sent",
"type": "string",
"display": true,
"required": false,
"displayName": "Alert Sent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Trade ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit?usp=drivesdk",
"cachedResultName": "Failed Trade Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "eb55ff00-1adf-4570-b292-0a8ffbfc0acf",
"name": "Send Ops Alert",
"type": "n8n-nodes-base.slack",
"position": [
1792,
-432
],
"parameters": {
"text": "=*Failed Trade Analysis Completed*\n\n*Trade ID:* {{$json[\"Trade ID\"]}}\n*Client Name:* {{$json[\"Client Name\"]}}\n*Instrument:* {{$json[\"Instrument\"]}}\n*Error Code:* {{$json[\"Error Code\"]}}\n\n*Probable Cause:* {{$json[\"AI Probable Cause\"]}}\n\n*Recommended Next Steps:*\n{{$json[\"Recommended Next Steps\"]}}\n\n*Ops Summary:* {{$json[\"Ops Summary\"]}}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0ARJN221M0",
"cachedResultName": "ops-alerts"
},
"otherOptions": {
"includeLinkToWorkflow": false
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.4
},
{
"id": "69d10c23-8d5f-413d-a3fc-12df32af0c40",
"name": "Prepare Alert Sent Update",
"type": "n8n-nodes-base.set",
"position": [
2112,
-240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5e776d0d-cee4-4391-879f-c8cf914f8fc8",
"name": "Trade ID",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Trade ID\"] }}"
},
{
"id": "b20577ee-363b-4462-9f60-2095c20ca28f",
"name": "ID",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.ID }}"
},
{
"id": "13d8a1eb-1ab9-42e2-a131-647c3ba89e5c",
"name": "Logged At",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Logged At\"] }}"
},
{
"id": "8888bc53-8e0c-4bd3-a722-eb918a5e7c4f",
"name": "Client Name",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Client Name\"] }}"
},
{
"id": "61b6f42e-bcab-42e1-8b50-7a1484a63d9e",
"name": "Instrument",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.Instrument }}"
},
{
"id": "5fa69b12-a37f-4d9b-be4f-a+1234567890a",
"name": "Trade Type",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Trade Type\"] }}"
},
{
"id": "c2a8edb8-5608-47de-83ef-4412c5fdc546",
"name": "Quantity",
"type": "number",
"value": "={{ $('Update Failed Trade Sheet').item.json.Quantity }}"
},
{
"id": "cba6a58b-1f4b-4243-a45c-2818264608b7",
"name": "Price",
"type": "number",
"value": "={{ $('Update Failed Trade Sheet').item.json.Price }}"
},
{
"id": "16799540-198c-4b39-a5d8-480a9c272133",
"name": "Trade Date",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Trade Date\"] }}"
},
{
"id": "5dffbe8c-2b37-4790-8a25-1a392effd155",
"name": "Counterparty",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.Counterparty }}"
},
{
"id": "3256e51d-8a60-439a-9bfa-ad1e8a6eac28",
"name": "Venue",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.Venue }}"
},
{
"id": "c1f7554f-ef34-4b39-9d89-d33472075c19",
"name": "Error Code",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Error Code\"] }}"
},
{
"id": "dad7dde7-bc3a-46d9-9675-75583962673d",
"name": "Error Message",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Error Message\"] }}"
},
{
"id": "0e6a4fbd-6816-4955-9f88-2f5e682904d2",
"name": "Failure Stage",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Failure Stage\"] }}"
},
{
"id": "c120bd63-e532-40ac-aa92-b41eab87a414",
"name": "Status",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.Status }}"
},
{
"id": "a942e3f3-9716-4f39-a202-6603ece04311",
"name": "Priority",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json.Priority }}"
},
{
"id": "bfdd66bf-2d4e-498d-8c3f-dcd27137d90f",
"name": "AI Probable Cause",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"AI Probable Cause\"] }}"
},
{
"id": "1b6c0bed-05f8-47ad-a789-c35e59101e6d",
"name": "AI Confidence",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"AI Confidence\"] }}"
},
{
"id": "cbcc35ff-e833-4723-86c0-4076b616677c",
"name": "Recommended Next Steps",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Recommended Next Steps\"] }}"
},
{
"id": "3c12d892-b944-4a98-a062-745fac1f269a",
"name": "Ops Summary",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Ops Summary\"] }}"
},
{
"id": "dcfe2ba5-963f-4705-a664-b135696def5d",
"name": "Analysis Status",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Analysis Status\"] }}"
},
{
"id": "4eac28dd-61c3-4e91-96a1-998372450072",
"name": "Reviewed At",
"type": "string",
"value": "={{ $('Update Failed Trade Sheet').item.json[\"Reviewed At\"] }}"
},
{
"id": "44004cb0-664f-4c38-9975-2f7fa397de19",
"name": "Alert Sent",
"type": "string",
"value": "=Yes"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2db6df48-a51b-4cb0-8011-f4bcabc37804",
"name": "Mark Alert Sent",
"type": "n8n-nodes-base.googleSheets",
"position": [
2320,
-240
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $json.ID }}",
"Price": "={{ $json.Price }}",
"Venue": "={{ $json.Venue }}",
"Status": "={{ $json.Status }}",
"Priority": "={{ $json.Priority }}",
"Quantity": "={{ $json.Quantity }}",
"Trade ID": "={{ $json[\"Trade ID\"] }}",
"Logged At": "={{ $json[\"Logged At\"] }}",
"Alert Sent": "={{ $json[\"Alert Sent\"] }}",
"Error Code": "={{ $json[\"Error Code\"] }}",
"Instrument": "={{ $json.Instrument }}",
"Trade Date": "={{ $json[\"Trade Date\"] }}",
"Trade Type": "={{ $json[\"Trade Type\"] }}",
"Client Name": "={{ $json[\"Client Name\"] }}",
"Ops Summary": "={{ $json[\"Ops Summary\"] }}",
"Reviewed At": "={{ $json[\"Reviewed At\"] }}",
"Counterparty": "={{ $json.Counterparty }}",
"AI Confidence": "={{ $json[\"AI Confidence\"] }}",
"Error Message": "={{ $json[\"Error Message\"] }}",
"Failure Stage": "={{ $json[\"Failure Stage\"] }}",
"Analysis Status": "={{ $json[\"Analysis Status\"] }}",
"AI Probable Cause": "={{ $json[\"AI Probable Cause\"] }}",
"Recommended Next Steps": "={{ $json[\"Recommended Next Steps\"] }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Logged At",
"type": "string",
"display": true,
"required": false,
"displayName": "Logged At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Trade ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Client Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Client Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Instrument",
"type": "string",
"display": true,
"required": false,
"displayName": "Instrument",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Type",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Quantity",
"type": "string",
"display": true,
"required": false,
"displayName": "Quantity",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Price",
"type": "string",
"display": true,
"required": false,
"displayName": "Price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Counterparty",
"type": "string",
"display": true,
"required": false,
"displayName": "Counterparty",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Venue",
"type": "string",
"display": true,
"required": false,
"displayName": "Venue",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Code",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Failure Stage",
"type": "string",
"display": true,
"required": false,
"displayName": "Failure Stage",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Priority",
"type": "string",
"display": true,
"required": false,
"displayName": "Priority",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Probable Cause",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Probable Cause",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Confidence",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Confidence",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Recommended Next Steps",
"type": "string",
"display": true,
"required": false,
"displayName": "Recommended Next Steps",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Ops Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Ops Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analysis Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Analysis Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reviewed At",
"type": "string",
"display": true,
"required": false,
"displayName": "Reviewed At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Alert Sent",
"type": "string",
"display": true,
"required": false,
"displayName": "Alert Sent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Trade ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit?usp=drivesdk",
"cachedResultName": "Failed Trade Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "f65bdac4-f6c2-49d0-9598-32f1c1a4ca0d",
"name": "Prepare Invalid Trade Update",
"type": "n8n-nodes-base.set",
"position": [
2112,
64
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bd379eab-a066-4620-8fbb-d4bdb6037391",
"name": "ID",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "15766c60-c61a-4dff-bf97-cb94de98ae42",
"name": "Logged At",
"type": "string",
"value": "={{ $json.logged_at }}"
},
{
"id": "42d66efd-18fe-42c8-b1ed-6d1e5a739dfd",
"name": "Trade ID",
"type": "string",
"value": "={{ $json.trade_id }}"
},
{
"id": "74954460-9846-4200-a658-4eb6dfdddd64",
"name": "Client Name",
"type": "string",
"value": "={{ $json.client_name }}"
},
{
"id": "dce09625-1bc6-427f-aaab-508fcb675fdc",
"name": "Instrument",
"type": "string",
"value": "={{ $json.instrument }}"
},
{
"id": "d377b5a3-5057-4ca1-bd45-87b647391a35",
"name": "Trade Type",
"type": "string",
"value": "={{ $json.trade_type }}"
},
{
"id": "1ac9806c-1d8b-41dc-8e04-3fb231013c95",
"name": "Quantity",
"type": "number",
"value": "={{ $json.quantity }}"
},
{
"id": "ce1c6943-8de3-4606-993b-6eaec5e8d344",
"name": "Price",
"type": "number",
"value": "={{ $json.price }}"
},
{
"id": "01d46a74-d93d-41e1-a134-8e62dcc34b92",
"name": "Trade Date",
"type": "string",
"value": "={{ $json.trade_date }}"
},
{
"id": "49c0e21a-40d1-4ea1-904d-eda5e8de04eb",
"name": "Counterparty",
"type": "string",
"value": "={{ $json.counterparty }}"
},
{
"id": "b72d5f08-aa68-406e-9eb1-343fe2ef6dad",
"name": "Venue",
"type": "string",
"value": "={{ $json.venue }}"
},
{
"id": "8a3caff5-284e-49e1-b689-782147d2355d",
"name": "Error Code",
"type": "string",
"value": "={{ $json.error_code }}"
},
{
"id": "83b454dd-4e64-4f4b-951a-a1b90e787ab2",
"name": "Error Message",
"type": "string",
"value": "={{ $json.error_message }}"
},
{
"id": "62b529e6-bc5f-4fb1-9863-51899f47cb87",
"name": "Failure Stage",
"type": "string",
"value": "={{ $json.failure_stage }}"
},
{
"id": "20ea61a1-ed3c-4708-be1d-fe97a3de53c7",
"name": "Status",
"type": "string",
"value": "={{ $json.status }}"
},
{
"id": "81d3033f-e7fd-4096-b965-0630a557de67",
"name": "Priority",
"type": "string",
"value": "={{ $json.priority }}"
},
{
"id": "c31be21b-22c5-4687-b961-67d0f8804d23",
"name": "AI Probable Cause",
"type": "string",
"value": ""
},
{
"id": "17dff41e-c6e4-4523-9403-387b2e65bf96",
"name": "AI Confidence",
"type": "string",
"value": ""
},
{
"id": "5e16845d-3b40-4673-8a8f-58efcba2b1a0",
"name": "Recommended Next Steps",
"type": "string",
"value": ""
},
{
"id": "a4bed5b1-4189-4273-99e7-40f8fef111af",
"name": "Ops Summary",
"type": "string",
"value": "Missing required trade failure fields"
},
{
"id": "f9909ed0-2e0a-4330-a5c7-65b95e6762e0",
"name": "Analysis Status",
"type": "string",
"value": "Invalid Input"
},
{
"id": "05e92896-83d8-4d1f-9766-fbb5b3a4f00b",
"name": "Reviewed At",
"type": "string",
"value": "={{ $now }}"
},
{
"id": "ac71cabb-7b10-4de9-8696-10655ee34857",
"name": "Alert Sent",
"type": "string",
"value": "No"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4d9faa5f-c943-48f0-93f0-06d7d9f68693",
"name": "Update Invalid Trade Status",
"type": "n8n-nodes-base.googleSheets",
"position": [
2320,
64
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $json.ID }}",
"Price": "={{ $json.Price }}",
"Venue": "={{ $json.Venue }}",
"Status": "={{ $json.Status }}",
"Priority": "={{ $json.Priority }}",
"Quantity": "={{ $json.Quantity }}",
"Trade ID": "={{ $json[\"Trade ID\"] }}",
"Logged At": "={{ $json[\"Logged At\"] }}",
"Alert Sent": "={{ $json[\"Alert Sent\"] }}",
"Error Code": "={{ $json[\"Error Code\"] }}",
"Instrument": "={{ $json.Instrument }}",
"Trade Date": "={{ $json[\"Trade Date\"] }}",
"Trade Type": "={{ $json[\"Trade Type\"] }}",
"Client Name": "={{ $json[\"Client Name\"] }}",
"Ops Summary": "={{ $json[\"Ops Summary\"] }}",
"Reviewed At": "={{ $json[\"Reviewed At\"] }}",
"Counterparty": "={{ $json.Counterparty }}",
"AI Confidence": "={{ $json[\"AI Confidence\"] }}",
"Error Message": "={{ $json[\"Error Message\"] }}",
"Failure Stage": "={{ $json[\"Failure Stage\"] }}",
"Analysis Status": "={{ $json[\"Analysis Status\"] }}",
"AI Probable Cause": "={{ $json[\"AI Probable Cause\"] }}",
"Recommended Next Steps": "={{ $json[\"Recommended Next Steps\"] }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Logged At",
"type": "string",
"display": true,
"required": false,
"displayName": "Logged At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade ID",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Client Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Client Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Instrument",
"type": "string",
"display": true,
"required": false,
"displayName": "Instrument",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Type",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Quantity",
"type": "string",
"display": true,
"required": false,
"displayName": "Quantity",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Price",
"type": "string",
"display": true,
"required": false,
"displayName": "Price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trade Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Trade Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Counterparty",
"type": "string",
"display": true,
"required": false,
"displayName": "Counterparty",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Venue",
"type": "string",
"display": true,
"required": false,
"displayName": "Venue",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Code",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Error Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Failure Stage",
"type": "string",
"display": true,
"required": false,
"displayName": "Failure Stage",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Priority",
"type": "string",
"display": true,
"required": false,
"displayName": "Priority",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Probable Cause",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Probable Cause",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Confidence",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Confidence",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Recommended Next Steps",
"type": "string",
"display": true,
"required": false,
"displayName": "Recommended Next Steps",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Ops Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Ops Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analysis Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Analysis Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reviewed At",
"type": "string",
"display": true,
"required": false,
"displayName": "Reviewed At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Alert Sent",
"type": "string",
"display": true,
"required": false,
"displayName": "Alert Sent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1J70PlmOm_nacRbwEgFUT6Pv_jRhXvYjlAM8kt8-sqwU/edit?usp=drivesdk",
"cachedResultName": "Failed Trade Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "4163bf00-c5a1-4ced-98b0-0a48585c3f2a",
"name": "Create Follow-up Task",
"type": "n8n-nodes-base.googleTasks",
"position": [
1792,
-48
],
"parameters": {
"task": "MDM3MTk0ODQ0NjU3OTYzMjMwNTY6MDow",
"title": "=Review failed trade: {{$json[\"Trade ID\"]}}",
"additionalFields": {
"notes": "=Priority: {{$json[\"Priority\"]}}\nError: {{$json[\"Error Code\"]}}\nCause: {{$json[\"AI Probable Cause\"]}}\n\nNext:\n{{$json[\"Recommended Next Steps\"]}}"
}
},
"credentials": {
"googleTasksOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "3ca6a7fb-01e0-4e77-ad81-a43d2c5f4b3c",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-1008
],
"parameters": {
"width": 848,
"height": 496,
"content": "# Failed Trade Root Cause Explainer\n## How it works:\n\nThis workflow monitors a Google Sheet for newly added failed trade records and automatically explains the likely operational root cause. When a new trade failure is logged, the workflow first prepares and validates the required trade details. If the record is complete, it sends the trade context, error code and error message to Gemini AI, which returns a probable cause, confidence level, recommended next steps and a short operations summary. The AI output is then parsed, formatted and written back into the failed trade sheet. After that, the workflow triggers downstream notifications and actions, including a Slack alert, an email notification and a follow-up task. It also updates the sheet to mark whether alerts were sent. If required fields are missing, the workflow skips AI analysis and updates the row as invalid input instead.\n\n## Setup steps:\n1. Create or prepare a Google Sheet with failed trade fields and output columns such as AI Probable Cause, AI Confidence, Recommended Next Steps, Ops Summary, Analysis Status, Reviewed At and Alert Sent.\n2. Connect Google Sheets Trigger and Google Sheets OAuth credentials in n8n.\n3. Configure Gemini API credentials and attach the Google Gemini Chat Model to the AI analysis step.\n4. Connect Slack credentials and choose the target ops alert channel.\n5. Connect Gmail credentials for email alerts.\n6. Configure the follow-up task node with the correct destination and task details.\n7. Test both valid and invalid trade records to confirm analysis, updates and alert behavior.\n8. Activate the workflow for live monitoring."
},
"typeVersion": 1
},
{
"id": "87420e08-cc3e-452e-a13f-7ab32d7d61c4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-192
],
"parameters": {
"color": 7,
"width": 672,
"height": 336,
"content": "## Trade Monitoring & Preparation\nMonitors the failed trade log for new entries, extracts and standardizes trade fields and validates that required data exists before proceeding with analysis."
},
"typeVersion": 1
},
{
"id": "ff4a29ba-f66e-40ee-b7d7-c4722c8afecc",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
-464
],
"parameters": {
"color": 7,
"width": 576,
"height": 480,
"content": "## AI Root Cause Analysis\nAnalyzes failed trade details using AI to determine the probable cause, confidence, next steps and operations summary, then parses the structured JSON output."
},
"typeVersion": 1
},
{
"id": "3a4d430f-0c05-4453-bb1a-452162f7c668",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
-416
],
"parameters": {
"color": 7,
"width": 432,
"height": 368,
"content": "## Sheet Update & Result Logging\n\nFormats the AI output into the expected sheet structure and writes the completed analysis back to the failed trade log."
},
"typeVersion": 1
},
{
"id": "ee74c907-efd5-4f79-9c0f-a0c2095da834",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1712,
-640
],
"parameters": {
"color": 7,
"height": 784,
"content": "## Alerts & Follow-Up Actions\n\nSends the completed failed trade analysis to operations through Slack and email and creates a follow-up task for resolution tracking."
},
"typeVersion": 1
},
{
"id": "3ee3fa56-b83e-4ce1-b7fd-7092129
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2googlePalmApigoogleSheetsOAuth2ApigoogleSheetsTriggerOAuth2ApigoogleTasksOAuth2ApislackOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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…
Source: https://n8n.io/workflows/15857/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n workflow automates the transition from raw financial trade data to professional client communication. It monitors a Google Sheet for portfolio changes, uses Gemini AI to draft a personalized,
Automate end-to-end vendor onboarding workflows with an AI-powered autonomous agent built in n8n 🤖. This workflow uses advanced MCTS (Monte Carlo Tree Search) reasoning to intelligently map procuremen
Automate your entire supplier negotiation process with this AI-driven workflow that intelligently drafts, refines, and sends negotiation emails 📧. Using advanced LLM reasoning and multi-angle strategi
Consultants, agencies, freelancers, and project managers who want to ensure proposals, emails, and tasks are followed up on time.
candidature. Uses agent, lmChatGoogleGemini, googleSheetsTrigger, gmail. Event-driven trigger; 18 nodes.