Skip to main content

Issue with Webhooks by Zapier Post action when file object is included

  • June 17, 2024
  • 1 reply
  • 22 views

Hi!

I've encountered an issue when using Webhook (POST). When I include a file object and Data in the POST request, the data Data options get formatted as a single string, like this:
Array ( [data] => client_id=3&order_number=12345 )

However, when I don't include a file object, the data field options are sent separately, which is the desired format:
Array ( [client_id] => 3 [order_number] => 12345 )

I want my data fields get passed in this way even after including a File object

Is there a way to send the data field options separately even when I POST a file object together?

FYI,
My API is developed using PHP and used print_r($_POST); to check how the data fields get passed to my API

Did this topic help you find an answer to your question?

1 reply

  • New
  • 3 replies
  • July 29, 2024

The behavior you're describing typically occurs because the Webhook app is treating the request as a multipart/form-data submission when a file object is included. This causes the data to be sent as a single string in the data parameter.