Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

How to Configure Date Add/Subtract Actions in HubSpot Custom Workflows

This guide explains how to use the third-party app "Custom Workflow Starter" within HubSpot to add or subtract days from a specific date property in a workflow and save the result to another property.

Demo Video

Over view
Code

Detail

Purpose

The goal is to automate flexible date calculations within workflows—something that can be difficult with HubSpot's standard features. By calculating dates such as "X days later" or "X days ago" based on existing date properties and storing the values in fields, you can improve the accuracy of task and deadline management.

Use Cases

This action can be utilized in the following scenarios:

  • Automating Next Follow-up DatesAdd "4 days" to the "Last Contacted" date and automatically populate the "Next Contact Date" property.
  • Creating Contract Renewal AlertsAdd "365 days" to the "Contract Start Date" (or subtract "30 days" from the "Contract End Date") to create a trigger date for sending renewal notices.
  • Managing Trial ExpirationsAdd "14 days" to the "Trial Sign-up Date" to automatically calculate the trial end date and record it in a property.

Configuration Steps

1. Add and Select the Action

In the workflow editor, click the "+" button to add an action. Select "Custom Workflow Starter" from the app list, then click "Date Add/Subtract Action v2" from the action list.

2. Select the Base Date Property

Once the settings screen opens, select the date property to serve as the basis for the calculation.

  • Date property: Enter the property name (e.g., Last Contacted) in the search bar and specify the target property.

3. Enter Days to Add or Subtract

Next, enter the numerical value for how many days you want to shift the date.

  • Add/Subtract: Enter a number.
    • To Add: Enter a positive integer (e.g., for 4 days later, enter 4).
    • To Subtract: Enter a negative integer (e.g., for 4 days ago, enter -4).Click "Save" when finished.

4. Add an Action to Save the Calculation Result

To reflect the calculated date in a contact property, add the next action.

  • Select Action: Choose a standard HubSpot action like "Edit record".
  • Property to Update: Select the date property where you want to save the value (e.g., test_date).

5. Apply Action Output

In the value setting for the update, dynamically reference the result calculated earlier.

  • Look for the Dynamic value icon or the "Action outputs" section in the input field.
  • Expand "1. Date Add/Subtract Action v2".
  • Select "Calculated Date".This will automatically apply the date calculated in Step 3. Click "Save" to finalize the action.

6. Verify Operation

Activate the workflow or perform a test run. Check the activity log of the target record to confirm that "Date Add/Subtract Action v2" succeeded and that the subsequent "Edit record" action has written the correct date (e.g., original date + 4 days) to the property.

‍

Source Code

HTML
CSS
Javascript

FAQ

I added the action, but the contact's date property isn't updating. Why?

The "Calculation" action alone does not save the data. You must combine it with an "Edit record" action. The app action (Date Add/Subtract Action v2) only functions to "calculate a new date and hold it temporarily." To actually reflect this result in a HubSpot property (e.g., Next Contact Date), you must add a standard HubSpot "Edit record" action immediately after the calculation step. In that step, you need to map the "Calculated Date" output to your target property. Please review steps 4 and 5 of the setup guide.

Can I calculate past dates, such as "30 days ago"?

Yes, you can. Simply enter a negative number in the input field. There is no separate switch for addition or subtraction. You control this via the "Add/Subtract" field: For Future Dates (Add): Enter a positive integer (e.g., 30). For Past Dates (Subtract): Enter a negative integer (e.g., -30). This allows you to create trigger dates, such as "30 days before the contract end date."

Can I overwrite the result onto the same property used for the calculation?

Yes, this is possible. It is useful for scenarios like extending deadlines. It is perfectly fine to set the "Source Property" (from Step 2) and the "Target Property" (in Step 4) to be the same field. For example, you can read a "Deadline Date" property, add 7 to it, and save it back to the "Deadline Date" property. This effectively automates the process of "extending the current deadline by one week."

Search

Search more

Related Template

Need Customization?

We can customize this sample to match your specific business requirements.

Book Free Consultation

Got a quick dev request?

Put it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.

Development Requests Here

How to Configure Date Add/Subtract Actions in HubSpot Custom Workflows

HubSpot CMS: Implementing a High-Converting "Rich CTA" Module with Shine Effects

HubSpot CMS: A Responsive "Definition List" Module for Event Overviews & Specs

HubSpot CMS: Implementing a "Step Flow" Module for Process Visualization

GAS Library: Automated Blog Post NG Word Checking with AI (Gemini/OpenAI)

Company Info
Name : SweetsVillage .Inc
CEO :
‍
Tomoo Motoyama

HomeTemplateCustomWorkflow
Terms & ConditionsPrivacy PolicyContact us

Copyright ©SweetsVillage .Inc

Back To Top Image