Using Webhook / Deal Property Changed - Deal Stage



I’m trying to use the UI to set up a webhook that will trigger on a change in the Deal Stage.

I have setup to monitor the following:

Object: Deal
Event: propertyChange
Property Name: Deal Stage

and also tried…

Object: Deal
Event: propertyChange
Property Name: dealstage

Neither is triggering when I drag a deal to a new stage or even if I open the deal manually and set the deal to a different stage.

Both subscriptions are active, and the “test” webhook works properly. I’m using Zapier if that matters to catch the hook.

Any idea what could cause them to not be triggered? How can I fix?


@cre Have you installed the app into the portal you wish to watch? Because dev portals can be used for multiple instances of HubSpot you need to install it into which portal/instance you want to watch.


i have not! this is just supposed to be an internal app for our own use. i cannot find any documentation on how to implement the solution this way. how do i install in a dev app, and then (more importantly) can i install in our own production instance, or once it’s produced does it have to be released to the entire world?


@cre You can install in in a test portal or your production portal. No it does not have to be released to the entire world. No one else would have your client ID or secret to be able to install it anyways. Here are some docs on our oauth 2.0 set up. You will need to use oauth to install it and log in to which hubspot portal you wish to install it into.


okay… so i am using the following URL:[CLIENT-ID]&scope=contacts&redirect_uri=

the app is setup to use the following scope: Read from and write to my Contacts

i have authorized the app in both a test/trial portal AND our production portal (low risk since i’m just sending a webhook)

the app still shows zero installs and is not triggering any webhooks.

also, i cannot find out where to “de-authorize” the app or any indication that the app is installed in my instance. is there somewhere i can look to confirm this and/or de-authorize?


If it says there are no installs then you must not have set up the oauth connection correctly to install it. When you make the connection you would need to pass the client secret along as well.


I don’t see any instructions on how to pass the client secret on the page you referenced above. How is this done?


Remember, I’m not trying to create a full-featured app in this scenario, I really ONLY need to be able to trigger webhooks.


@cre When I go through an app install for ex., I write it in NodeJS. I use passport as the middle ware which allows you to create a hubspot strategy in which you can pass along the secret with the ID.

I’ve also posted some example code in a previous post on the forum.


okay, i get that you are doing all this for an app that is installed somewhere. for that use case, the oauth 2.0 logic makes sense to me fine.

but here, i’m ONLY trying to trigger webhooks.

i have NO code at all to process anything.

so… when i follow the instructions on your oauth 2.0 page, my callback is really hubspot itself, no?

so my URL is correct, right? (X’s replace real data)

and after going to that and authorizing, i get redirected to the following URL: (X’s replace real data)

presumably, the querystring “code” is the “token” to be used for future calls… IF i was writing an app that needed a token.

but, i’m not making any calls at all. in fact, there are no inbound, external calls at all to the hubspot system. this is literally only to entice hubspot to make an external, outbound call to another system once triggered.

this webhook idea is extremely helpful to us, if we can get it to work, b/c right now we have to poll hubspot frequently to find out when deals are moved between stages to trigger workflows in different areas.

but it is starting to sound like you didn’t really intend on just supplying the pure webhook functionality, but instead meant it to be part of some other app ecosystem? maybe our use case just isn’t supported yet?

all i want is to be able to trigger a webhook every time a deal is moved from one stage to another. maybe there’s a simpler way and i jumped in a bit too deep at the beginning?


@cre I do not have a full app. I am just referring to the oauth flow of how to install your hubspot dev app that contains your webhook. I am sorry if you do not find this user friendly. Also the “code” is not the token which you are right you do not need. Your use case is most definitely supported but you will need to write some code to pull it off.


i’m still not following how the nodeJS code and/or passport fit into the equation.

to be clear, i AM getting the “authorization” dialog when i use the URL indicated in the link you sent entitled “Initiate an Integration with Oauth 2.0”

let me see if i can explain better what’s happening.

you sent the following link:

on that link it says:

Sending a user to this URL will ask the user to approve access to contacts and workflows:

If they grant access, the user would be redirected to this URL:

If there are any problems with the authorization, you’ll get the error parameters instead of the code:

okay, so here’s what i do…

i created a link similar to the first one shown in the instructions. it looks like this:

when i go to that link in a browser, i get:

seems like it’s working…

after i click “grant access” i get this page:

this has my token code.

now, if i go back and try to re-authorize, by going to the original URL, i get this:

and then this… (via redirect)

so this tells me that i have already authorized the app for this portal.

if i create a new portal, then i have to start all over again, but once it’s been authorized, i never get the “grant access” button again for the same app in the same portal. as i have mentioned before, i still don’t see how to “revoke access” once it’s been granted.

either way, when i go back to the developer portal, i’m still not seeing any installs.

so again, i’m not following what on earth the nodeJS code does for me.

the only line of code that seems to do anything is this one:
User.findOrCreate({ email: json_response.user, hub_id:json_response.hub_id, access_token:accessToken, refresh_token: refreshToken }, function (err, user,created) { return done(err, user); }

i don’t see any documentation on the hubspot api page referencing the User.findOrCreate function either.

i’m guessing that this is some internal function that somehow adds the email address of the USER into the APP somehow and pairs them up in some way.

if that’s the case, isn’t there some REST URL i can use instead of trying to implement this nodeJS code? or maybe send it back to hubspot using postman or something like that?

if i try to hit this URL using postman with a GET: (using the token received above)

then i get the following response…

  "status": "error",
  "message": "The access token must have the correct format",

if i then try to use POST via postman on the same URL, but attempt to populate the JSON and send as a RAW Body, something like this:


i get an error back: 405 Method Not Allowed

perhaps you could share with me how to implement this via postman using a REST API call instead of using nodeJS and passport?

it seems like i’m missing one small piece here in the middle of this to add the hub_id and the email to the app somehow.

Install an App from hubspot into clients hubspot account

Yes, you can use postman to finish off this flow. Once you receive the code you then have to make the call to the next(and final) endpoint in oauth.

This is part of a normal Oauth2 flow. Passport handles all of this for you. My apologies if it was coming across as to complicated or overly-complicated. Here is an example of a call in postman in addition to the docs I linked above.

and the headers

Trouble Installing Developer App - Bad Auth Code
Need Data Connection String

ok so once i have the tokens… then what? how do i link up the hub_id and the email to the app?

i feel like i’m missing some small piece in here that is probably really simple.


@cre It should be installed now! Please check your dev portal and see if the app was installed.

How to deploy an app with a webhook?

i’m not sure i follow. i show zero installs, zero subscriptions, and zero events.

did you do something on the back-end that i’m missing?


@cre I did not. I hit that first url to get the code and then I used the code to generate the install with the call i posted above in Postman.


when i follow your instructions in postman, i get:

  "message": "internal server error",
  "correlationId": "7ba33a03-2bfd-48b3-bff3-e88599d062f5",
  "requestId": "13d5669d0be72b36c221866de3ecfb45"

i tried it with several different code values from both live and test portals.

same result.

here are my postman settings:


Is that a fresh code you are using? I would try and run both steps, one right after the other. The only time i’ve ever received that error is when I have an old code as they expire.


yes i just re-ran.

HOWEVER… remember i’m not getting the “grant access” button anymore b/c they are already authorized.

i will try with a fresh test portal and see if it works…