Question

"We could not find a client" message On testing a unsubscribe trigger

  • 29 January 2021
  • 6 replies
  • 44 views

Badge

 On sending the subscription request via postman, it returns the below response as expected. Now I want to setup the unsubscribe trigger in my Zapier intergration account but it is giving me the below message. Please advice.

 

I got the following response on executing the webhook.

{

    "id": "e8940575-13ac-4d4f-9cb9-2e0ab6f6b256",

    "request_id": "60005fd2-fa1b-455b-bc88-15bc7f7a00f0",

    "attempt": "60005fd2-fa1b-455b-bc88-15bc7f7a00f0",

    "status": "success"

}

I then used the “id” property from the above response as a parameter for the unsubscribe request like below.

 

I then saved the API configuration and proceeded to the next step which is Test the API Request. On click of Test Trigger I got the below message. What does this indicate? Do I need to setup anything else in my Zapier Integration Account?

 

 

Can someone please adivce on how to fix this ?

 

Thanks


6 replies

Userlevel 4
Badge +7

Make sure to implement the performList method and make sure that that endpoint returns data.  The Zap Editor relies on this method to get objects from your API that the user can use to map fields into subsequent Action steps in their workflow. 

Once the Zap is turned on the objects will come from your hook messages, but the Editor needs an endpoint to get data on-demand during Zap setup.  

“fisclient” is what you called your “noun” here.  So the message is telling the user essentially, “This endpoint has no data I can use to help you”.

Userlevel 4
Badge +7

This is the same issue you were running into here it looks like: 

 

Badge

@Zane - Thank you for the reply.

I am returning a string currently for testing purpose like this from the unsubscribe endpoint:

   return "Unsubscribed successfully" + hookId where hookid is what i am passing as a parameter in the endpoint method.

I am not that familiar with the zapier integration. Could you please let me know how to setup the Peformlist method ?

It says: Enter the endpoint URL Zapier should check for recent items, to provide sample data in the Zap Editor. This request must return an arrayLearn more.

What I am trying to achieve with this zapier trigger is, When a new record is created in my web application zapier will peform some action like send an email to client. For that I have setup this trigger where I have the subscribe and unsubscribe endpoints. But I am not sure how to setup the performlist.

The user will use my custom zapier as a trigger and will then perform the action he wants to.

 

Thanks 

Userlevel 4
Badge +7

Imagine you have a service that deals with book objects.  

 

Subscribe may do a POST to your subscription endpoint, to set up a hook subscription, so we can trigger a Zap each time a new book is added.

Perform is a function that gets called by the Zapier platform each time your hook sends a message with a book object.

Unsubscribe may be a DELETE to your subscription endpoint that gets called each time the user turns the Zap off, so you know to stop sending messages to this Zapier subscription when new books are added.

Perform list may be a GET to a /books endpoint that returns a list of all the books in the collection.  For the resthook trigger in your Zapier integration this will only be used during Zap setup so the user has one or more book objects from their collection to use to map fields in the Zap editor.  Otherwise Zapier has no way to know what fields are available, and what they’re called, etc.  It’s defined pretty much just like a perform request in a polling trigger.  

 

Here’s a super simple example integration with a Rest Hook trigger.  While it’s implemented in the CLI, it might help illustrate how they are defined: https://github.com/zapier/zapier-platform/tree/master/example-apps/rest-hooks

 

I realize our docs are not super clear on this topic.  We’ll be working on improving this area and many others this year.  

Badge

@Zane  - Thank you for the explanation. I will try to setup my performlist next week and will post here if any concerns. Thanks.

Badge

@Zane - As suggested, I setup a performlist endpoint and then on testing the trigger, I got the message that “We found a client” like below.

 

 

Now the question that I have is, this time around while testing the trigger, I did not get the subscription url  which I got the last time and I used that to generate the hookId by using postman and used that in the unsubscribe endpoint as a parameter. This was what I got the last time when I was testing the subscription endpoint without configuring the unsubscribe and performlist endpoint  https://hooks.zapier.com/hooks/catch/9271652/o01es53/

Does this mean that If I remove the unsubscribe and PerformList endpoint from the trigger setup and then if I test the trigger I will then get the subscription url back?

Kindly advice.

Here is my final trigger setup

  1. Subscribe endpoint setup is as below
  2. Unsubscribe endpoint setup is as below - Here I am passing the hookId as a parameter that I should get the subscribe.
    1.  PerformList endpoint is as below- This endpoint returns an array of client
    2.  

Reply