IMAP Email Listener: XML Attachments to JSON & POST

Triggers on new IMAP emails, extracts binary XML attachments, converts to JSON, and sends via POST to an HTTP endpoint for easy processing.

n8n
IMAP Email Listener: XML Attachments to JSON & POST

This workflow monitors an IMAP mailbox for new emails, automatically downloading attachments. It specifically handles binary XML attachments by converting them into a UTF-8 string, then parsing the XML into a structured JSON object. A flexible Set node allows for custom data mapping or transformations before forwarding the JSON payload via a POST request to a specified HTTP endpoint, such as a local API for sales orders.

Ideal for EDI (Electronic Data Interchange) scenarios, it streamlines receiving XML-based documents like invoices or orders from partners, eliminating manual downloads and conversions. Benefits include real-time automation, reduced errors in data handling, and seamless integration with downstream systems like CRMs or databases.

Use cases: Automate supplier order processing by posting parsed JSON to your e-commerce backend; integrate with legacy systems sending XML emails; or build notification pipelines where email attachments trigger API actions. Highly customizable—replace Set with Function nodes for advanced logic.

$12.99
Last updated November 14, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Productivity workflows

More from Jordi Faber

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.