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 with optional four-eyes approval, and logs outcomes in an n8n Data Table.
How it works
- Receives a POST request on a header-authenticated webhook with counterparty details, validates the payload, and generates a stable match key.
- Looks up prior cases in the n8n Data Table and immediately returns an existing open case or a recent clear result instead of re-screening.
- Opens a new case in the Data Table, acknowledges the request with a case ID, downloads the OFAC SDN, OFAC alias, and UN consolidated lists, and runs fuzzy name matching to find candidate hits.
- If there are possible matches, sends the subject and candidates to an OpenAI agent that also checks prior decisions from the Data Table and optionally queries the GLEIF LEI register for entities to produce a structured assessment.
- Emails the case summary to a reviewer via Gmail and waits for a decision in an n8n form to clear as false positive, escalate, or ask up to two follow-up questions to the agent.
- If a clearance requires four-eyes approval, requests confirmation from a second approver via Gmail approval and escalates the case if the approval is rejected, times out, or violates the reviewer/approver separation.
- Writes the final decision to the Data Table, emails escalations to the compliance officer, and notifies the original requester of the screening outcome.
Setup
- Run the one-time setup path to create (or reuse) the
screening_cases n8n Data Table.
- Create and select a Header Auth credential for the webhook so your onboarding/source system can call the endpoint.
- Add OpenAI credentials (Chat Model) and Gmail credentials for sending reviewer, approver, requester, and escalation emails.
- Replace the placeholder email addresses in the settings (reviewer, second approver, compliance officer) and set the ops email used for workflow error alerts.
- Copy the production webhook URL into your onboarding tool so it POSTs
name, type (person/entity), requested_by, and any optional fields like date_of_birth, country, and reference.
- Set this workflow as its own error workflow (or ensure the error trigger workflow is active) so failed runs alert compliance ops.