Description

The wpforms_zapier_process_entry_data filter lets you modify the data sent to Zapier after a form is submitted. Use it to adjust field outputs for zaps, include raw option values, or reshape files for multi-file uploads.

Common use cases include sending value_raw for choice fields to Excel or Google Sheets, or converting File Upload values into arrays so Zapier can handle multiple files.

parametertypedescription
$dataarrayKey value pairs prepared for Zapier. Keys follow the field{ID} pattern.
$entry_idintThe entry ID for the current submission.
$form_dataarrayForm ID.

Source

wpforms-zapier\src\Plugin.php

Example

// Send multiple uploaded files to Zapier as an array.
function wpf_dev_zapier_files_as_array( $data, $entry_id, $form_data ) {
    foreach ( wpforms_get_form_fields( $form_data ) as $field_id => $field ) {
        if ( $field['type'] === 'file-upload' && ! empty( $data[ 'field' . $field_id ] ) ) {
            $data[ 'field' . $field_id ] = explode( "\n", stripslashes( $data[ 'field' . $field_id ] ) );
        }
    }
    return $data;
}
add_filter( 'wpforms_zapier_process_entry_data', 'wpf_dev_zapier_files_as_array', 10, 3 );

Reference Article