Convert File

🧾 Definition

The “Convert File” action allows you to convert a file stored in OneDrive into a different format, such as PDF, JPG, HTML, or GLB, directly within your Zenphi flow. This action is ideal for automating file conversions without needing third-party tools or manual intervention.

It supports a wide range of source-to-target format combinations, including conversions from documents (like Word, Excel, PowerPoint) to PDF, or from 3D model files and images to JPG. Additionally, for JPG conversions, it provides control over the final image's width and height, giving you full flexibility over output dimensions.

This action is particularly useful when you need to:

  • Standardize file formats for downstream processing or archiving.
  • Prepare files for sharing in a web-friendly or universally viewable format.
  • Convert uploaded form files or dynamically selected items from OneDrive with ease.

Key capabilities include:

  • Wide format compatibility.
  • Direct OneDrive file access via ID or path.
  • Optional dimension controls for image outputs.
  • Output ready for use in subsequent file-saving or emailing actions.

📌 Example Use Cases

  1. Convert Form Submissions to PDFAutomatically convert documents uploaded through a Zenphi Form (e.g., Word or Excel) into PDF format for consistent archiving, approvals, or email delivery.

  1. Generate Web-Optimized Images from FilesConvert uploaded PowerPoint slides, 3D models, or design assets into JPG format with specific dimensions, making them ready for web or internal portal display.

  1. Standardize Uploaded Files for WorkflowEnsure all incoming files (e.g., DOCX, EML, HTML) are converted to a standardized PDF format before being reviewed, approved, or stored.

  1. Automated File Format MigrationUse in file migration or backup flows to convert legacy formats (like .msg or .rtf) into modern, shareable alternatives like PDF or HTML.

  1. Visual Documentation from Source FilesConvert scripts, markdowns, or notes (e.g., .md or .py) into HTML or PDF format to enable viewing without needing the original software.


🔽 Inputs

  1. File ID This is the OneDrive file you want to convert. You have multiple ways to provide this value:

    • OneDrive File Picker: Click the OneDrive icon in the field to open a file selector and choose the desired file directly from your OneDrive.

    • Dynamic Token or Hardcoded Path/ID: Use a file reference from a previous step (e.g., an uploaded form file), or hardcode a file path or ID.

      • If using a Path (e.g., /drive/root:/Documents/sample.docx), make sure "Select by Path" is enabled.
      • If using a File ID (e.g., 1EED600A8F0FD9A1!s75181466e59d4bacb1ec55930b932ed1), make sure "Select by Path" is disabled.

  1. Convert Format Specify the target file format to convert the selected file into. Available options include:

    • GLB (for 3D models): cool, fbx, obj, ply, stl, 3mf
    • HTML: eml, md, msg
    • JPG: Supports a wide variety of source types including 3D models, images, docs, scripts, and media files.
    • PDF: Accepts a broad range of formats such as docx, ppt, eml, md, xlsx, etc.📝 Note: CheckMicrosoft’s official list of supported formats for full details.

  1. File Name The name you want the converted file to have.This will be the filename used when the converted file is created (e.g., Contract_Signed.pdf or SlidePreview.jpg). You don’t need to include the extension—it will be added automatically based on the selected format.

  1. Image Width (Required only if converting to JPG) If you’re converting a file to JPG, enter the desired width of the output image in pixels (px).This allows you to control the dimensions and ensure the image fits your target display size.

  1. Image Height (Required only if converting to JPG) Similar to Image Width, this defines the height of the output JPG in pixels.Both width and height must be specified to avoid errors during JPG conversion. These values help ensure visual consistency across automation workflows involving images.


📤 Outputs

When the Convert File action successfully processes the file, it returns detailed information about the newly converted file. Each output field helps you retrieve, use, or further process the converted file in your automation flow.


  1. File Name The name of the newly converted file, including its extension (e.g., report.pdf, image.jpg). This helps you easily identify or use the file in subsequent steps, such as saving it to a specific location or attaching it to an email.

  1. Payload A URN (Uniform Resource Name) that represents the converted file content. This is particularly useful when you want to reference the file directly in actions like Save File, Send Email with Attachment, or Upload to Drive without having to re-download or locate the file again.

  1. Size Indicates the total size of the converted file in bytes. This can be useful if you want to validate file size before uploading or sending, especially when working with file size limits in external systems (e.g., email or form submissions).

  1. MIME Type Specifies the format of the file’s content using its MIME type (e.g., application/pdf, image/jpeg). This provides an additional layer of validation and can be used in conditional logic to route different file types to specific destinations or processes.


📌 Example

Scenario: Automatically convert uploaded Word documents to PDF format for standardized archiving.

🔹 Use Case

You have a Zenphi form that collects employee reports as .docx files. You want to ensure all reports are saved in PDF format in a shared OneDrive folder for consistency and easy review.

🔹 How to Set It Up in Your Flow

  1. Form Submission Trigger: The flow starts when a user submits a Zenphi form with a file upload field for their report.

  2. Get File ID: Use the file variable from the form to extract its OneDrive File Id or path.

  3. Convert File:

    • Add the Convert File action.
    • In the File Id field, insert the file variable using the token picker.
    • Set Convert Format to PDF.
    • Provide a name for the new file (e.g., EmployeeReport_{{FormSubmission.Id}}.pdf).
  4. Save File (Optional): Use the Save File or Create File in OneDrive action to store the converted PDF in a specific folder.

🔹 Result

The user-uploaded Word document is automatically converted to a PDF, renamed appropriately, and stored in your OneDrive—without any manual intervention.