Skip to main content

Automate monthly merchant risk reviews with Supabase, Perplexity and Claude

Workflow preview

Workflow preview
100%
Automate monthly merchant risk reviews with Supabase, Perplexity and Claude preview
Open on n8n.io

1. Workflow Overview

Quick overview This consists 3 different workflows. Each one should be saved into individual workflows. The goal of these workflows is to automate a tedious process of creating a monthly merchant a...

Best for

  • CRM automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.supabase, n8n-nodes-base.code, n8n-nodes-base.merge, n8n-nodes-base.perplexity, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatanthropic

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Ryan Nolan.

Original n8n.io source

1.1 Workflow description

Title
Automate monthly merchant risk reviews with Supabase, Perplexity and Claude
Workflow name
Automate monthly merchant risk reviews with Supabase, Perplexity and Claude

Quick overview

This consists 3 different workflows. Each one should be saved into individual workflows.

The goal of these workflows is to automate a tedious process of creating a monthly merchant and industry review deck a task that might take a risk team 20+ hours to build

How it works

  1. Runs on a monthly schedule and initializes the run metadata (month, execution ID, timestamp).
  2. Retrieves active merchants and MCC reference data from Supabase, groups merchants by MCC, and uses Perplexity plus Claude to generate an MCC risk snapshot with key flags and a recommended action.
  3. Writes each MCC snapshot back to Supabase and aggregates all MCC snapshots for the run.
  4. Pulls high-risk merchants for the current month from Supabase and gathers external signals by screening names with OpenSanctions, searching recent cases in CourtListener, fetching recent Google reviews via Apify, and collecting adverse media via Tavily.
  5. Scrapes each merchant website with Firecrawl and uses Claude to classify the business vertical and flag restricted content.
  6. Uses Claude with Pinecone retrieval of prior Risk Committee decisions (embedded with OpenAI) to produce a single recommended action per merchant and inserts those recommendations into Supabase.
  7. Calculates 12-month portfolio trends from Supabase metrics, generates a short portfolio narrative with Claude, saves it to Supabase, and records a monthly manifest summarizing the run.
  8. Exposes a webhook that fetches the stored Supabase data for a requested month, formats it for downstream slide-building, and returns the JSON response.

Setup

  1. Create and connect credentials for Supabase, Anthropic (Claude), Perplexity, OpenAI (embeddings), Pinecone, Apify, Tavily, Firecrawl, and the two HTTP header auth credentials used for OpenSanctions and CourtListener.
  2. In Supabase, create/confirm the required tables and fields referenced by the workflow (merchants, mcc_codes, monthly_metrics, mcc_risk_snapshots, recommended_actions, portfolio_snapshots, monthly_manifest).
  3. Populate the Pinecone index name (n8nrisk) and run the manual ingestion workflow to embed and insert the provided prior decision examples before enabling the monthly recommendation step.
  4. Update any environment-specific constants such as the webhook path usage in your slide-building tool and verify the Supabase filters match your month format (yyyy-MM) and risk thresholds.
  5. If using the webhook integration, copy the production webhook URL and configure it in your external deck builder (for example, Claude “cowork”) to request the month parameter as needed.

Additional info

This template runs a monthly risk review that pulls merchant and MCC data from Supabase, researches industry changes with Perplexity, screens high-risk merchants using OpenSanctions, CourtListener, Apify, Tavily, and Firecrawl, and uses Anthropic Claude plus Pinecone to store risk snapshots and recommendations.

YouTube Video: https://www.youtube.com/watch?v=u8-bQlMtAKE&feature=youtu.be

Free Skool AI/n8n Group: https://www.skool.com/data-and-ai LinkedIn: https://www.linkedin.com/in/ryan-p-nolan/ Twitter/X:https://x.com/RyanMattDS Website: https://ryanandmattdatascience.com/

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Monthly on the 1st

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Initialize Run

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Supabase: Get Active Merchants

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 4 - Code: Distinct MCCs + Top Accounts

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Merge: Merchants + MCC Codes

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 6 - Supabase: Get MCC Codes

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Perplexity: MCC News (30d)

Type / Role
n8n-nodes-base.perplexity - perplexity
Config choices
Version 2

Block 8 - AI Agent: MCC Risk Rating

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 9 - Claude: MCC Agent

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.5

Block 10 - Parser: MCC Snapshot

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 11 - Supabase: Upsert MCC Snapshot

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 12 - Aggregate MCC Snapshots

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 13 - Merge: All Branches

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Supabase: Get High-Risk Merchants

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 15 - OpenSanctions: Company Screen

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 16 - Merge: Merchant Findings

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 17 - OpenSanctions: Owner Screen

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 18 - CourtListener: Company Cases

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 19 - CourtListener: Owner Cases

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 20 - Apify: Google Reviews

Type / Role
@apify/n8n-nodes-apify.apify - apify
Config choices
Version 1

Block 21 - Tavily: Adverse Media

Type / Role
@tavily/n8n-nodes-tavily.tavily - tavily
Config choices
Version 1

Block 22 - Firecrawl: Scrape Merchant Site

Type / Role
@mendable/n8n-nodes-firecrawl.firecrawl - firecrawl
Config choices
Version 1

Block 23 - AI Agent: Classify Website

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 24 - Claude: Website Classifier

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.5

Showing the first 24 of 69 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate monthly merchant risk reviews with Supabase, Perplexity and Claude
Complexity advanced
Nodes 69
Categories CRM, AI Summarization
Author Ryan Nolan
Published 05 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12472/12472.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate monthly merchant risk reviews with Supabase, Perplexity and Claude do?

Quick overview This consists 3 different workflows. Each one should be saved into individual workflows. The goal of these workflows is to automate a tedious process of creating a monthly merchant a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM, AI Summarization use case.