Today I am writing to you about how to find the user who made an update to a certain field on a deal in Hubspot. Currently, our Deal Updated and Deal Field updated cards in the Hubspot CRM connector do not have a field associated with whom made the update. Although this seems odd and I I’m sure you’ve wondered, “Well why not?”, it is for good reason. To get to this information in the Hubspot API you need to traverse through a nested object of properties associated with the deal and pull our the sourceId of every property that was modified. We don’t like to write operations like this into our event connectors because they increase the complexity of the connector and also slow them down, thus making more room for errors such as missing records.
Although this is technically possible to do for all the properties, I am going to highlight how you would go about this using the Deal Stage, which is a very commonly monitored event. Once we finish finding the source of the change, I’ll leave it up to you to finish the FLO with your own use case! To highlight some of the cards this FLO is going to use: Object Construct, List Find By, and the Hubspot HTTP Request cards.
Let’s start our FLO with the Hubspot CRM monitor called Deal Field Updated, and from the options menu we are going to select Deal Stage as the field we want to monitor. Next, I chose some generic fields from the monitor card but in order for this to work you need to choose the Last Modified Date from the monitor card (the other fields are just an example of different records you could modify): At this point your FLO should look like the picture below:
Then, I set up a continue if card using the New Value output of the monitor card because I only want the FLO to continue is the Deal Stage has been moved to Presentation Scheduled (a generic Sales Pipeline deal stage, you can insert any deal stage you wish in here, however there are considerations to be made which I will address at the end of the write-up). One thing to notice is that Hubspot deals with date-times in UNIX format down to the millisecond, but our monitor gives you the value in UNIX so you will not need to convert it. Next we need to set up an object for our query parameters for our Hubspot HTTP request card. You will need to create a key called count, and another called since. In the count field you just created insert the number records you want returned by this call (the default is 20, maximum is 100, and I arbitrarily chose 50). Next, drag the “Last Modified Date” field from your monitor card into the since field. After this is done, insert the Hubspot CRM HTTP Request card, choose GET from the options dropdown menu and hit done, and then type the following endpoint into the URL input field:
Then drag the output from your Object Construct card into the Query input of the HTTP request card. On the ‘Body’ output of your HTTP card, you should define a list of objects titled results. At this point, your FLO should look like the following:
Next, you will need to use a List - Find by card to process through your results list. First drag in the results outpur from the HTTP card into the input of the Find By card, then set your operator to ‘equal to.’ Next, define your path as:
and then drag the Last Modified Date field from the monitor card into the ‘Comparison’ field. After this is done, you are done building your FLO and ready to customize what happens next! In all, your FLO should resemble the following:
Now if you are going to use a custom deal stage you will need to take into account that when our monitor picks up the deal stage change it will display the API’s unique ID it generated for that deal stage and not the human readable name you gave it when you created it! If this is the case for you then please reply below and I can supply you with the options you have for changing that UID (not always advisable) or just accounting for it in your FLO.
Thanks for reading and please share your use cases for the end of this FLO!