CRM

OliviaB
HubSpot Employee
HubSpot Employee

How to create a 'Today's date' date property.

SOLVE

I recently discovered this smart way to create and maintain a 'Today's date' property using workflows. This can then be used in reporting, workflows and lists. 

To do this you can follow these steps: 
1) Create a custom date field property
2020-11-30 16_06_15-Property settings.png

 

2020-11-30 16_05_51-Property settings.png

2) Create a contact-based workflow with the enrollment triggers 'Today's date is known' OR 'Today's date in unknown'. 
3) Turn on re-enrollment for 'Today's date is known'. 
4) Add an if/then branch action with the trigger 'Today's date is known'. 
5) After the NO branch add the action 'set property value' and then set 'Today's date' to the 'date of step'. 
6) After the YES branch add the the action 'set property value' and then set 'Today's date' to the 'date of step'. 
7) The last steps after the YES branch will be a delay. To do this you will chose 'delay until a day or time' and then choose 00:15 or any other time after midnight. 

2020-11-30 16_19_56-Unnamed workflow - Mon Nov 30 2020 16_09_04 GMT+0800 _ HubSpot.png

 


This workflow will then work in the backround to always make sure each contact has today's date saved as the value on their record. The same can be repeated for company and deal properties. 


4 Accepted solutions
DColeman7
Solution
Participant

How to create a 'Today's date' date property.

SOLVE

I tried a few of the options in this post to get a reliablew "Today's Date" property on my deals. I didn't have luck for a long time!

 

However, I finally found a reliable solution which is to create a Scheduled Workflow, rather than adding in a delay. 

 

So before you create the workflow make sure you've chosen "Schedule" in the list. 

 

Screenshot 2022-05-19 at 09.57.00.png

 

And then this workflow worked for me: 

 

Screenshot 2022-05-19 at 09.50.18.png

 

Re-enrollment is on with all conditions. 

 

It updates daily and doesnt seem to slow my account. 

 

Hope it works for you! 

 

Thanks

Duncan

View solution in original post

stuartbalcombe
Solution
Participant | Partner
Participant | Partner

How to create a 'Today's date' date property.

SOLVE

It really is so crazy that “Today’s Date” isn’t a native value available globally in HubSpot. The workflow outlined in this post is a great workaround though. I recorded a quick video of setting it up, which hopefully is helpful to folks.

I find myself reaching for Today’s date a lot in reporting and other workflows. Here's are a quick example use case of building a custom report to get visibility into onboarding activity.

View solution in original post

DLarsen21
Solution
Participant

How to create a 'Today's date' date property.

SOLVE

I am not sure why it needs to be so complicated. I found a solution that simply changes the date if it is not known or is over a day old. It would be nice if HubSpot simply fixed the issue by providing an option to select todays date (rolling).Set Date to Today.jpg

View solution in original post

NeKing
Solution
HubSpot Employee
HubSpot Employee

How to create a 'Today's date' date property.

SOLVE

There is a new option in Workflows for a SCHEDULED workflow option. If you have the ability to set up a scheduled workflow option here is what the setup should look like now for an EASY Today's Date property for any object. 

 

View solution in original post

82 Replies 82
NeKing
Solution
HubSpot Employee
HubSpot Employee

How to create a 'Today's date' date property.

SOLVE

There is a new option in Workflows for a SCHEDULED workflow option. If you have the ability to set up a scheduled workflow option here is what the setup should look like now for an EASY Today's Date property for any object. 

 
DLarsen21
Solution
Participant

How to create a 'Today's date' date property.

SOLVE

I am not sure why it needs to be so complicated. I found a solution that simply changes the date if it is not known or is over a day old. It would be nice if HubSpot simply fixed the issue by providing an option to select todays date (rolling).Set Date to Today.jpg

JanetMcLean
Participant

How to create a 'Today's date' date property.

SOLVE

This simple solution worked for me, in my case for Deals. Just remember to turn on re-enrollments, I forgot at first. Thanks so much @DLarsen21 ! 

 

DamienBouche
Participant

