Quick overview
This workflow receives advisor meeting notes via a webhook, uses OpenAI GPT-4o to generate a structured summary and compliance risk classification, logs the result to Google Sheets, and sends notifications through Gmail and Telegram based on the detected risk level.
How it works
- Receives a POST request with client and advisor details, risk tolerance on file, and raw meeting notes via a webhook.
- Normalizes the incoming fields and fills in safe defaults for missing values.
- Uses OpenAI GPT-4o to summarize the notes, classify compliance risk (high/medium/low), and produce flagged issues and recommended follow-up in a strict JSON structure.
- Appends the structured summary, risk level, and flags to a Google Sheets “Portfolio Reviews” compliance tracker for auditing.
- Routes the record by risk level and emails a compliance-review alert via Gmail for high-risk items.
- Sends a Telegram message to the compliance team for high-risk items and emails the advisor a logged summary via Gmail for medium-risk items.
Setup
- Add an OpenAI API credential with access to the gpt-4o model.
- Connect Google Sheets OAuth credentials and replace the spreadsheet ID in the Google Sheets append step (and ensure the “Portfolio Reviews” sheet has matching columns).
- Connect Gmail OAuth credentials and set the recipient logic as needed (the template sends emails to the submitted advisor email).
- Create a Telegram bot, add Telegram credentials, and replace the Telegram chat ID with your compliance team chat/channel.
- Copy the webhook URL from the trigger and configure your meeting-notes form or CRM to POST the expected JSON fields to it.
Requirements
- Active OpenAI API key (GPT-4o access).
- Gmail account with OAuth2 credentials configured.
- Google Sheets account with OAuth2 credentials configured.
- Telegram Bot token and target Chat ID (for compliance team alerts).
- n8n self-hosted or cloud instance (version 1.0+ recommended).
Customization
- PDF Memo Generation: Add a PDF-generation node to produce a signed, dated compliance memo for the client file automatically.
- CRM Integration: Connect to a CRM (Salesforce, Redtail, or Wealthbox via HTTP Request) to attach the summary directly to the client record.
- Quarterly Rollup Report: Add a quarterly digest sub-workflow that rolls up all flagged issues into one report for the Chief Compliance Officer (CCO).
- Client-Facing Recap: Add a second AI pass that drafts a client-facing meeting recap email (distinct from the internal compliance note).
Additional info
Audit Trail Protection: Every portfolio review gets a permanent, timestamped audit log in Google Sheets before any branching happens, so data is never lost even if downstream notifications fail.
Same-Day Risk Prevention: Flags suitability mismatches instantly via email and Telegram to resolve regulatory risks before trades execute.
Strict Schema Locking: Uses a Structured Output Parser with GPT-4o to lock the model into strict JSON schemas, preventing off-script outputs or parsing errors.