Skip to main content
Solved

Wiating time base on ticket description


Forum|alt.badge.img+1

Hi everyone,
 

I am trying to automate the change of the Active Directory title for employees when HR sends us an email.

I was able to extract the date in ISO format from the ticket description as well as several other pieces of information using this logic:

{{ ticket.description | strip_html | replace: " ", " " | split: "Date du changement:" | last | strip | split: " " | first }}

(This allows us to extract the date and return: “YYYY-MM-DD”)

Subsequently, I added an expression builder that looks at today's date and the remaining days before the change date:

diffInDays(today('America/Toronto'), '{{E3.result}}')

Here, {{E3.result}} represents the date in ISO format obtained in the previous step.

 

Then, I configured a condition specifying that if the number of days is EQUAL “0”, then continue; otherwise, the employee's title needs to be changed now, as this means the change is prior to today's date. Again, everything works without any issues.

 

My problem arises with a change that needs to be made in the future.
For example, if the change need to be made on: 2025-05-05, it doesn't work. Even though I added a condition indicating that if {{E4.result}} = 0, take action and change the title. (HERE, {{E4.result}} represents the number of days remaining.)

 

However, I am unable to add a waiting timer between today's date and the number of days remaining, because Human Resources often makes requests 3-4 months in advance.
Therefore, the ticket needs to remain open until the day of the change, the change needs to happen once the remaining days reach “0,” and then the ticket should be closed.



Im sorry, I use AI to translate the text, because Im mainly french. Do not hesitate if you need more informations or anything on that.
 

I am wondering if you have an explanation or a solution for this.
 

Thank you again for your time, and have a great day.

Best answer by eeha0120

Hi.

If I understood correctly, I think this can actually be accomplished with Scheduled Workflows.

In the Schedule Workflow, you make that computation and then, when the specified date is today, the workflow will trigger and the action will be performed.

I actually have some workflows that work using this scenario.

Here’s a basic scenario:

You can have your own action.

This runs daily, at a given time, and then, if the date in the custom field is today, the action is performed.

 

Hope this helps.

 

 

Regards,

View original
Did this topic help you find an answer to your question?

3 replies

eeha0120
Skilled Expert
Forum|alt.badge.img+12
  • Skilled Expert
  • 752 replies
  • Answer
  • March 25, 2025

Hi.

If I understood correctly, I think this can actually be accomplished with Scheduled Workflows.

In the Schedule Workflow, you make that computation and then, when the specified date is today, the workflow will trigger and the action will be performed.

I actually have some workflows that work using this scenario.

Here’s a basic scenario:

You can have your own action.

This runs daily, at a given time, and then, if the date in the custom field is today, the action is performed.

 

Hope this helps.

 

 

Regards,


Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14

Is the HR mail a system generated e-mail?
If not why not using a Service request in the portal? 
If you have integration platform you could create service request with it. 
Skip needing expressions and LF. 

To add to ​@eeha0120 , if you add in your original workflow an action to update a custom date field. 
Then use that date field in the Scheduled Workflow. 


Forum|alt.badge.img+1
  • Author
  • Top Contributor
  • 8 replies
  • March 26, 2025
Daniel Söderlund wrote:

Is the HR mail a system generated e-mail?
If not why not using a Service request in the portal? 
If you have integration platform you could create service request with it. 
Skip needing expressions and LF. 

To add to ​@eeha0120 , if you add in your original workflow an action to update a custom date field. 
Then use that date field in the Scheduled Workflow. 

HR use an external system for years for onboarding, title emploiyee change, manager change, etc. We dont need to change that, because its their system and we need to find a way to “hook” into it or automate things from the mail they send us. Freshservice is very powerfull for that :) Just need to find a way to do it properly.


 

eeha0120 wrote:

Hi.

If I understood correctly, I think this can actually be accomplished with Scheduled Workflows.

In the Schedule Workflow, you make that computation and then, when the specified date is today, the workflow will trigger and the action will be performed.

I actually have some workflows that work using this scenario.

Here’s a basic scenario:

You can have your own action.

This runs daily, at a given time, and then, if the date in the custom field is today, the action is performed.

 

Hope this helps.

 

 

Regards,

Thanks for that, I will look into it to perform something each day at 2h am.

 

I let you know if its works or not :)


Reply