Solved

Card info on webhook

  • 27 October 2020
  • 1 reply
  • 240 views

Userlevel 5

Is it possible to pass aditional information when creating a webhook to get more information about the cards without the need of making aditional requests? Is the "headers" argument supposed to enable doing that?

 

icon

Best answer by Roberto Chavarria 10 November 2020, 17:59

View original

1 reply

Userlevel 5
Badge +5

Hi there Nigel, hope all is well! The headers are optional and are used more for security purposes. You can add some customized headers and set your endpoint to only validate incoming webhooks with those specific headers.

 

As for multiple actions in a webhook, you can create something like this: 

mutation{
createWebhook(input:{
actions:["card.create","card.move"]
name:"webhook name"
url:"https://test.requestcatcher.com/"
pipe_id:12345
email:"[email protected]"
headers: "{\"foo\": \"bar\"}"
}){
webhook{
id
}
}
}

As you can see in the actions section, the webhook will send data every time that a card is created, or every time a card is moved. This is the most structure a webhook can have.

Reply