Skip to main content

Convert Base64 To File


🎯 Purpose​

The ConvertBase64ToFile node transforms Base64-encoded strings into actual files (e.g., images, PDFs, documents).

This is especially useful when working with APIs, databases, or uploads that return file data as Base64 text. The node supports saving files, organizing them into structured folders, and passing file references downstream in your workflow.

βš™οΈ Parameters​

Data Source​

NameTypeRequiredDefaultDescription
Base64 Value ExpressionText (dynamic)RequiredEmptyPath to the field containing the Base64 string.
File Extension Property PathText (dynamic)RequiredEmptyPath to the field containing file extension (e.g., pdf, jpg, png).

Processing​

NameTypeRequiredDefaultDescription
Save FileToggle (On/Off)OptionalOffSave converted files to storage (On) or just pass data forward (Off).
Folder PathText (dynamic)Optional"base64_decoder"Folder path where files are stored (only applies if saveFile is enabled).

Output​

NameTypeRequiredDefaultDescription
OptionDropdownOptionalOriginal with appended result columnDefines output format: - Original with appended result column: Keep all input data and add file column. - Return result column only: Only return file data.
Result Property NameTextOptional"file_result"Column name containing the converted file reference.

πŸ’‘ Example Usage​

πŸ“ Document Processing​

  • Configuration:
    • Base64 Value Expression: API response field
    • File Extension Property Path: "pdf"
    • saveFile: On β†’ folderPath: client_documents/incoming
    • outTransformId: Original with appended result column
    • outColumnName: "processed_document"
  • Outcome: Base64 strings are converted into PDFs, saved in structured folders, and tracked with metadata.

πŸ“˜ Best Practices​

  • File Organization: Use structured folder paths (/client/{{id}}/files).
  • Data Validation: Confirm Base64 string validity before processing.
  • Performance: Test large files with sample runs before batch conversion.
  • Security: Apply access controls, retention policies, and encryption if needed.
  • Error Handling: Watch for incorrect File Extension Property Path valuesβ€”wrong extensions may make files unopenable.

πŸ§ͺ Test Cases​

  • Given: Base64 string of a PDF, with File Extension Property Path = "pdf" β†’ Expected: Valid PDF file created.

🏭 Industry Applications​

IndustryChallengeHow Node HelpsOutcome
HealthcareMedical imaging systems export scans as Base64 dataConverts scans into standard formats, stores securely with patient IDsReduces processing time by 70%, ensures compliant record storage
Financial ServicesMobile apps send signatures & documents as Base64Converts into proper file formats, saves in secure folder structuresImproves processing efficiency by 60%, maintains compliance
Marketing AgenciesClient assets arrive as Base64 strings from varied sourcesConverts to usable working files, organizes by campaign/clientCuts asset prep time by 50%, improves creative workflow productivity