How to receive images and files from a user
This section explains how to detect when a user sends a file, obtain its link, and how to work with it correctly.
To identify when a user has sent an attachment (such as an image, file, video, or audio), you must use the trigger condition:
attachment_message

After a user sends a file, the following system variables are generated:
#{attachments}: Contains the URLs of all attachments from the user's message, formatted as a JSON array. Use this when you need to process multiple files or handle the data structure programmatically.#{attachment_url}: Contains a direct, plain-text URL to the first (or only) attachment. This is the most convenient variable for immediate use, such as displaying the link in a message or passing it to another function.
To understand the practical difference, you can display both variables in a bot message. The #{attachments} variable will show a structured JSON array, while #{attachment_url} will show a simple, clickable URL.

If your project handles multiple user attachments, it is efficient to assign each attachment URL to a dedicated variable.
To do this, declare a new variable in the block editor's Calculator and assign the #{attachment_url} value to it.
Example:
user_file = #{attachment_url}

Assign the value of attachment_url to the variable url_image1.
Last updated