How to reference/use value of deal custom property in workflow custom code

Hi,
I want write Custom Code in workflow. I will be using this code to check if enough time passed to move deal from one stage to another(it should be automatic).
So far everything works fine but i don’t know how to use value from custom property i created(to store date) in my code.
Any tips how to do this?

//const hubspot = require('@hubspot/api-client');

exports.main = async (event, callback) => {

 let deal_stage_onboarding___start_time = new Date(); //change to value from deal property 
 let currentDateDay = new Date().getDate();
 let currentDateMonth = (new Date().getMonth()+1);
 let output = '';

 console.log("Month start: = "+(deal_stage_onboarding___start_time.getMonth()+1)+ ". Month end: = "+currentDateMonth);

 if( (deal_stage_onboarding___start_time.getMonth()+4) === currentDateMonth && (deal_stage_onboarding___start_time.getDate()) === currentDateDay) {

 console.log("Works");
 console.log("Star time: " + deal_stage_onboarding___start_time);
 console.log("Current time: Month " + currentDateMonth);
 console.log("Current time: Day " + currentDateDay);
 output = 'True';

 } 
 else 
 {
 console.log("Not working");
 console.log("Start time: " + deal_stage_onboarding___start_time);
 console.log("Current time: Month " + currentDateMonth);
 console.log("Current time: Day " + currentDateDay);
 output = 'False';
 }

 callback({
 outputFields: {
 output: output
 }
 });
}

hi DZgliński

You can pass the deal property hat you want to use as shown in attachment 1

and then you can use that in custom code as shown in attachment 2

Hope this helps! If we were able to answer your query, kindly help the community by marking it as a solution. Thanks and Regards.

Thank you for your help. This is what I was looking for :slightly_smiling_face:
Just for my knowledge can you pinpoint me where should i look for information like that? Is there someplace in Hubspot with this kind of information for custome code/using data from within HubSpot?

i don’t find any particular article for that , i just noticed that when you create a new blank workflow hubspot gives you some dummy code where this is used