Member-only story

Build a Phishing Detection Bot With Gmail, VirusTotal, and GPT

4 min readMay 8, 2025

Automatically scan incoming emails, assess malicious links, and get AI-generated risk summaries.

Introduction

Phishing remains one of the most effective cyberattack methods. Even vigilant users can overlook cleverly crafted messages. What if you could automate link analysis and risk assessment without manual effort?

In this guide, you’ll learn how to build a bot that:

  1. Watches your Gmail inbox for new messages
  2. Extracts URLs from each email
  3. Queries VirusTotal for link reputations
  4. Leverages GPT to summarize the findings
  5. Notifies you or your security channel with an actionable report

This approach gives you continuous protection and frees you from sifting through every suspicious email by hand.

What You’ll Need

  • A Gmail account with API credentials
  • A VirusTotal API key
  • An OpenAI API key (GPT-3.5 or GPT-4)
  • An n8n instance (self-hosted or cloud)
  • (Optional) A Slack webhook URL, Notion integration, or another notification endpoint

Architecture…

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (1)

Write a response

This is a well-structured and highly practical guide that seamlessly integrates Gmail, VirusTotal, and GPT to automate phishing detection and enhance email security with minimal manual effort.

8