Best answer

Connect a custom API to Zapier

  • 11 June 2023
  • 7 replies
  • 461 views

Hi Folks,

 

Could please help me with this case?:

 

1) I would like to get a color database from this site:

$.ajax({  url: "//stage-api.benjaminmoore.com/api/{YOURAPIKEY}/color/GetPaletteByCode",  data: "code=AFF&colorData=true&countryCode=en-us",  dataType: "jsonp",  jsonpCallback: "CallbackFunction",  error: function (xhr) {    // your error code here  }});

 

2) Get the object and send it to Webflow CMS

 

Is it possible to do this with Zapier? In that case what would be the steps? The second part seems to be easier, but I don’t know how to connect the link above to Zapier, because it’s not the usual auth. 

I wonder if you could help with the first step: connect the database to Zapier above🥹

 

Many thanks in advance,

 

Peter

icon

Best answer by Troy Tessalone 12 June 2023, 17:03

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.

7 replies

Userlevel 7
Badge +14

Hi @retvaripeter 

Good question.

Try using the Webhook app to make the API request: https://zapier.com/apps/webhook/help

Hello @Troy Tessalone ,

 

You’re such a rock star :) Thanks for all the information! 😍☺️ Actually I’ve successfully finished with the first part (Postman helped me as well to get a working URL) -which I think its harder.

However I’m having trouble with the built in webflow integration feature. I hope you can point me to the right direction:

 

1) I made a GET request after the trigger successfully (get the colors I wanted)

 

 

2) I’ve made a collection in Webflow called Color with the same fields as the response above.

 

My goal is to fill up the collection with the API response (colors) above

 

3) In Zapier I attached some required field to the collection:

 

 

4) However it seems like I can create only 1 item in CMS with this step, but I would like to create all the color elements in the CMS collection “color” in Webflow

 

5) That is why I’m getting this error msg: 

 

Do you know how to create/add more than 1 CMS item to Webflow? Because inside the response object it has 3500 colors. In that case I need to create 3500 items inside the collection. Not one.

 

Many many thanks in advance,

 

Cheers,

 

Peter Retvari

Userlevel 7
Badge +14

@retvaripeter 

You can use the Looping app to iterate thru each array line item that is returned from the API.

Wow, cool. Thank you. And with the Looping App I can add a step to create an item in Webflow color collection, right?

Userlevel 7
Badge +14

@retvaripeter

From the help article: https://zapier.com/apps/looping/help

 

Thanks again! I’m going to test it and get back to the topic to help other with the same question. Cheers

Dear Troy,

Just tested it and when I test the loop inside edit mode it’s working (of course runs only 1 iteration - what we can see in the help section of the Looping app) - you can see that the line item with Webflow is inside the loop.

 

 

, however after I published and set a button to it with a Zap webook (which is the trigger) I got this error:

 

 

I also set the limit to 500 iterations. Do not know why it happened exactly.