Send email reminder 60 days and 30 days before

Hi i have this use case in workflow

i got a table with a date in postgresql. So if today is 30/11/2023 and i set expiration date = 30/12/2023 it should send a reminder that in 30 days that thing will expire, but its not working

what im missing?

thank you

I did the following

      (seguro_expiracion - current_date)
  ) as time_to_expiration
  seguro_expiracion = (current_date + interval '60 days')
  or seguro_expiracion = (current_date + interval '30 days')
  or seguro_expiracion = (current_date + interval '15 days')

workflows looks like this }

it works if i got 1 vehicle, but what if i got 2 or more vehicles expiring, how i can send one email per vehicle?

i have two vehicles

and i only get notification for one of them for the first item in db.

Any tip? @Kabirdas @victoria @Tess

Any tip? @victoria @Kabirdas @PeteTheHeat @ScottR @Tess @joeBumbaca

If you really want to send one email per, change query3 into a loop, with the input from expira30d and the loop lambda as your correo resource. Then you'd replace['0'] in your email template with value so you'd end up with {{ value.marca }}.

You could also send one email, that lists each expiring vehicle. To do that, it's probably easiest to add a block in between that loops over each items in the expira30d array and builds out the email body string. Then you can just reference that string in the body of your email in query3.