🔬 Notify clients of delayed trade settlements with Google Sheets, Gemini, Slack and Gmail

⚡ 10 views · 🔬 Document Extraction & Analysis

Description

Quick overview

This workflow runs daily to check trade settlements stored in Google Sheets, identifies overdue trades, uses Google Gemini to classify delay reasons and severity, and notifies each affected client via Slack and a formatted Gmail report.

How it works

  1. Runs daily on a schedule trigger.
  2. Reads all trade records from a Google Sheets spreadsheet and normalizes key fields like trade ID, settlement date, status, client email, and Slack member ID.
  3. Validates and reformats settlement dates, then flags trades as delayed when the settlement date is before today and the status is not “settled”.
  4. Filters to delayed trades only and groups them by client email so each client is processed as a batch.
  5. Sends each client’s delayed trades to Google Gemini to generate per-trade delay reasons, a severity level (HIGH/MEDIUM/LOW), and a recommended action.
  6. Routes trades by severity, then sends a Slack DM summary to the client and emails a detailed HTML report via Gmail.

Setup

  1. Connect your Google Sheets credentials and update the spreadsheet ID and sheet tab used to read the trade portfolio.
  2. Add Google Gemini (LangChain) credentials and confirm the selected Gemini model is available in your project.
  3. Connect your Slack OAuth2 credential and ensure each row in the sheet contains a valid Slack member ID for the recipient.
  4. Connect your Gmail account (or Google OAuth credentials for Gmail) and verify the workflow is allowed to send emails to client addresses.
  5. Ensure the Google Sheet includes the required columns (trade id, stock name, settlement date, quantity, price, status, client email, client name, slack member id) and adjust the schedule time if needed.

Additional info

How To Customize Nodes

Add-Ons (Enhancements)

Use Case Examples

  1. Brokerage Firms

    • Monitor settlement delays across multiple client portfolios
  2. Trade Operations Teams

    • Get proactive alerts before clients raise concerns
  3. Wealth Managers

    • Keep clients informed with automated updates
  4. Fintech Platforms

    • Enhance transparency in trade lifecycle tracking
  5. Compliance Monitoring

    • Track delays that may impact regulatory reporting

These are just a few examples—this workflow can be adapted for many other trade monitoring scenarios.

Troubleshooting Guide

IssuePossible CauseSolution
No data fetchedIncorrect Sheet ID or permissionsVerify Google Sheets credentials and access
Dates not detected properlyInvalid date format in sheetEnsure proper date format (YYYY-MM-DD recommended)
No delayed trades foundAll trades are settled or future datedCheck dataset and logic
Slack message not sentInvalid Slack member IDVerify Slack user ID format
Email not deliveredGmail credentials issueReconnect Gmail OAuth
AI node not workingMissing Gemini API credentialsConfigure API key properly

Need Help?

If you need assistance setting up this workflow, customizing nodes or building advanced add-ons, our n8n workflow development team at WeblineIndia is happy to help.

We specialize in:

👉 Reach out to us for:

Let us help you turn your operations into a fully automated system.

🔗 Nodes Used

Google Sheets, Slack, Gmail, Schedule Trigger, Google Gemini

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup