Docx Generator
AI-generatedSummary
Generate a DOCX file by executing custom JavaScript code that creates and returns a docx Document object, outputting the binary DOCX file with a specified filename.
Inputs
- JavaScript Code (required) — JavaScript code that creates and returns a valid docx Document object using the docx library API.
- Filename (required) — The name of the output DOCX file (filename only, sanitized, default 'document.docx').
Output shape
a single item containing JSON metadata including the final filename, file size in bytes and megabytes, and a success flag; plus the binary data of the generated DOCX file under 'binary.data'.
Executes the provided JavaScript code safely with a 60-second timeout and input context. The JS code must return a valid Document object from the 'docx' library or the operation errors. Generated files larger than 250MB are rejected. On failure, returns error messages unless 'Continue On Fail' is enabled.