List Fields

Definition:

The "List Fields" action provides a powerful way to extract information about the fillable fields within a PDF document. This action can be used to automate tasks like:

Data Extraction: Retrieve the names, types, values and descriptions of fillable fields from PDFs (e.g., text fields, checkboxes, radio buttons).

Form Analysis: Understand the structure and content of PDF forms.

Dynamic Workflow Creation: Use the field information to create dynamic workflows that process PDF form data.


Example Use Cases:

  1. Pre-filling Forms: Use the "List Fields" action to identify the fields in a PDF form. Then, use other Zenphi actions to populate those fields with data from other sources (e.g., a Google Sheet, a database) before sending the PDF to users.
  2. Data Validation: Extract the field types from a PDF form and use that information to validate user input before submitting the form.
  3. Form Processing: Create a flow that automatically extracts data from submitted PDF forms and stores it in a spreadsheet or database.

Inputs:

The "List Fields" action requires the following input:

  1. File Payload: Specify the PDF document you want to analyze.

Step-by-Step Guide:

Step 1: Add the "List Fields" Action

To get started, you'll need to add the List Fields action to your flow. In the Zenphi toolbox, navigate to the PDF category and drag the List Fields action into your flow. f you're new to adding actions in Zenphi, refer to the complete guide here.

Step 2: Provide the File Payload

Provide the fillable PDF document as input for the List Fields action. You can source the file from triggers such as Gmail (attachments) or forms with file uploads. Alternatively, use specific actions to retrieve the file from third-party platforms like Google Drive or Dropbox.


Outputs

The action outputs a list of field objects, where each object represents a fillable field in the PDF. Each field object contains properties such as:

  1. Field Name: The name of the field.
  2. Field Type: The type of the field (e.g., "text", "number", "checkbox").
  3. Field Value: Value of the field, if any.
  4. Field Description: A description of the field.

Best Practices:

  1. Test with a Sample PDF: Always test the action with a sample document to confirm the field names and structure.
  2. Use Descriptive Field Names: Ensure your fillable PDF uses clear, descriptive field names to simplify data mapping.
  3. Combine Actions: Pair the "List Fields" action with the "Fill PDF Form" action for streamlined automation workflows.

Example: