Pre-assess sanctions screening hits with OpenAI and Gmail
Ready for 3.0What this workflow does
This AI workflow has 41 nodes and runs when an HTTP POST request hits its webhook URL (plus 2 other triggers). Along the way it connects OpenAI Chat Model, Data table, HTTP Request and Gmail. It also calls treasury.gov, scsanctions.un.org and api.gleif.org over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 2 other triggers).
- Screening settings (Edit Fields (Set)): sets 3 fields: reviewer_email, second_approver_email, compliance_officer_email
- Alert compliance ops (Gmail): uses Gmail
- Create audit table (Data table): create (table)
- Normalize and validate request (Code): runs custom JavaScript code
- Is the request valid? (If): checks a condition and branches into true / false
- Find earlier cases for this party (Data table): get (row)
- Reply 400 with validation errors (Respond to Webhook): sends the response back to the webhook caller
- Check open cases and reuse window (Code): runs custom JavaScript code
- Route by case state (Switch): routes items into 3 branches
- Open case in audit log (Data table): insert (row)
…plus 23 more steps. See the full node list below.
Services it uses
Other OpenAI + Gmail templates (1,623)
HTTP calls to: treasury.gov, scsanctions.un.org, api.gleif.org
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (18)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - Data table
n8n-nodes-base.dataTable - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code Tool
@n8n/n8n-nodes-langchain.toolCode - Data Table Tool
n8n-nodes-base.dataTableTool - Http Request Tool
n8n-nodes-base.httpRequestTool - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Gmail
n8n-nodes-base.gmail - Wait
n8n-nodes-base.wait - Manual Trigger
n8n-nodes-base.manualTrigger - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Quick Overview This workflow receives counterparties via a header-authenticated webhook, screens them against OFAC SDN/alias and UN consolidated sanctions lists, uses an OpenAI-powered agent to pre-assess possible hits, routes the case through a human review…