Question

Upload a File Attachment using Webhooks - Object reference not set to an instance of an object

  • 8 October 2021
  • 3 replies
  • 366 views

Hi there!
 

We are trying to upload an attachment from the email parser using Erecruit API and Webhooks as the step action.

We tested the API first in Postman and we have successfully sent the file in Erecruit.

(L) results in Erecuit.  (R)configuration and results from API call in Postman

 

But when we try the API in Zapier, we got an "Object reference not set to an instance of an object." error.

error message

 

Below is the step configuration I had created in Zapier.

fields configuration


 

This post has been edited by a moderator to remove sensitive information. Please remember to obfuscate any personally identifiable information prior to posting as this is a public forum. 

I was thinking of using Platform UI but as I was reading this blog post and I noticed that one of the limitations of using a Platform UI is that we can't use it for APIs that have uploading files operation.

I hope someone could help us on this. Any help will be appreciated.

 

Thanks,

Camille


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

3 replies

Userlevel 7
Badge +11

Hey @marketing nelsonjobs, welcome to the Community!

It looks like the webhook is expected to be sent in json format but the Payload Type field has been set to form instead: 

f296ab9877295ff95a8c29c7f4658402.png

I’m not sure if that is the exact cause of the “Object reference not set to an instance of an object” error but it may be worth changing the Payload Type to json instead to see if that does the trick. Hope that helps! :)

Hi @SamB , thank you for checking on this.

I tried changing the payload type to json but the issue still persist.

I also tried keeping the form payload type and removed the Accept header but I still got the same issue.

================================================================================== 

 

Userlevel 7
Badge +11

Sorry to hear that didn’t do the trick, @marketing nelsonjobs :(

I’m a bit limited on what I’m able to see from this end as I don’t have access to the logs for your Zap (our Support team may be able to get a bit more information on the exact cause of the error) but looking at the screenshot of the successful Postman request, it looks like the casing used on referenceID and attachmentTypeID in the Zap is different:

689180fff2f213410947fd1df6eede3f.png

94756ec54b5165663b8570a524f76409.png
Can you try changing the referenceID and attachmentTypeID casing to match what was used in Postman? I’m thinking that it could be that they’re case-sensitive and that’s what’s causing the error.