PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

This node operation converts JSON data into an Excel spreadsheet file. It supports multiple input formats for the JSON data, including raw JSON strings, binary files containing JSON, and base64-encoded JSON strings. The output is a downloadable Excel file (.xlsx) with customizable worksheet and document names.

This node is useful when you want to transform structured JSON data into a tabular Excel format for reporting, sharing, or further analysis in spreadsheet software. For example, converting API response data or database query results into Excel sheets automatically within an n8n workflow.

Properties

Name Meaning
Input Data Type Choose how to provide the JSON data to convert. Options: "JSON String" (direct JSON content), "Binary Data" (JSON file from previous node), "Base64 String" (base64 encoded JSON content).
JSON Content The JSON data to convert to Excel, provided as a JSON string. Used only if Input Data Type is "JSON String".
Input Binary Field Name of the binary property that contains the JSON file. Used only if Input Data Type is "Binary Data".
Base64 JSON Content Base64 encoded JSON content. Used only if Input Data Type is "Base64 String".
Output File Name Name for the output Excel file, e.g., "converted_data.xlsx".
Document Name Name of the output document for reference purposes.
Worksheet Name Name of the Excel worksheet inside the file, e.g., "Sheet1".
Advanced Options Collection of optional advanced settings:
- Convert Numbers and Dates Boolean flag to automatically convert numbers and dates in the JSON data.
- Custom Profiles JSON string to specify custom profiles for API calls to adjust extra options (refer to external API documentation).
- Date Format Pattern string defining date format for Excel cells, e.g., "MM/dd/yyyy".
- First Column Starting column number (1-based) in the Excel sheet where data will be placed.
- First Row Starting row number (1-based) in the Excel sheet where data will be placed.
- Ignore Null Values Boolean flag to ignore null values in the JSON data during conversion.
- Number Format Number format code for Excel cells. Options include General, Number with decimals, Currency, Percentage, Scientific, Date/Time formats, etc.
- Title Bold Boolean flag to make the title row bold.
- Title Wrap Text Boolean flag to wrap text in title cells.
Binary Data Output Name Custom name for the binary data output in n8n, e.g., "data".

Output

The node outputs a single item containing:

  • A json field with metadata about the conversion (not detailed here).
  • A binary field containing the generated Excel file data under the specified binary data output name (default "data"). This binary data represents the .xlsx file ready for download or further processing.

Dependencies

  • Requires an API key credential for the PDF4me service or similar backend service that performs the JSON to Excel conversion.
  • The node relies on external API calls to perform the actual conversion; thus, internet connectivity and valid authentication are necessary.
  • No additional environment variables are explicitly required beyond the API credentials.

Troubleshooting

  • Invalid JSON Input: If the JSON content is malformed or invalid, the node may throw errors. Ensure the JSON string or file is correctly formatted.
  • Incorrect Binary Property Name: When using binary input, specifying the wrong binary property name will cause the node to fail to find the JSON file.
  • API Authentication Errors: Missing or invalid API keys will result in authentication failures.
  • Unsupported Number or Date Formats: Using unsupported or incorrect format codes in advanced options may cause formatting issues in the Excel output.
  • Large JSON Data: Very large JSON inputs might lead to timeouts or memory issues depending on the backend service limits.

To resolve these:

  • Validate JSON before input.
  • Double-check binary property names.
  • Verify API credentials.
  • Use supported format codes.
  • Split large datasets if needed.

Links and References

Discussion