Date calculations
Find out how to calculate a date or a batch of dates in your Next Matter workflow.
Good to know: Check out our ready-made templates available when you add a step and select Templates > Next Matter templates. You can use the templates to create a set of pre-configured steps.
-
Open your workflow and create a form step with the two form fields. Click + Add form field and create the following:
- Date: The date when you want to apply the calculation. This will be the form field one.
- Short text: This is to submit the days that you want to add/subtract when running your workflow. This will be the form field two.
To subtract days, enter a negative number such as -5. For adding days simply type the number.
-
Now create the date calculation step. To do that, create an integration step after step 1.
-
Click Settings to configure the step. Enter the following details:
- Method: POST
- URL:
https://integrations.nextmatter.com/g/utils/calculatedate
- Headers: Content-Type: application/json
- Body might look like the following:
-
In the Results to be used in later steps, click Add variable.
You need to create a variable for every date set so that the resulting date can be referenced in later steps.
- For one date set, add the
calculatedDate
variable with the value of$.date
- For multiple sets, your variables might be the following:
Name Value calculatedDate1 $[0].date calculatedDate2 $[1].date calculatedDate3 $[2].date - For one date set, add the