Find Zenphi File

🧾 Definition


The "Find Zenphi File" action is used to retrieve metadata and content for a file stored within a Zenphi flow. This includes essential details such as file name, size, MIME type, and the actual file contents.

It’s especially useful when you're working with files whose details are not readily available or origin is unknown—for example, when a file is:

  • Attached through a Zenphi form, and you need to access its metadata elsewhere in the flow.
  • Stored in a file-type variable, and you want to retrieve its descriptive data without manually tracing where it was set.

By using this action, you can easily inspect or pass file details to other parts of your automation—without needing to know where the file came from or how it was added to the flow.

Key Capabilities:

  • Extract file metadata from Zenphi-managed files (name, size, type).
  • Access actual file contents for processing or transfer.
  • Handle dynamically passed files without tracing their origin.
  • Works seamlessly with form file uploads or internally generated file variables.


Example Use Cases


1. Accessing File Details from a Zenphi Form Submission

When a user uploads a file via a Zenphi Form, this action can extract the file name, size, and type to store in a log, email, or use in conditional logic later in the flow.

Example: A customer submits an invoice via a form. Use this action to get the invoice’s name and size before saving it to Google Drive with proper metadata.


2. Working with a File Variable from a Previous Step

Sometimes, a file is generated or passed from another action as a file-type variable. If you need to check its metadata but don’t want to trace where it originated, this action is ideal.

Example: A PDF is generated mid-flow, and you want to email it to someone. Use this action to verify its size and name before sending.


3. Validating a File Before Processing

Before performing actions like uploading, converting, or emailing a file, use this action to validate that the file exists, has the correct format (e.g., PDF, JPG), or is below a certain size.

Example: Only process resume files if the uploaded document is under 5MB and in PDF format.



Inputs


File

(Please provide the Zenphi file that you would like to get information about.)

This is the only required input for the action.

  • It expects a File, which can originate from:

    • A Zenphi Form file upload (e.g., when someone submits a form with an attached document or image),
    • A file generated or manipulated inside your Zenphi flow, such as a PDF or image created using actions like “Generate Document” or “Convert Image”,
    • Or a File-type variable previously retrieved or passed from a 'Set Variable' actions.

🧠 Example:

Let’s say your form has a field called “Resume Upload”. After submission, that file will be available as a variable (e.g., {{FormSubmission.ResumeUpload}}). You would use that variable as the input here to get the file’s name, MIME type, size, etc.



📤 Outputs


✅ Found

(If file information is available, the value will be set to true.) This output is a Boolean (true or false) that tells you whether the file metadata was successfully retrieved.

  • true: The action found the file and extracted its details.
  • false: The file input was either empty, invalid, or not accessible in the current context (e.g., improperly passed variable).

🧠 Tip: Use this field to apply conditions in your flow. For example, if Found is false, you might send a notification or log an error.


📦 File

This is a structured output (collection/object) containing metadata about the file. It includes the following nested properties:

📌 File Name

(The name of the file.) Returns the exact name of the file, including its original name if uploaded through a form.E.g., employee-contract.pdf

📏 File Size

(The size of the file.) Indicates the file size in bytes. This helps assess storage usage or validate size limits.E.g., 102400 (which equals 100 KB)

🧾 Content Type

(In a metadata file, this typically refers to the MIME type (Multipurpose Internet Mail Extensions) of the associated content or file. Examples include text/plain and image/jpeg.) Returns the MIME type of the file, which helps identify the file format.Examples:

  • application/pdf
  • image/png
  • text/plain

🧠 Use case tip: If you only want to process specific file types (e.g., images), check the Content Type value before proceeding.

📄 File Contents

(The file contents in a metadata file refers to the actual data or content associated with the metadata.) This output contains the actual file data, enabling you to:

  • Pass the file to other Zenphi actions,
  • Upload it elsewhere (e.g., Google Drive, SharePoint),
  • Or attach it to an email.

🧠 This is the same type of output as a typical Zenphi File variable.



✅ Example

📂 Retrieve Details of a File Uploaded via Zenphi Form

Imagine you’ve created a Zenphi form where users submit onboarding documents, such as a scanned passport or contract. These files are stored as part of the form response, but you need to process or validate them further — for example, to check file type, size, or to attach them to an approval email.

Instead of manually extracting that information, you use the "Find Zenphi File" action.

🛠️ Setup:

  1. The form submits a File field (e.g., “Uploaded Passport”).
  2. In your flow, pass that file using token picker directly into the File input of the "Find Zenphi File" action.
  3. The action retrieves the file metadata — including name, size, and MIME type.
  4. You then use this metadata in conditions (e.g., check file size isn’t over 2MB or content type is image/jpeg) or attach the file to a following email step.

🧠 This is especially useful when you don’t know where the file was originally created or if the variable lacks details by default.