Return Types

We have different return types, depending on whether it returns a PDF, PNG, or text. It is especially important to select the correct type when returning binary data to Make.com.

Make.com Custom JavaScript Return Types
Make.com Custom JavaScript Return Types

Return TypeHow Make interprets itExample
Text (default)Returns as simple text under { "output": "..." }js return "Hello World"; → { "output": "Hello World" }
ObjectReturns key-value pairs as fields Make can mapjs return { first: "John", last: "Doe" }; → { "first": "John", "last": "Doe" }
ArrayReturns as a collection Make can iterate or mapjs return [1, 2, 3]; → [1,2,3]
BinaryReturns as a file (PDF, image, etc.)js return { data: "base64string", mime: "application/pdf", filename: "file.pdf" };