Question

Form-data issues in Zapier?

  • 22 May 2023
  • 0 replies
  • 156 views

Userlevel 1

Is it possible to integrate Zapier with an api that expects a jpeg upload in form-data?

We are attempting to create a zap that sends a jpeg to our api and gets a response. For example, we would like to allow people to upload a photo to Google Drive or a similar product and use this to trigger a photo upload to our api. We have tried doing this in javascript using the cli and also using your builder online, but we're running into errors on both. We know this api is working correctly because we have gotten the correct result doing this from our mobile app, our website, and using curl. The api expects a jpeg in multipart/formdata.

Here is what we've tried so far and the roadblocks: 1. Using code mode in the online action builder create a formdata using an image uri as the input data. If we don't define formdata we get 'formdata is undefined'. If we try defining formdata we get a warning saying 'redefinition of formdata' and the api response just comes back undefined. Using this exact same code in other applications outside of zapier we have gotten the correct response. 2. using javascript and the zapier cli we are also getting undefined as the response. 

We have also attempted using webhooks instead, but there seems to be an issue with that and using an api key.

Do you have a working example of something like this? I couldn't find anything like this in your documentation. Is there something unique about Zapier and formdata that we're missing? Thanks


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.