Media

If you need your end-users to share media files with you or need to share important documents with your end-users, you can use the Media node to send or receive media files supported by the channels you have set up in Chat Flow.

Inbound media

When selecting the inbound media direction, your end-user is requested to send a media file to you. Once received, you need a mechanism to upload these files onto your own system.

You have to add a Media node for each inbound media file you want to receive from your end-user. Each Media node must be followed by an HTTP Call node utilizing an API integration to upload the file to your system/database once received from the end-user.

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.

Example 1:

You want the end-user to send you one media file. Add one Media node to your flow followed by one HTTP Call node.

Example 2:

You want the end-user to send you three media files. Add three Media nodes to your flow, each one followed by an HTTP Call node (i.e., three HTTP Call nodes in total).

Flow construct for Example 2:

Media node --> HTTP call node --> Media node --> HTTP call node --> Media node --> HTTP call node

Setup of a Media node (inbound)
For each media node an HTTP call node is used to upload the file to an external source

Outbound media

When selecting the outbound media direction, you are sending a media file to your end-users.

You can select to:

  • Use an API integration to download the file you want to send to your end-user from your system/database; or

  • Upload an asset/use an existing asset to send to your end-user

You have the option to either:

  1. End the session after sending the media file to the end-user; or

  2. Continue the flow after sending a media file to the end-user and specify the next step/flow to automatically follow. In this case, the workflow can immediately continue to the next step without requiring input from the end-user first.

Example of what the end-user will see within their WhatsApp chat with the business (option 2)

API INTEGRATION

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

The request content type for this API integration may be set to application/json or multipart/form-data

You need to add a Media node for each outbound media file you want to send to your end-user. Each Media node must be preceded by an HTTP Call node utilizing an API integration to download the file from your system/database before it can be sent to the end-user.

Example 1:

You want to send one media file to the end-user. Add one HTTP Call node to your flow followed by one Media node.

Example 2:

You want the end-user to send you three media files. Add three HTTP Call nodes to your flow, each one followed by a Media node (i.e., three Media nodes in total).

Flow construct for Example 2:

HTTP call node --> Media node --> HTTP call node --> Media node --> HTTP call node --> Media node

Setup of a Media node (outbound) - API

View in the canvas:

‌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 ones. After selecting "+Add File" on the node, you can upload a new media file, or select from existing ones.

Setup of a Media node (outbound) - Assets
After selecting "+Add File" on the node, you can upload a new media file, or select from existing ones

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

View in the canvas:

Supported media formats and sizes

The file types supported by this node have format and size limitations. The table below indicates the supported formats and their size limits.

File Type

Support Format(s)

File Size Limit

Documents

'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx',

30MB

Images

'jpg', 'jpeg', 'png', 'usdz'

5MB

Audio files

'aac', 'amr', 'mp4', 'mp3', 'opus'

16MB