Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
The node provides a versatile set of no-code utilities grouped under various resources, including PDF operations. Specifically, the "Docx to PDF" operation under the PDF resource converts DOCX file content (provided as a buffer) into a PDF format. This is useful when automating document workflows where Word documents need to be converted into PDFs for sharing, archiving, or further processing.
Common scenarios include:
- Automatically converting generated DOCX reports or contracts into PDFs.
- Integrating document conversion in approval workflows.
- Preparing DOCX files for consistent viewing across platforms by converting them to PDF.
Example: You have a DOCX file stored as a binary buffer from a previous node, and you want to convert it to a PDF file with a specific filename and optionally get the result as a URL.
Properties
| Name | Meaning |
|---|---|
| Code Variables | A collection of code variables defined in the code editor that can be passed as key-value pairs. |
| Buffer | The input DOCX file content provided as a string buffer to be converted to PDF. |
| Get File as URL | Boolean flag indicating whether the output PDF should be returned as a downloadable URL or raw data. |
| Filename | The desired filename for the resulting PDF file. |
Output
The node outputs an array of JSON objects representing the results of the conversion. For the "Docx to PDF" operation, the output JSON typically contains the PDF data either as a binary buffer or as a URL depending on the "Get File as URL" property.
- If
getAsUrlis false, the PDF content is returned as a binary buffer within the JSON output. - If
getAsUrlis true, the output includes a URL pointing to the location where the PDF can be accessed or downloaded.
The exact structure of the output JSON depends on the underlying API response but generally includes fields such as the PDF file content or its URL and metadata like the filename.
Dependencies
- Requires an API key credential for authentication with the external service providing the conversion functionality.
- The node relies on an external API endpoint corresponding to the PDF resource and the "docx-to-pdf" operation.
- No additional environment variables are explicitly required beyond the API key credential configuration.
Troubleshooting
- Invalid or missing buffer: Ensure the DOCX file content is correctly passed as a buffer string; otherwise, the conversion will fail.
- Authentication errors: Verify that the API key credential is correctly configured and has permissions for PDF operations.
- Incorrect property values: Double-check that the "Get File as URL" is set according to your expected output format.
- API errors: Network issues or API limits may cause failures; check connectivity and quota.
- Filename issues: Providing invalid characters in the filename might cause errors; use standard filename conventions.
If the node throws errors related to missing parameters or invalid inputs, review the properties and ensure all required fields are properly set.
Links and References
- n8n Expressions Documentation
- General PDF conversion concepts: https://en.wikipedia.org/wiki/PDF
- DOCX file format: https://en.wikipedia.org/wiki/Office_Open_XML