Portal Community
How this works: The node automatically calls the metadata endpoint to retrieve the temporary download URL, then immediately fetches the binary content in a single operation. You do not need to call media/get first.

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredPermanent System User access token from Meta Business Manager. Store in BizFirst Credentials Manager.
phoneNumberIdRequiredNumeric string ID of the WhatsApp Business phone number associated with the media.
apiVersionOptionalMeta Graph API version, e.g. v18.0. Defaults to v18.0.

Operation

FieldRequiredDescription
mediaIdRequiredThe ID of the media object to download. Sourced from a webhook trigger payload or from a previous media/upload or media/get node.
Memory considerations: The node streams the binary into memory. For very large files (video up to 16 MB, documents up to 100 MB), ensure the workflow execution environment has sufficient available memory. The node enforces a safe download limit of twice the configured max upload size.

Sample Configuration

{
  "resource": "media",
  "operation": "download",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "mediaId": "{{ $trigger.message.document.id }}"
}

Validation Errors

ErrorCause
accessToken is requiredThe accessToken field is empty or missing.
phoneNumberId is requiredThe phoneNumberId field is empty or missing.
mediaId is requiredThe mediaId field is empty or missing.
file_too_largeThe media file exceeds the configured safe download limit (2x the max upload size).
100 (Meta)Media ID does not exist or belongs to a different phone number account.
190 (Meta)Access token expired or invalid.
timeoutThe download request timed out. Retry once; if persistent, check network connectivity.

Output

Success Port

Fires when the binary content has been fully downloaded. The data field contains the file as a base64 string, ready to be saved to storage or passed to a processing node.

FieldTypeDescription
datastringBase64-encoded binary content of the downloaded file.
mimeTypestringMIME type of the downloaded file as reported by the response headers (e.g. image/jpeg).
fileSizenumberActual byte count of the downloaded content.
mediaUrlstringThe temporary signed URL that was used to fetch the content.
statusstring"downloaded" on success.
errorCodestringEmpty on success.
errorMessagestringEmpty on success.

Error Port

Fires when the metadata fetch or the binary download fails.

FieldTypeDescription
statusstring"failed", "error", or "timeout".
errorCodestringMeta error code or BizFirst internal code.
errorMessagestringHuman-readable description of the failure.
rawResponsestringRaw API error JSON for diagnostics.

Sample Output

{
  "data": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK...",
  "mimeType": "application/pdf",
  "fileSize": 143360,
  "mediaUrl": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1234...",
  "status": "downloaded",
  "errorCode": null,
  "errorMessage": null
}

Expression Reference

ValueExpressionNotes
File content (base64){{ $output.downloadMedia.data }}Pass directly to a storage node, an HTTP upload node, or decode in a Function node.
MIME type{{ $output.downloadMedia.mimeType }}Use to set the correct Content-Type header when forwarding the file.
File size (bytes){{ $output.downloadMedia.fileSize }}Log alongside the media ID for audit records.
Status{{ $output.downloadMedia.status }}"downloaded" on success.
Error code{{ $output.downloadMedia.errorCode }}Non-null on error port. Check for "file_too_large" to handle size overruns.

Node Policies & GuardRails

Policy AreaRecommendation
Archival timingWhatsApp media objects are deleted from Meta's servers 30 days after they are created. For compliance use cases, trigger downloads within hours of receipt, not days.
Memory managementFor high-volume workflows handling large video or document files, add a size gate using media/get before calling this node to prevent memory exhaustion.
Credential storageStore the access token in BizFirst Credentials Manager. Never expose it in plain text in node configuration.
Data residencyDownloaded media content passes through the BizFirstAI workflow engine. Ensure your data residency policies allow this before processing sensitive documents.
Error port handlingAlways connect the error port. A file_too_large error needs an alternative handling path such as notifying the sender that the file cannot be processed.
Do not store base64 in logsThe data field is a full base64 binary. Do not log it — route it directly to a storage node and discard after persistence is confirmed.

Examples

Download and Archive an Inbound Document

{
  "resource": "media",
  "operation": "download",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "mediaId": "{{ $trigger.message.document.id }}"
}

A webhook workflow fires when a customer sends a document. This node downloads the binary. A subsequent S3-Upload node saves the base64 content to cloud storage using the customer's phone number and a timestamp as the key. A confirmation text message is sent back to the customer with a reference number.

Download Voice Message for Transcription

{
  "resource": "media",
  "operation": "download",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "mediaId": "{{ $trigger.message.audio.id }}"
}

A support workflow detects an inbound audio message via webhook. This node downloads the OGG-encoded audio. The base64 content is decoded in a Function node, then posted to a speech-to-text API. The resulting transcript is attached to the support ticket and used to auto-classify the issue category.

Multi-Channel Media Forwarding

{
  "resource": "media",
  "operation": "download",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "mediaId": "{{ $input.mediaId }}"
}

A media relay workflow downloads an image received on WhatsApp and forwards it as an email attachment. The data (base64) and mimeType fields are passed to an Email node configured to send the file as an attachment to the assigned case manager's inbox.