Automatic WhatsApp Media Downloader - n8n Workflow

Use this essential n8n workflow to automatically capture and download media files (images, video, documents) received through your WhatsApp Business API, leveraging the n8n trigger.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Support Teams: Needing to archive media files sent by customers via WhatsApp for case tracking.
Data Engineers: Requiring real-time ingestion of multimedia content from social channels.
n8n Developers: Looking for robust n8n templates for advanced API interaction and file handling.
Businesses using the WhatsApp Business API: Who need automated media backup solutions.

Overview

Handling media content sent through the WhatsApp Business API requires a specific two-step authentication process: first, getting the media ID from the webhook, and second, requesting a private download URL. This powerful n8n workflow automates this entire sequence. By leveraging a specialized WhatsApp n8n trigger and subsequent WhatsApp n8n node for URL retrieval, this n8n template ensures that incoming images, videos, or documents are reliably downloaded. This is a critical n8n automation for applications requiring media persistence, eliminating the need for complex custom scripting and ensuring immediate data availability after the n8n trigger fires.

How it Works

The entire automation begins with the Trigger WhatsApp Media n8n trigger. This specialized n8n node waits for incoming messages containing media.


  1. Trigger Activation: When a user sends a media file (e.g., an image) to your connected WhatsApp Business account, the WhatsApp n8n trigger activates the n8n workflow.

  2. Retrieve Media ID: The trigger output contains the media ID. The n8n workflow passes this ID to the next n8n node.

  3. Fetch Secure URL: The Fetch Media Download URL n8n node uses the media ID to call the WhatsApp API and retrieve a temporary, secure download URL. This URL is required to access the actual file.

  4. Download File: The Download Media File n8n node, configured as an HTTP Request n8n node, uses the retrieved URL. Crucially, it authenticates the request using the WhatsApp API token (configured as an HTTP Header Auth credential) to successfully download the binary data of the file, finalizing this essential n8n workflow step.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance as a new n8n template.

  2. WhatsApp Trigger Credential Setup:

Click on the Trigger WhatsApp Media n8n trigger node.
You must configure your WhatsApp Trigger API credentials (OAuth account) to link the n8n trigger to your Meta/WhatsApp webhook setup.

  1. WhatsApp API Credential Setup (Media URL):

Click the Fetch Media Download URL n8n node.
Set up or select your standard WhatsApp API credential, ensuring it has access to the Media API.

  1. HTTP Request Credential Setup (Download):

Click the Download Media File n8n node.
The download requires authentication. Set the Generic Auth Type to 'HTTP Header Auth' and input your permanent WhatsApp Business API Access Token as the Bearer Token. This token is required by Meta to access private media URLs.

  1. Activate: Save and activate the n8n workflow. It is now ready to process incoming media.

Node Details

Trigger WhatsApp Media (whatsAppTrigger n8n trigger):
Function: Serves as the starting n8n trigger, listening for new messages on the linked WhatsApp Business API account.
Key Configuration: Listens specifically for messages updates. Requires WhatsApp Trigger API OAuth credentials.
Fetch Media Download URL (whatsApp n8n node):
Function: Retrieves the time-sensitive download URL for the media file, using the mediaUrlGet operation.
Key Configuration: Retrieves the Media ID using an expression: {{ $json.messages[0].image.id }}.
Download Media File (httpRequest n8n node):
Function: Executes an authenticated GET request to download the actual binary data of the media file.
* Key Configuration: Uses the URL retrieved from the previous n8n node ({{ $json.url }}). Authentication is set to HTTP Header Auth, requiring the WhatsApp API token to authorize the private media download.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by

Full Stack Website Developer & Automation Expert

Featured*