Skip to main content

I’m trying to pull an image from ServiceTitan to upload to Google Drive or SharePoint and am running into issues with converting the binary image data I receive in the image request API step. 

This is the data I receive:

My understanding is this is binary data, the response is a raw request.

 

I then run this through a Code by Zapier step to convert it into Base64 format:
 

 

I’ve also tried reading the binary data as utf-8 and latin1. 

I’m then given a data payload that looks like this:

 

I then take that “File Data” and try uploading to Google Drive:
 

(I’ve tried this with jpg extensions as well).

But when the image arrives in Google Drive, it is a blank image (it does have data though):
 

 

I also can’t email this data, it shows up as a txt file. 

Am I missing a step in here to properly upload the image data into Google Drive? Should the conversion function in Code by Zapier be handled externally? Looking for any answers or direction on this, I’ve tried a wide variety of python and javascript code to achieve this and still nothing.

Thank you all in advance. 

Hi ​@jordan_apexmw,

 

Welcome to the Community.

To troubleshoot issues converting and uploading image data from ServiceTitan to Google Drive via Zapier, first confirm the API is returning actual binary data. When using Code by Zapier, ensure proper Base64 conversion with accurate input. Match MIME types and file extensions during upload, and test with smaller images to narrow down the issue. If Zapier struggles to handle the conversion, consider external tools or webhooks for processing. Also, check Zap history for errors and refer to API documentation for guidance.

Feel free to reach out if you have any questions or need further assistance.


Hey ​@jordan_apexmw, just checking in—did Jammer’s reply help to point you in the right direction? 

Let us know if you still need any help! 🙂


I was able to get the right data when I requested the data without a raw response. Then I received a zapier-hydrated data file that I could upload into my desination of choice. So the lesson of the story is to not use raw API responses when moving images out of ServiceTitan. 😅

Thank you for the support, all!


That’s great news, ​@jordan_apexmw! Thanks so much for sharing what fixed it. I’m so glad you were able to get it sorted by disabling the Return Raw Response option—great work! 🙌 

Seems like you’re all set for now but if there’s anything else we can help with do let us know. In the meantime, happy Zapping! ⚡