Skip to main content

The GraphQL API of Pipefy provides the function of WebHooks: you can register them, so that upon a certain action, an URL you specify is called, which enables you to use the GraphQL API to develop your own integrations and automations.

 

These WebHooks can be registered for both Database Tables and Pipes. But: to query them, to check which WebHooks are registered on a pipe, the Documentation does not provide a straight-forward way: The object you are looking for is Webhook, and as you can see in Pipe, there is a field ‚webhooks‘ linking to said object; in Table or TableRecord, there is not.

 

So, what is the trick? How can I query which WebHooks are attached to a DataBase?

The trick is not obvious, but straight-forward: use the database id as a pipe id!

Like this:

query {
pipes(ids:s"yourTableId"]) {
id
webhooks{
id
url
name
headers
actions
}
}
}

 

Hello Tim, hope all is well! 

The webhooks object isn’t directly available within the table object at this moment unfortunately, but there is a way to query for them. 

 

In our codebase, databases and pipes use a lot of the same components, and you can look this information up by looking within the webhooks object within pipes.

To do this, you’ll need the internal_id of the table. Here’s an example:

 

{
table(id:"Abc123"){
internal_id
}
}

and then use that id that is given to find the webhooks:

{
pipe(id:123456){
name
webhooks{
id
}
}
}

Hope this helps! :smile:


Hi @Roberto Chavarria , I am not sure why the type of my post was changed to a question. But yes, what you are doing is pretty much what I describe in the post. Thanks for shoing how to access the internal id, but as I noticed, it is not even necessary as you can also access the table as pipe with the “public” table id (as also described in my post).


Hi @Roberto Chavarria , I am not sure why the type of my post was changed to a question. But yes, what you are doing is pretty much what I describe in the post. Thanks for shoing how to access the internal id, but as I noticed, it is not even necessary as you can also access the table as pipe with the “public” table id (as also described in my post).

I am not sure why it was changed to a question! But I’ve already changed it again! 

Thanks, Tim and @Roberto Chavarria 


Sorry about that, it was incorrectly tagged as a question here for us. :sweat_smile:

But you’re totally right, nicely done Tim! :clap: :smile:


Reply