Question

How to call an URL with a parameter and parse the answer

  • 7 January 2022
  • 4 replies
  • 37 views

Hi.

I need to get some datas from ConvertKit API I can’t get with standard features.

I call an URL :

https://api.convertkit.com/v3/broadcasts/{email_ID}/stats?api_secret=[api_secret]

I will define the email ID though a form and api_secret will be set in the zap.

Then ConvertKit gives me an answer like this :

{"broadcast":{"id":7852059,"stats":{"recipients":7578,"open_rate":39.469517022961206,"click_rate":0.6466086038532594,"unsubscribes":3,"total_clicks":49,"show_total_clicks":true,"status":"completed","progress":100.0,"open_tracking_disabled":false,"click_tracking_disabled":false}}}

I tried several way but I never get the response on zapier.

Is there a way to do it ?

Thx

Jérôme


4 replies

Userlevel 7
Badge +12

Hi @Ezellar 

What data points are you trying to parse from the returned ConvertKit API response?

Please post screenshots with how your Zap steps are configured and the format of the returned data, thanks.

A Code step can be used to parse the returned JSON: https://zapier.com/apps/code/help

Userlevel 7
Badge +12

@Ezellar 

If you have the correct settings, the Zap should parse the returned JSON.

 

But here’s how to do it via a Javascript Code step…

 

CONFIG

 

RESULTS

 

Thank you @Troy Tessalone 

It works for the second part : parsing the data

The first part is still a pain : I don’t know what to yse to call the URL with the parameter and retrieve the answer to parse.

I tried a post webhook but i have this :

 

Sorry, i begin with zapier advanced features :)

But thx for the other part !

Jerome

@Troy Tessalone Got it. It was a GET not a POST. Sorry for such a newbie question. I think it will work now.

Thank you !

Jerome

Reply