# Connecting Webhooks to accelo API for attachments

**URL:** <https://community.gravityforms.com/t/connecting-webhooks-to-accelo-api-for-attachments/8379>\
**Category:** Get Help\
**Tags:** webhooks, gform\_webhooks\_request\_data, base64\_encode, accelo\
**Created:** [March 19, 2021, 3:13pm UTC](https://community.gravityforms.com/t/connecting-webhooks-to-accelo-api-for-attachments/8379 "2021-03-19T15:13:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [March 21, 2021, 4:45am UTC](https://community.gravityforms.com/t/connecting-webhooks-to-accelo-api-for-attachments/8379/2 "2021-03-21T04:45:19Z")

</div>

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

> **[gform\_webhooks\_request\_data - Gravity Forms Documentation](https://docs.gravityforms.com/gform_webhooks_request_data/)**
>
> This Gravity Forms plug-in filter allows the webhook HTTP request data to be modified, for either all forms, or a specific form.

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 ) );`

---

_[View the full topic](https://community.gravityforms.com/t/connecting-webhooks-to-accelo-api-for-attachments/8379)._
