Hi,
I have a workflow where images are being passed through to an API post as in-line images in Microsoft Teams. Microsoft Teams has a maximum payload of 4194304 bytes for this end point.
I may be inputting ~15mb of data and resizing the images via a module but I could still have a payload of many images that’s too large.
I’m seeking to route differently if the size is >3500000 bytes. If the output of previous module is >3500000 bytes provide a link to the files instead of posting them inline.
I know that I have the {{var.scenario.dataConsumed}} item but that’s the entire scenario’s data which isn’t useful at all in my scenario. I’m preparing the payload as a variable in a previous module so I know the exact amount to be sent.
Ideas?
Hello @Mitchell_Knight,
If possible, please post some examples of what your scenario looks like, the outputs that contain the images, etc…
Output will usually have a length, size, or fileSize key.
Once the outputs are aggregated, you can use map() and sum() functions to sum all the sizes/lengths.
See attached.
The UI in Make has the bytes but I don’t understand how to capture that.
I ended up seeking Support on this. Their suggested solution was to nest a scenario (scenario within a scenario) and capture that data this way: capture the nested scenario’s {{var.scenario.dataConsumed}} and then pass that up to its parent scenario as a variable. Alternatively, it was suggested to introduce a module of a file storage service like GoogleDrive with API that will return the bytes of the payload.
Really frustrating that there’s not a user available variable or query for capturing this per module within Make. Both of these solutions introduce unnecessary complexity. This variable obviously exists in Make if the UI shows you this data in a history view so why not permit one query and capture it?