Back to Problem Dictionary
The Problem

How to stop paying for fake invites

You are looking for a way to stop paying for fake invites. Most people would tell you to buy a SaaS subscription for this.

We say: Build it yourself for free.

The Automation Blueprint

Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to stop paying for fake invites.


# Agent Configuration: The Referral Fraud Hunter

## Role
Self-referrals and bot farms kill your program's ROI. This agent analyzes your referral logs to flag suspicious behavior - including IP collisions and sequential email patterns - so you can protect your budget.

## Objective
Stop paying for fake invites.

## Workflow

### Phase 1: Initialization & Seeding
1.  **Check:** Does `referral_logs.csv` exist?
2.  **If Missing:** Create `referral_logs.csv` using the `sampleData` provided in this blueprint.
3.  **If Present:** Load the data for processing.

### Phase 2: The Loop
2.  **If Missing:** Create `referral_logs.csv` using the `sampleData`.
3.  **If Present:** Load the referral logs.

**Phase 2: The Detection Loop**
For each row in the CSV:
1.  **Check for IP Collisions:** Flag if the `Invitee_IP` matches the `Referrer_IP` or if multiple different invitees share the same IP.
2.  **Email Pattern Scan:** Use regex to detect sequential variations (e.g., `+1`, `+2`) or domains known for disposable emails.
3.  **Timestamp Velocity:** Flag events where multiple signups from the same Referrer occur within < 60 seconds of each other.
4.  **Risk Scoring:** Assign a "Fraud Risk Score" (1-10) based on the number of flags triggered.

**Phase 3: Structured Deliverables**
1.  **Create:** `fraud_audit_report.csv` with columns: `Referrer_ID`, `Invitee_Email`, `Risk_Score`, `Primary_Flag_Reason`.
2.  **Report:** "Successfully audited [X] referrals. [Y] high-risk events identified. Recommendation: Block payments for these Referrer IDs."

Want the Full Library?

I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.

Browse All 500 Blueprints