15 September 2025
Building an Automated Maritime Regulatory Watchdog with n8n: A Workflow Report
Leveraging AI and low-code automation to ensure maritime training compliance. This system was built for the Cyprus Maritime Academy.

This report details the architecture and functionality of a sophisticated n8n workflow system built for the Cyprus Maritime Academy (CyMA). The project’s goal was to automate the critical process of monitoring, analyzing, and reporting on maritime regulatory updates, ensuring the Academy remains compliant and ahead of industry changes.
The Power of n8n
n8n is a "fair-code" workflow automation tool that empowers users to connect various applications and services through a visual, node-based interface. It allows for the creation of complex, automated processes without extensive coding, acting as the digital plumbing that connects the modern web. From simple notifications to advanced data processing and AI integration, n8n enables the automation of repetitive tasks, freeing up valuable time for more strategic work.
The Use Case: A Flood of Maritime Regulations
For a leading institution like the Cyprus Maritime Academy, staying current with the latest developments in seafarer training and certification is not just best practice—it's a requirement for auditors like the European Maritime Safety Agency (EMSA). Manually searching websites like the International Maritime Organization (IMO) for new circulars, resolutions, and convention amendments is a monumental and inefficient task.
The challenge isn't a lack of information, but an overwhelming volume of it. The objective was to design a system that could systematically filter this noise, identify relevant updates, and deliver a concise, prioritized, and actionable intelligence briefing to the Academy's staff.
The Automated Solution: Two Patterns for Total Coverage
We developed a multi-workflow system, nicknamed the "CyMA Watcher," to provide comprehensive monitoring. Recognizing that regulatory bodies publish information in different ways, we engineered two distinct patterns to handle the primary sources of updates: new document uploads (PDFs) and changes to existing web pages.
Pattern 1: PDF Discovery & Analysis (MEPC Resolutions)
Many official updates are released as PDF documents on index pages. The first workflow is designed to crawl these pages, discover new documents, and perform a deep analysis. It monitors the IMO's index for Marine Environment Protection Committee (MEPC) resolutions as a prime example.
- Multi-Layer Scraping: The workflow begins by fetching the main MEPC index page and extracting links to all sub-pages, which are typically organized by year.
- PDF Discovery: It then visits each of these sub-pages and scrapes the links for every PDF document it finds.
- Intelligent Metadata Extraction: The system parses the title of each PDF to extract key metadata, such as the document code (
MEPC.382(80)), resolution, and meeting number, creating structured, usable data. - Newness Detection: Each unique document is checked against a Supabase database to determine if it has been seen before.
- AI-Powered Relevance Analysis: If a document is new, the workflow downloads the PDF, extracts its full text, and passes it to a specialized GPT-5-mini agent. This AI has been prompted to act as a CyMA regulatory analyst, tasked with determining if the document is relevant to seafarer competence-based training and generating a summary, relevance assessment, and a clear, actionable recommendation for the Academy.
- Alerting & Archiving: The AI's analysis is then formatted into a professional email alert and sent to stakeholders. Simultaneously, the findings and a link to the PDF are archived in the database for a permanent compliance record.

Pattern 2: Static Page Change Detection (MARPOL Convention)
Other critical information, such as the details of a major convention, exists on a single, static webpage that is updated periodically. The second workflow is engineered to monitor these pages for any substantive changes, using the IMO's MARPOL Convention page as its target.
- Content Hashing: The workflow scrapes the main content of the MARPOL page and cleans the text to remove irrelevant elements like menus and footers. It then generates a unique
SHA-256hash—a digital fingerprint—of the cleaned text. - Efficient Change Detection: This new hash is compared against the last known hash stored in our Supabase database. If the hashes match, no further action is taken, preventing false alarms from trivial changes like a typo fix.
- AI-Powered "Diff" Analysis: If the hashes differ, a substantive change has occurred. The workflow retrieves the previous version of the text from the database and sends both the old and new versions to an AI agent.
- Substantive Change Summary: The AI is prompted to compare the two texts and produce a concise, human-readable summary of only the important differences—new regulations, altered dates, or changed requirements. This turns a confusing "track changes" view into actionable intelligence.
- Alerting & Versioning: The AI's summary is formatted into an email alert, and the new version of the text is saved in a
page_versionstable in the database, creating a complete, auditable history of the page's evolution.

Key Benefits for the Cyprus Maritime Academy
This automated system transforms a reactive, manual process into a proactive, intelligent one, delivering significant advantages:
- Time Savings: Eliminates hours of daily manual website checks and document reading.
- Signal Over Noise: Leverages AI to filter for relevance, ensuring staff only focus on updates that directly impact seafarer training and certification.
- Actionable Intelligence: Delivers focused briefs with clear summaries and next steps, enabling faster and more informed decision-making.
- Audit-Ready Compliance: Creates a persistent, versioned archive of all monitored documents and page changes, providing a robust record for auditors.
- Comprehensive Coverage: The dual-pattern approach ensures no update is missed, whether it's a newly published PDF or a subtle change on a static page.
- Consistency: Runs on a reliable, automated schedule, providing a dependable intelligence briefing without human intervention.
As a next step, we plan to create a master workflow that will check the database for all the changes that have occurred across the various sources. This will allow the system to send a single, consolidated email digest per week, rather than potentially 14 different emails, further streamlining the information flow for the Academy.

