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, risk-aware explanation email and sends it to an advisor via Slack for manual approval. Once approved, the email is sent automatically via Gmail and the source spreadsheet is updated to "Completed."
Client_ID, Client_Name, Trades_Made and Trigger_Status.Trigger_Status in your sheet to see the AI draft appear in Slack.In the high-stakes world of wealth management, keeping clients informed is vital but time-consuming. This workflow bridges the gap between technical data and human relationship management. It acts as an "AI Assistant" that watches your portfolio database (Google Sheets) for any new trades. Instead of sending a cold list of tickers, it passes that data to an AI model to write a warm, professional narrative.
The workflow prioritizes safety through a Human-in-the-Loop design. Before any client sees the AI-generated content, the draft is sent to a dedicated Slack channel. The advisor can review the logic and tone, then simply click "Approve" or "Reject" via interactive buttons. This ensures that the final communication always meets the firm's compliance and quality standards.
Finally, the workflow handles the "paperwork." If approved, it sends the email through Gmail and updates the spreadsheet status to "Completed." If rejected, it flags the record for "Manual Review," ensuring no client request is ever lost in the shuffle.
The workflow starts with the Google Sheets Trigger node. It is configured to "poll" your sheet every minute. It specifically watches the Trigger_Status column for any updates.
Setup: Select your Spreadsheet and the specific Sheet (tab) name. Ensure "Columns to Watch" is set to your status column.
The data then moves through a Code Node that parses the stringified trade data (like tickers and amounts) into a format the AI can read.
Setup: The workflow uses "Mock" nodes for Client Risk Profile and Market Context. For production, you should replace these with a "Google Sheets: Get Row" node or an "HTTP Request" node to pull the real risk profile of the client and live market news.
The AI: Draft Client Email node uses the Gemini model to combine the client’s name, their risk level, current market volatility and the specific trades made. It follows a strict prompt to ensure the email is professional and formatted correctly.
The Slack node sends the draft to the advisor. The message includes two dynamic links: Approve and Reject.
The Wait Node: After sending the Slack message, the workflow "pauses." It will wait for the advisor to click one of those links before moving to the next step.
Depending on the button clicked:
Approve: The Switch Node routes the flow to Gmail, sends the message to the client and updates the Sheet status to "Completed."
Reject: The flow alerts the advisor in Slack that the draft was discarded and updates the Sheet to "Needs Manual Review."
{{ $json.Client_Email }} to ensure it goes to the correct person.| Issue | Possible Cause | Solution |
|---|---|---|
| Workflow doesn't trigger | Trigger column name mismatch. | Ensure the column name in the "Trigger" node matches exactly with the Google Sheet. |
| AI Draft is nonsensical | Input data (Trades) is empty. | Check that the Trades_Made column in your sheet contains valid JSON or text. |
| Slack links don't work | n8n Webhook URL is not public. | Ensure your n8n instance is accessible from the internet (using a tunnel or static IP). |
| Gmail fails to send | Credential permissions. | Re-authenticate your Gmail OAuth2 and ensure "Send" permissions are granted. |
Setting up automated financial workflows can be complex. If you need a hand configuring your AI prompts, connecting your live market data or building more advanced "Human-in-the-Loop" systems, we are here to help!
Contact WeblineIndia to customize this workflow or build a custom automation solution tailored to your business needs.