Automate DMARC report processing using this n8n workflow. Scheduled daily, it fetches compressed XML reports via Gmail, transforms them into readable HTML tables, and emails the results.
Download this n8n workflow template and start using it instantly.
Managing DMARC reports can be cumbersome; major providers like Google and Yahoo send them as compressed XML files (often GZ or ZIP) attached to emails, which are inherently difficult to read and analyze quickly. This powerful n8n workflow solves this problem by completely automating the entire process.
Starting with an n8n trigger, the system regularly queries Gmail, identifies the DMARC reports, and downloads the binary attachments. It then uses several sequential n8n node operations to decompress the file, parse the complex XML data, and convert it into structured JSON. Finally, the n8n node uses sophisticated templating to render the critical information (like source IP, pass/fail status for DKIM/SPF, and count) into a clean, summarized HTML table. This readable table is then delivered directly to your inbox using a final Gmail n8n node, turning complex data into actionable insight immediately. This specific n8n workflow demonstrates advanced file manipulation and data parsing techniques.
This n8n workflow is initiated by a schedule, ensuring daily processing of new reports.
cron n8n trigger, set to run daily at 1 PM.dmarc n8n node (a Gmail node) searches for emails matching a specific filter (from:([email protected] OR [email protected])) received within the last 24 hours. Crucially, it is configured to download all attachments.unzip n8n node handles the binary data, decompressing the attached DMARC file (which could be .zip or .gz) and passing the resulting XML file forward.xml n8n node extracts the actual XML content from the binary file, preparing the data for structure conversion.xml2json n8n node converts the verbose XML structure into a manageable JSON object, making it easy to reference specific data points.set n8n node is the core logic engine. It uses complex n8n expressions and conditional logic to iterate through the DMARC records in the JSON and compile them into a visually appealing HTML table, including key metrics like source IP, policy evaluation (DKIM/SPF), and message count.send n8n node emails the generated HTML table as the message body. The email subject is dynamically created using data parsed in step 5, providing context like the reporting organization and the domain covered by the report. This completes the n8n workflow, delivering a clean report.To install and utilize this powerful n8n workflow template, follow these steps:
dmarc n8n node, ensure your Gmail credentials are selected. The filter query is pre-set, but verify it matches the source of your DMARC reports.send n8n node, select the same Gmail credentials. Crucially, update the Send To field to your desired recipient email address.cron n8n trigger to ensure the daily execution time (currently 1 PM) suits your reporting needs. cron (Schedule Trigger): The starting n8n trigger, set for daily execution at 13:00 (1 PM).
dmarc (Gmail n8n node): Configured to perform the getAll operation. It downloads attachments and uses a specific query (from:([email protected] OR [email protected])) to filter only DMARC reports received recently.
unzip (Compression n8n node): Targets the binary property attachment0 to decompress the received zipped or gzipped report file.
xml (Extract From File n8n node): Extracts the text content from the binary output of the previous n8n node, specifying the operation as xml.
xml2json (XML n8n node): Converts the extracted XML document into a standardized JSON data structure, making the data accessible via expressions in the subsequent n8n node.
set (Set n8n node): This crucial n8n node uses extensive Javacript expressions and HTML formatting to build the final, readable table content, mapping JSON elements (like sourceip, count, policyevaluated.dkim, policyevaluated.spf) into HTML table rows.
set n8n node as the email body and dynamically generates a subject line using expressions referencing the original DMARC metadata (e.g., {{ $('xml2json').item.json.feedback.reportmetadata.orgname }} DMARC Report).Automate network documentation using this sophisticated n8n workflow. It leverages AWX to collect raw CDP topology data, parses it with custom n8n node logic, and uses the Gemini AI n8n node to generate highly specific, structured prompts ready for Lucidchart AI diagram generation.

Use this powerful n8n workflow template to automate the conversion of Revit, IFC, or DWG files by triggering local command-line executables, turning complex CAD data into actionable outputs.

Automate content repurposing with this powerful n8n workflow. Convert new blog posts from an RSS feed into high-quality audio using Eleven Labs and generate rich metadata using the OpenAI n8n node (GPT-4).

Automate document conversion efficiently. This ready-to-use n8n workflow fetches a DOCX file via URL, converts it to PDF using ConvertAPI, and saves the result locally. Great n8n templates for developers.

Use this robust n8n workflow to handle asynchronous AI tasks (like Replicate Moss-TTSD) by implementing a crucial polling loop. This n8n template ensures you only proceed once the job succeeds.








































