Connecting Webhooks to accelo API for attachments

Hello. To send files via the Webhooks Add-On, you can use the gform_webhooks_request_data filter in the theme functions.php file or a custom functionality plugin to modify the data before the request is sent. The file needs to be base64_encoded

You can use a line like this with the above filter to get the file contents, encode it, and add it to the request.

$request_data['filedata'] = base64_encode( file_get_contents( $file_path ) );

If the file is uploaded via a file upload field you can use the following line to get the file path, replacing 1 with the ID of the field:

$file_path = GFFormsModel::get_physical_file_path( rgar( $entry, 1 ) );