Extracting Dates

  • 5 October 2023
  • 1 reply
  • 27 views

Badge +1

Hello, I know extracting dates from the message body is not currently built in to Front, but curious if anyone has any workarounds? I can extract the date as a string and then convert to a number but having trouble pulling it all together?

Would love to take this: 08/12/2023 and say if within 30 days do X action, otherwise leave alone.


1 reply

Userlevel 5
Badge +8

Hey @daniel_smith,

 

You’re correct that the root of the problem is that the string you extract from the message body can’t be processed out-of-the-box for a date condition. One solution I can think of is to use our Zapier integration to receive the extracted date through a webhook and then process the logic on Zapier.

 

The process could look like:
1. Set up a rule in Front that looks for MM/DD/YYYY dates in message bodies.

  1. Send the extract date to Zapier via a webhook. This will require you have a paid account with them.
  2. Extract and filter the date in Zapier to trigger an action only if the date is before a certain time. I haven’t had time to test this, but reading online it seems it may be possible: https://community.zapier.com/show-tell-5/how-to-use-dynamic-fields-in-filters-211
  3. Once you have the trigger set up to take an action on dates greater than 30 days, you could create some sort of Front action in Zapier. For example, you might Assign a conversation to someone.

 

Other people might have better solutions to this, but I thought I’d share this just in case it was viable for you.

Reply