Custom code in Workflow to calculate number of emails?
SOLVE
Hello community,
While HubSpot provides a Number of times contacted field natively, this field is not very granular in that:
It counts all types of activties indiscrimnantly.
The number can only grow as its not calculated for a certain time period.
I am wondering if its possible in using custom code in workflow, to achive a count of related activties with various conditons (activity type) and date (time frame).
Can the code access all the related activity records to perform such a count?
Custom code in Workflow to calculate number of emails?
SOLVE
Hello Bérangère,
Thanks for the reply here and searching for previous solutions. It looks like the first solution you posted migh be the closest to what is needed.
I did not realize that it is possible to use API calls inside a custom code element within a workflow. I'll have to try to alter this sample code to what we need and see how it work.
I also wanted to invite a couple of subject matter experts to this conversation: Hi @HFisher7, @louischausse and @ChristinaKay do you have suggestions to help @ABrandt, please?
If anybody else has anything to add and/or share, please feel free to join in the conversation 🙂
Custom code in Workflow to calculate number of emails?
SOLVE
Hello Bérangère,
Thanks for the reply here and searching for previous solutions. It looks like the first solution you posted migh be the closest to what is needed.
I did not realize that it is possible to use API calls inside a custom code element within a workflow. I'll have to try to alter this sample code to what we need and see how it work.