How to create a 'Today's date' date property.

SOLVE

I tried all the above solution but every time it seems contacts can't be re-enrolled.
How did you manage to make it work ?
Here is an example with "today's date > 1 day ago" but same goes with "today's date is unknown"

DamienBouche_0-1689579784676.png

 

0 Upvotes
n_costa
Participant

How to create a 'Today's date' date property.

SOLVE

It doesn't work for contacts. See here

PamCotton
Community Manager
Community Manager

How to create a 'Today's date' date property.

SOLVE

Thank you for sharing this resource @n_costa 

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




DamienBouche
Participant

How to create a 'Today's date' date property.

SOLVE

Oh yeah thanks !

ARich
Contributor

How to create a 'Today's date' date property.

SOLVE

@DLarsen21 this is a great alternative too. I can see using this in a if/then branch scenario too! Thank you!

0 Upvotes
VRakitski
Contributor

How to create a 'Today's date' date property.

SOLVE

@DLarsen21 Thank you. Your solution works perfect.

kvlschaefer
Community Manager
Community Manager

How to create a 'Today's date' date property.

SOLVE

Hi @DLarsen21,

 

Thanks for sharing how you solved this with a workflow!

 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
BMartins
Participant

How to create a 'Today's date' date property.

SOLVE

It's absolutely insane that Hubspot hasn't created a default property for that. Not sure how they expect people to upgrade subscriptions if we have to go through all this hassle to get a simple piece information in there.

 

Created another version for this below - not sure if it will work tomorrow though. I have reenrolment enabled but there are always surprises with this type of workflow

 

Screenshot 2023-05-19 at 17.00.17.png

 

 

 

 

stuartbalcombe
Participant | Partner
Participant | Partner

How to create a 'Today's date' date property.

SOLVE

[Updated from my previous reply] Steal this workflow to dynamically set a Today’s Date property without Ops Hub.

We’ll create 2 properties and 2 workflows to workaround a tricky HubSpot limitation so you can use Today’s date in reporting and calculated properties. Eg. Days until renewal.

🚨 Why are we creating 2 workflows?

To keep our Today’s Date property up to date, we need to run the workflow on the same object at least once a day…

But…

HubSpot now prevents us from enrolling a company in a workflow from within the same workflow.

Here’s how our solution works:

PRE-WORK: Create 2 properties:
→ Today’s Date - Date picker
→ Today’s Date Updated - Single Checkbox

1. Create our first workflow triggered when:
→ Today’s Date Updated is None
→ Today’s Date Updated is Unknown
*Turn on re-enrollment for the trigger

2. Set a delay for a set amount of time
→ This could be anything from 1 minute to 12 hours.

3. Set the property value of “Today’s Date” to the time of the workflow.

4. Set the property value of “Today’s Date Updated” to “YES”.
→ We’ll use this as the trigger in workflow 2.

5. Copy the newly updated “Today’s Date” value to all associated Deals, Tickets, or Quotes.
→ You’ll need to add a corresponding “Today’s Date” property to each object you want to copy to but this way you don’t need additional workflows.

6. Clone your new workflow and make a few tweaks
→ Update the 2nd workflow to be triggered when “Today’s Date Updated” is equal to “Yes”
→ Update step 4 above to set the value of “Today’s Date Updated” to “NO” in the 2nd workflow

And we’re all done. Our property will be updated at the interval we set with the current date in our accounts default timezone.

CEW
Participant

How to create a 'Today's date' date property.

SOLVE

Who can clarify how to do this?  I swear I've tried every solution in here, except for Operations.  Is that the only way?

Please help.

0 Upvotes
amandafann
Contributor

How to create a 'Today's date' date property.

SOLVE

I was able to implement @CBader's workflow for Deals and it is working. I have not tried any of the Contact's solutions yet.  

0 Upvotes
stuartbalcombe
Solution
Participant | Partner
Participant | Partner

How to create a 'Today's date' date property.

SOLVE

