I am currently developing an application that I plan to make public on the marketplace.
This application will synchronize data between Pipedrive and our SaaS application.
Therefore, I have a sandbox account, and the app is currently in a Draft status.
Reading the documentation, it’s not clear for me how to create application webhooks.
I’d like this app to send events to a specific endpoint of our SaaS app every time a Client is created / updated, etc., in each Pipedrive account which will install Pipedrive application.
I managed to create “general” webhooks that allow the app to run on the sandbox account, but these are not webhooks that the app will use when installed?
Can you please detail a bit more how to configure application webhooks? Do you have a payload (as exemple) which describe how to create application webhooks? Do I have to wait for the application to be reviewed?
Hey @Valentin_D
Welcome to the community and thanks for being patient
You can use the access tokens generated by your Pipedrive App to make API calls to the /webhooks endpoint. This will let you subscribe to webhook events and the notifications will be sent to a URL (that you specify during the call)
This could be the endpoint that you described
By “general”, are you referring to the ones that you created manually in Pipedrive? Also note that the webhooks you created using the app’s access token will not be visible in the product. It can only be retrieved by performing a GET call with the same access token to the webhooks endpoint
I follow your instruction, and tried to get access_token from client_id and secret.
But as the oauth2 flow requires a code, application’s webhooks remains unclear.
Is there a way to create global application webhooks? I mean creating webhook at the application level, cross Pipedrive accounts, and then, every time the app will be installed, webhooks will be automatically sent to the target URL I’ll choose (with the accountId in order for me to identify for which account the event is sent)?
Or do I have to create “dedicated application webhook” for every Pipedrive accounts which will install the app (using their code during installation phase)?
As the code is required to create access_token, I don’t see which code to use in case of creating application webhooks “cross Pipedrive accounts”.
Hi @Valentin_D
This is the right understanding. The app has to create an account-specific webhook during the time of installation so that it receives notifications from the relevant accounts. The URL could be the same one. You can always secure them with credentials, and the meta property in the payload contains account details.