Best answer

Error handling Mechanism and Calling of REST Service

  • 8 May 2023
  • 8 replies
  • 226 views

Userlevel 1

Hello Team, 

I have recently started exploring Zapier and wanted to know the answers for these following questions:

  1. How do we generate specific errors such as Bad request, Unauthorized (400 and 401 for example )and is there any specific error handling mechanism we can use to handle that error.
  2. How do we connect to a 3rd party URL for instance if I have a URL that is from SAP and want to fetch it into Zapier(https::datafromsap.com) , which component can I utilize to perform the mentioned action.

Please do guide me on the same , thanks in advance, looking forward to the replies

 

Warm Regards 

Siddharth 

 

icon

Best answer by SamB 1 June 2023, 21:15

View original

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

8 replies

Userlevel 1

Hello @Troy Tessalone , thanks for your answer, I have explored on Web URLs there. I will go through the concept of code and let you know if I need any assist there.

 

@SamB  Thank you so much for your detailed explanation, I am configuring a third-party URL and not a web parser and I think webhooks for the Use case, but the setup in my case cannot be done in the Zapier System so I will work on with the Basic Auth. It pointed me on to what I need, thanks much, I appreciate it.

Userlevel 1

Hi Team,

@Troy Tessalone  and  @SamB  I have seen quite some replies from you’ll could you please able to assist me on my question?

 

Thanks a lot, in Advance!

Userlevel 7
Badge +14

Hi @Siddharth Basker 

Good question.

Zap app options for using app APIs in Zap steps:

  1. Webhook
  2. Code
Userlevel 7
Badge +11

Thanks for letting us know, @Siddharth Basker. I’m so pleased that information was helpful! 🤗

If you run into any issues in setting that up let us know, we’re always happy to help!

Hello @SamB  and @Troy Tessalone , any suggestions on this , 

I have got the solution through an alternate solution using Array of Objects and I have written a JS Script to get a format I need to Insert into a database and was successful to do it.

 

I need a help for the following 

I have a response from a URL that comes as a parsed JSON and I would like it to be array of objects so I have used a process with converting lineitem to text but the issue is I have mentioned the keys statically.

Is there a possibillity with Zapier where I could reachout to some expert for helping me on this.

Userlevel 7
Badge +14

@SiddharthB

If you are looking for help, consider hiring a Certified Zapier Expert: https://zapier.com/experts/automation-ace

Userlevel 7
Badge +11

Hi @Siddharth Basker! 👋 

With connecting to a 3rd party URL are you looking to obtain information/text from a specific webpage? Or are you wanting to make a request to the SAP API to get information from it? 

If you’re looking to extract information/text from a web page you could potentially use the Web Parser by Zapier app to do that. See our Use Web Parser to extract data from web pages guide for more details.

If you’re looking to make requests to SAP’s API you can potentially use a GET (Webhooks by Zapier) action to make a request to the relevant endpoint. You can find out more about how to do that in our Send webhooks in Zaps guide.

The Webhooks app only supports Basic Auth, so if the SAP’s API requires the use of a different authentication method you may need to build an integration with the SAP API on the Zapier Platform instead. It’s a bit more work to setup but it’ll allow you to connect using more advanced authentication methods and gives the ability to customise your error messages: Error Handling. If that’s something you’re interested in exploring I’d recommend checking out the full documentation here: https://platform.zapier.com.

Hope that helps to get you pointed in the right direction. Please do keep us updated on how you get on here! 

Hello @SamB , I had another Scenario where I have converted a JSON into CSV format and I wanted to know if there was any component to download that data into my local system. Please let me know. Attaching a screenshot of my content for your reference.

 

This is the CSV data which I would like to fetch

Please note that I have tried the storage option but it says the max limit is higher for storage.

 

Let me know what you think!