# Media

Use the *Media* node to [send ](#outbound-media)or [receive ](#inbound-media)media files [supported ](#supported-media-formats-and-sizes)by the channels you have set up in Chat Flow.&#x20;

{% embed url="<https://vimeo.com/761772948?share=copy>" %}

## Inbound media

When selecting the **inbound** media direction, you are **receiving** a media file from your customer.&#x20;

You have to add a *Media* node for each media file you want to receive from your customers.&#x20;

Once received, you need a mechanism to upload these files onto your own system. Each *Media* node must be followed by an [*API Integration*](/chat-flow/action-nodes/action-nodes-api-integration.md) node utilizing an [API integration](/chat-flow/configuration/api-integration.md) to upload the file to your system/database once received from the customer.

{% hint style="info" %}
**IMPORTANT:** The request content type for this API integration must be set to *multipart/form-data.* The response type can be *application/json*, but is dependent on your API.&#x20;
{% endhint %}

**Example 1:**&#x20;

You want the customer to send you **one** media file.&#x20;

* Add one *Media* node to your flow followed by one *API Integration* node.

**Example 2:**

You want the customer to send you **three** media files.&#x20;

* Add three *Media* nodes to your flow, each one followed by an *API Integration* node (i.e., three *API Integration* nodes in total).

{% hint style="success" %}
**Flow construct for Example 2:**&#x20;

*Media* node --> *API Integration* node --> *Media* node --> *API Integration* node --> *Media* node --> *API Integration* node&#x20;
{% endhint %}

<figure><img src="/files/oIFqlK3DZv4cvbENKF3T" alt="" width="563"><figcaption><p>Setup of a Media node (inbound)</p></figcaption></figure>

<figure><img src="/files/X7DqoMm0zCIjX6PYw182" alt="" width="478"><figcaption><p>For each media node an API Integration node is used to upload the file to an external source.</p></figcaption></figure>

## Outbound media

When selecting the **outbound** media direction, you are **sending** a media file to your customers.&#x20;

You can select to:

* Use an [API integration](#api-integration) to download the file you want to send to your customers from your system/database; or
* Upload an [asset](#assets)/use an existing asset to send to your customer

You have the option to either:

1. End the session after sending the media file to the customer; or
2. Continue the flow after sending a media file to the customer and specify the next step/flow to automatically follow. The workflow can immediately continue to the next step without requiring input from the customer first.

![Example of what the customer sees on WhatsApp when your business sent a media file to them](/files/zgtQcSlvapjmtIWtPcZm)

#### API Integration

Selecting this option requires you to download the media file from your system first before sending it to your customers.

{% hint style="info" %}
The request content type for this API integration may be set to *application/json* or *multipart/form-data.*
{% endhint %}

You need to add a *Media* node for each outbound media file you want to send to your customer. Each *Media* node must be preceded by an [*API Integration*](/chat-flow/action-nodes/action-nodes-api-integration.md) node utilizing an [API integration](/chat-flow/configuration/api-integration.md) to download the file from your system/database before it can be sent to the customer.

**Example 1:**

You want to send **one** media file to the customer.&#x20;

* Add one *API Integration* node to your flow followed by one *Media* node.

**Example 2:**

You want the customer to send you **three** media files.&#x20;

* Add three *API Integration* nodes to your flow, each one followed by a *Media* node (i.e., three *Media* nodes in total).

{% hint style="success" %}
**Flow construct for Example 2:**&#x20;

&#x20;*API Integration* node --> *Media* node --> *API Integration* node --> *Media* node --> *API Integration* node --> Media node&#x20;
{% endhint %}

<figure><img src="/files/63t4jF3RtGH2fK7qZcqX" alt="" width="563"><figcaption><p>Setup of a Media node (outbound; API)</p></figcaption></figure>

#### ‌Assets

Selecting this option opens another call to action, *+ Add file*. Clicking this opens a pop-up modal where the flow-builder can add new media files, or select from [previously uploaded](/chat-flow/configuration/manage-your-workflow-assets.md) ones. After selecting *+Add File* on the node, you can upload a new media file or select from existing ones.

<figure><img src="/files/NHlGhhy860UfLvbmP2ND" alt="" width="563"><figcaption><p>Setup of a Media node (outbound; asset library)</p></figcaption></figure>

![After selecting "+Add File" on the node, you can upload a new media file, or select from existing ones](/files/-MkB5dlpTFySsM1Q4hRs)

A thumbnail of the selected media file appears on the node:

<figure><img src="/files/DBe2I3EjgQaF7JkMLgj6" alt="" width="319"><figcaption></figcaption></figure>

View in the canvas:

![](/files/galK6MRD1veAs4MVg7JF)

## Supported media formats and sizes

{% hint style="info" %}
The file types supported by this node have format and size limitations. The table below indicates the supported formats and their size limits.&#x20;
{% endhint %}

<table><thead><tr><th width="249.33333333333331">File Type</th><th width="296.39014373716634">Supported Formats</th><th>File Size Limit</th></tr></thead><tbody><tr><td>Documents</td><td>pdf, doc, docx, xls, xlsx, ppt, pptx</td><td>20MB</td></tr><tr><td>Images</td><td>jpeg, jpg, png, udsz</td><td>5MB</td></tr><tr><td>Audio files</td><td>aac, amr, mp4, mp3, opus</td><td>16MB</td></tr><tr><td>Video files</td><td>mp4</td><td>5MB</td></tr></tbody></table>

{% hint style="warning" %}

* Captions are only applicable for **image** and **video** types.
* For any **document** type, the handset will display the original filename (and not the caption) when you download the document onto your handset.
* **Audio** files: no caption or filename is displayed on the handset.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.clickatell.com/chat-flow/user-facing-nodes/display-nodes/user-facing-interactions-media-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
