Skip to content

Latest commit

 

History

History
177 lines (135 loc) · 3.76 KB

File metadata and controls

177 lines (135 loc) · 3.76 KB

📧 Email Campaign & Click Tracking using n8n

This project demonstrates how to build a GoPhish-style email campaign system using n8n Cloud / Self-hosted n8n, Google Sheets, SMTP, and Webhooks.

Use cases:
  • Security awareness campaigns
  • Internal phishing simulations
  • Email click tracking
  • Marketing or compliance testing (authorized only)

🧩 What’s Included

  • Email Campaign Workflow (JSON)
    • Reads users from Google Sheets
    • Generates unique tracking URLs
    • Sends HTML emails via SMTP
  • Email Click Tracker Workflow (JSON)
    • Webhook-based click tracking
    • Normalizes click data
    • Logs clicks to Google Sheets
    • Redirects user after click

📁 Repository Structure

/
├── email_campaign_workflow.json
├── email_click_tracker_workflow.json
└── README.html

⚙️ Requirements

  • n8n (Cloud or Self-hosted)
  • Google Sheets account
  • SMTP credentials (Gmail, SES, Zoho, etc.)

📊 Google Sheets Setup

Recipients Sheet

email | name | status | last_sent

Click Logs Sheet

email | campaign_id | tracking_id | event | ip | user_agent | timestamp

⚠️ Column names are case-sensitive and must match exactly.


🚀 How to Import Workflows

  1. Open n8n → Workflows
  2. Click Import
  3. Import the JSON files from this repository
  4. Update credentials (SMTP & Google Sheets)
  5. Activate the workflows

🔗 How Tracking Works

  1. Email contains a unique tracking URL
  2. User clicks the link
  3. Webhook receives query parameters
  4. Click data is normalized
  5. Data is appended to Google Sheets
  6. User is redirected to a landing page

🧪 Test vs Production Webhooks

Important:
  • /webhook-test/ → Debugging only
  • /webhook/ → Production (emails must use this)
  • Workflow must be ACTIVE for production

🔐 Legal & Ethical Notice

This project is intended for authorized testing, education, and awareness only.
Do not use this system for:
  • Unauthorized phishing
  • Fraud or impersonation
  • Violating privacy laws
You are responsible for compliance with applicable laws and policies.

✨ Features

  • ✔ Unique per-user tracking links
  • ✔ Google Sheets as database
  • ✔ SMTP-based email delivery
  • ✔ Cloud-compatible (no Data Store)
  • ✔ Redirect after click
  • ✔ GoPhish-style architecture

📌 Future Improvements

  • Email open tracking (pixel)
  • Duplicate click prevention
  • Campaign dashboards
  • Auto follow-up emails

Watch Video For More Information.

YouTube Video

Available Our Hacking Course


---

Built with ❤️ using n8n
Shared for learning & awareness purposes.