Skip to main content

Monitor data breaches in real-time with Have I Been Pwned

Workflow preview

Workflow preview
100%
Monitor data breaches in real-time with Have I Been Pwned preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? Security professionals Developers Individuals inter...

Best for

  • SecOps automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.converttofile, n8n-nodes-base.splitout, n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote, n8n-nodes-base.httprequest, n8n-nodes-base.readwritefile, n8n-nodes-base.extractfromfile

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Monitor data breaches in real-time with Have I Been Pwned
Workflow name
Monitor data breaches in real-time with Have I Been Pwned

Who is this for?

  • Security professionals
  • Developers
  • Individuals interested in data breach awareness

Use Case

  • Automated monitoring for new breaches
  • Proactive identity protection
  • Demonstration of simple cache mechanism

What this workflow does

  • Checks the Have I Been Pwned API every 15 minutes for the latest breaches.
  • Compares new breach data against previously notified breaches.
  • Demonstrates a simple cache mechanism to track previously seen breaches.

How the Cache Functionality Works

  • Read from Cache: Retrieves the last known breach from cache.json to avoid redundant alerts for the same breach.
  • Compare Against Current Breach: The workflow checks if the latest fetched breach differs from the cached one.
  • Update the Cache: If a new breach is detected, it updates cache.json with the latest breach data.

Setup instructions

  1. The endpoint used in this workflow does not require an API key.
  2. Add your desired alert mechanism in the red box attached to the New breach node.

How to customize this workflow to your needs

  • Modify Notification Settings: Tailor where alerts are sent (email, Slack, etc.). Add the desired node after the New breach node. This node contains all the data from the breach so it is eaisily available. You can choose from a variety of n8n nodes to send alerts when a new breach is detected. Below are a few common options you might consider adding after the New breach node:
  1. Email Node What it does: Sends an email notification to one or more recipients. Use case: Great for simple alerts to your inbox or a team distribution list. Customization: You can include breach details in the subject or body of the email, using data from the New breach node.
  2. Slack Node What it does: Sends a message to a Slack channel or user. Use case: Perfect for real-time alerts to your team in Slack. Customization: You can post breach details directly in a channel or DM. You can also format the message (bold, code blocks, etc.).
  3. Microsoft Teams Node What it does: Sends a message to a Teams channel. Use case: For organizations that use Microsoft Teams for communication. Customization: Similar to Slack, you can customize the message content and include all relevant breach information.
  4. Discord Node What it does: Sends an alert message to a Discord channel. Use case: Useful for teams or communities that coordinate via Discord. Customization: Add formatted messages with breach details for easy viewing.
  5. Telegram Node What it does: Sends messages to a Telegram chat or group. Use case: Good for mobile notifications and fast alerts. Customization: You can include breach summaries or detailed information, and even use bots to automate this.
  6. Webhook Node (as a sender) What it does: Sends breach data to another service via a webhook. Use case: If you have an external system or app that handles alerts, you can push the data directly to it. Customization: Send JSON payloads with detailed breach information to trigger actions in other systems.
  7. SMS Nodes (like Twilio) What it does: Sends an SMS notification to one or more phone numbers. Use case: For urgent alerts that need to be seen immediately. Customization: Keep messages concise, including key breach details like the time, type of breach, and affected system.
  • Adjust Check Frequency: Change the interval in the Schedule Trigger node (e.g., hourly or daily).

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 - When clicking ‘Test workflow’

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

Block 2 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 3 - Split Out

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

Block 4 - Schedule Trigger

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

Block 5 - Sticky Note

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

Block 6 - Request breaches

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

Block 7 - Read last breach

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

Block 8 - Get JSON from file

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

Block 9 - Check for content

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Set to none

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

Block 11 - If - check for new

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Set breach name

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

Block 13 - Write breach name to file

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

Block 14 - New breach

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

Block 15 - Old breach

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

Block 16 - Sticky Note1

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

Block 17 - Sticky Note2

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

Block 18 - Sticky Note3

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

Block 19 - Sticky Note4

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

Block 20 - Set empty json

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

Block 21 - Write cache.json

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

Block 22 - Convert json to file

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 23 - Add information about the last breach we alerted

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

Block 24 - Sticky Note6

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

3. Summary Table

Workflow Monitor data breaches in real-time with Have I Been Pwned
Complexity advanced
Nodes 24
Categories SecOps
Author Audun
Published 17 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3205/3205.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 Monitor data breaches in real-time with Have I Been Pwned do?

Who is this for? Security professionals Developers Individuals inter...

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 SecOps use case.