It really is so crazy that “Today’s Date” isn’t a native value available globally in HubSpot. The workflow outlined in this post is a great workaround though. I recorded a quick video of setting it up, which hopefully is helpful to folks.

I find myself reaching for Today’s date a lot in reporting and other workflows. Here's are a quick example use case of building a custom report to get visibility into onboarding activity.

ARich
Contributor

How to create a 'Today's date' date property.

SOLVE

I set this up and it works! Thank you! 

 

However, it was driving my entire team crazy because whenever they try to look at what workflow someone had enrolled in the list went on forever since the workflow runs daily. 

 

My solution is a custom code action. Run the custom code action just before you need to use the "today's date" value in your other workflows. 

 

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

exports.main = async (event, callback) => {
  const hubspotClient = new hubspot.Client({
    accessToken: {your access token}
  });

  const today = new Date();
  const isoDate = today.toISOString().split('T')[0];

  try {
    const contactId = event.inputFields.objectId;
    console.log(contactId);

    // Update contact with the "today_s_date" property
    const updateResponse = await hubspotClient.crm.contacts.basicApi.update(
      contactId,
      {
        properties: {
          today_s_date: isoDate
        }
      }
    );
    console.log(`Update response: ${JSON.stringify(updateResponse)}`);

    callback({
      outputFields: {
        contactId: contactId
      }
    });
  } catch (error) {
    console.error(error);
    throw error;
  }
};
ARich
Contributor

How to create a 'Today's date' date property.

SOLVE

@n_costa this version works for Contacts. I'm using it on multiple workflows. This should be easy enough to update the object type to pretty much any of the objects where you need a "today's date"

DianaGomez
Community Manager
Community Manager

How to create a 'Today's date' date property.

SOLVE

Hi @ARich 😊

 

Thanks for sharing!

 

Best,

Diana


¿Sabías que la Comunidad está disponible en Español?
¡Participa hoy en conversaciones en el idioma de tu preferencia,cambiando el idioma en tus configuraciones!

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


stuartbalcombe
Participant | Partner
Participant | Partner

How to create a 'Today's date' date property.

SOLVE

[Updated Solution - January 2023] How to dynamically set a Today’s Date property without Ops Hub.

We’ll create 2 properties and 2 workflows to workaround a tricky HubSpot limitation so you can use Today’s date in reporting and calculated properties. Eg. Days until renewal.

🚨 Why are we creating 2 workflows?

To keep our Today’s Date property up to date, we need to run the workflow on the same object at least once a day…

But…

HubSpot now prevents us from enrolling a company in a workflow from within the same workflow.

Here’s how our solution works:

PRE-WORK: Create 2 properties:
→ Today’s Date - Date picker
→ Today’s Date Updated - Single Checkbox

1. Create our first workflow triggered when:
→ Today’s Date Updated is None
→ Today’s Date Updated is Unknown
*Turn on re-enrollment for the trigger

2. Set a delay for a set amount of time
→ This could be anything from 1 minute to 12 hours.

3. Set the property value of “Today’s Date” to the time of the workflow.

4. Set the property value of “Today’s Date Updated” to “YES”.
→ We’ll use this as the trigger in workflow 2.

5. Copy the newly updated “Today’s Date” value to all associated Deals, Tickets, or Quotes.
→ You’ll need to add a corresponding “Today’s Date” property to each object you want to copy to but this way you don’t need additional workflows.

6. Clone your new workflow and make a few tweaks
→ Update the 2nd workflow to be triggered when “Today’s Date Updated” is equal to “Yes”
→ Update step 4 above to set the value of “Today’s Date Updated” to “NO” in the 2nd workflow

And we’re all done. Our property will be updated at the interval we set with the current date in our accounts default timezone.

boydjk88
Contributor

How to create a 'Today's date' date property.

SOLVE

@stuartbalcombe thank you so much for this updated solution. So far it's working great for us. Here's a screenshot of each of our two workflows in case these are helpful for anyone else.

Set Today's Date on the Contact Level - Part 1.jpg

 

 

 

 

Set Today's Date on the Contact Level - Part 2.jpg