ZAPIN icon

ZAPIN

Interact with Zapin EVO

Chat → Get Media In Base64

AI-generated

Overview

This node operation retrieves media content from a chat message by its message ID and converts the media into a Base64 encoded string. It supports an option to convert video media into MP4 format before encoding. This is useful for scenarios where media needs to be processed or transferred in a text-based format, such as embedding images or videos in JSON payloads or sending media through APIs that require Base64 encoding.

Use Case Examples

  1. Extracting an image from a chat message and embedding it in an email as a Base64 string.
  2. Converting a video message to MP4 format and encoding it in Base64 for storage or further processing.

Properties

Name Meaning
Instance Name The name of the chat instance to connect to and retrieve the media from.
Message ID The unique identifier of the message containing the media to be retrieved.
Convert To MP4 A boolean flag indicating whether to convert the video media to MP4 format before encoding it to Base64.

Output

JSON

  • base64Data - The Base64 encoded string of the retrieved media content.

Dependencies

  • Requires connection to the chat API instance specified by 'Instance Name' and appropriate authentication credentials.

Troubleshooting

  • Ensure the 'Instance Name' is correct and the node has access to the chat instance.
  • Verify the 'Message ID' corresponds to a valid message containing media.
  • If 'Convert To MP4' is enabled, ensure the media is a video and the conversion process supports the media format.
  • Common errors include unsupported operation errors if the resource or operation names are incorrect, or API errors if authentication fails or the message ID is invalid.

Discussion