2

I'm creating a team calendar to send alerts a day before a set activity takes place.

I have currently got it working for 1 day in advance with no issues (regardless of day) using the following flow:

Stage:emailReminder
Add 0 months, -1 days, 0 hours, 0 minutes to Current Item:Start Time (Output to Variable: reminderDate )
Pause until Variable: reminderDate
Email Alex; 
Transition to stage
Go to End of Workflow

I'm trying to get it so that on a Saturday it will send the e-mail 1 day before so Friday, then Sunday 2 days before (Again Friday) and then on Monday 3 days before (again Friday)

My understanding would be that I need to convert Current Item:Start Time into a string and check if it contains Saturday, Sunday or Monday. I've given it a go using the following flow (leaving out Monday's -3):

  Stage:Stage 1
Set Variable: todaysDate to Today
Set Variable: longDateString to Variable: todaysDate
If Variable: longDateString contains Saturday
    Add 0 months, -1 days, 0 hours, 0 minutes to Current Item:Start Time (Output to Variable: reminderDate )
    Pause until Variable: reminderDate
    Email Alex 
Else
    If Variable: longDateString contains Sunday
        Add 0 months, -2 days, 0 hours, 0 minutes to Current Item:Start Time (Output to Variable: reminderDate )
        Pause until Variable: reminderDate
        Email Alex 
    Else
        Add 0 months, -1 days, 0 hours, 0 minutes to Current Item:Start Time (Output to Variable: reminderDate )
        Pause until Variable: reminderDate
        Email Alex 
Transition to stage
Go to End of Workflow

I think that the above one isn't working because i have tried to follow another guide and implement it into my current working flow and i'm using different variable names - I've completely lost myself basically! I'm pretty certain my If/Else works okay but i've got in a muddle at the start and with the converting to days of the week

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.