Hi Remi,
Summary
Please add multi-step request workflows to the REST API connector. This is required to send audio/video/files as real attachments in MAX messenger.
Right now LHC can only do one HTTP request per outgoing message/file. Because of that, in MAX I can only send audio/video/file as links, not as attachments.
Why (MAX API requires 2–3 steps)
MAX works like this:
-
Get upload URL
POST https://platform-api.max.ru/uploads?type=video|audio|file|image
-
Upload file bytes (multipart/form-data)
POST %UPLOAD_URL% with multipart field data=@file
-
Send message referencing uploaded file
POST https://platform-api.max.ru/messages with attachments
For video/audio MAX returns a token from step 1/2 and it must be used in attachments.
Images are special: MAX also supports attaching an image by external url, so images can work in one step. But audio/video/files need the upload flow.
What we need in LHC
Add a “workflow / steps” mode for REST connectors:
-
Ability to run multiple HTTP requests in sequence
-
Ability to save values from JSON response into variables (e.g. {upload_url}, {token})
-
Ability to upload a file as multipart/form-data
- either from LHC stored file path/id
- or by downloading
{file_url} server-side first
-
Ability to use captured variables in next steps
Minimal example (pseudo-config)
Send video as attachment to MAX:
Step 1 – create upload
-
POST /uploads?type=video
-
capture:
upload_url (string)
token (string)
Step 2 – upload bytes
-
POST {upload_url}
-
multipart/form-data
data: file bytes (from LHC file or downloaded from {file_url})
Step 3 – send message
POST /messages
- body example:
{
"text": "Here is video",
"attachments": [
{ "type": "video", "payload": { "token": "{{token}}" } }
]
}
Image case (already works):
{
"text": "photo",
"attachments": [
{ "type": "image", "payload": { "url": "{{file_url}}" } }
]
}
Acceptance criteria
- REST connector supports 2+ sequential requests per outgoing message.
- Can store JSON response fields into variables for later steps.
- Supports multipart file upload (field name
data) with real file bytes.
- With this, MAX audio/video/file are sent as attachments, not links.
Thanks!
Hi Remi,
Summary
Please add multi-step request workflows to the REST API connector. This is required to send audio/video/files as real attachments in MAX messenger.
Right now LHC can only do one HTTP request per outgoing message/file. Because of that, in MAX I can only send audio/video/file as links, not as attachments.
Why (MAX API requires 2–3 steps)
MAX works like this:
Get upload URL
POST https://platform-api.max.ru/uploads?type=video|audio|file|imageUpload file bytes (multipart/form-data)
POST %UPLOAD_URL%with multipart fielddata=@fileSend message referencing uploaded file
POST https://platform-api.max.ru/messageswithattachmentsFor video/audio MAX returns a
tokenfrom step 1/2 and it must be used inattachments.Images are special: MAX also supports attaching an image by external
url, so images can work in one step. But audio/video/files need the upload flow.What we need in LHC
Add a “workflow / steps” mode for REST connectors:
Ability to run multiple HTTP requests in sequence
Ability to save values from JSON response into variables (e.g.
{upload_url},{token})Ability to upload a file as multipart/form-data
{file_url}server-side firstAbility to use captured variables in next steps
Minimal example (pseudo-config)
Send video as attachment to MAX:
Step 1 – create upload
POST /uploads?type=videocapture:
upload_url(string)token(string)Step 2 – upload bytes
POST {upload_url}multipart/form-datadata: file bytes (from LHC file or downloaded from{file_url})Step 3 – send message
POST /messages{ "text": "Here is video", "attachments": [ { "type": "video", "payload": { "token": "{{token}}" } } ] }Image case (already works):
{ "text": "photo", "attachments": [ { "type": "image", "payload": { "url": "{{file_url}}" } } ] }Acceptance criteria
data) with real file bytes.Thanks!