Email flag

Hi,
I want to send mail every day at 4 pm and I am using if condition
now.Hour=16 then send mail
it is working well but after sending mail I have to stop resending the mail.
How can I use a flag?
I have to run it in re-framework and if I use a flag is the flag valid for next iteration in re-framework?
Initially, I will set status as “mail sent”=true and later after mail sent the status will be Mailsent=false and it should be valid the rest of the flow?
Please help me

@deepaksvg99

You have to mention the exact time with minutes and seconds, then when you run the next time it the seconds will change and it will execute

OR

write in text file as Mail sent, then you can always check whether mail sent or Not

Mark as solution if this helps

Thanks

1 Like

Hi Ksrinu070184
Thanks I will try this and will inform you

1 Like

Hi Ksrinu070184,
I tried the process you suggested it is working but the catch here is that the bot may not come to that condition on that exact time
suppose we gave at 16:00:00 and by that time the bot is occupied in another work and it reaches that condition at 16:15:00 then it will not send mail.
but for me it has to send mail in that hour when ever the bot comes to that condition and once mail sent in that hour then it should not send it in that hour again
when i am using “now.hour” it is sending mail in that entire hour so i want to stop that
I am little confuesd on using flag here
please help me

Can you try this by using the Log in the Excel or Database ?

@deepaksvg99

Hey,

Why don’t you schedule your bot to run at 1600 hours, it will be much easier and your licences will not be utilized for complete day.
i guess there will not be any other dependency.

@deepaksvg99 In your if condition add one more condition isEmailAlreadySent
And after sending an email update variable to True

Hi Arpit,

If there is exception in that particular hour then the condition will be false by default an then it will send mail again which should not happen in my case

Hi Lakshay,
If I put scheduler then if by that time my bot is still running then it will miss the time to send mail and if in that hour there are chances of sending mail again i.e duplication might happen.
Here my case the bot will be running continuously for around 23 hrs and during that time I cannot schedule to run a separate flow

Hi Priyanka,
can you please eloborate on this and how using log in excel will help me
if possible can you design an example and show it.I t will be of great help to me

LogExcel.xaml (8.8 KB) LogExcel.xlsx (8.3 KB)

Please try this Logic and wherever the write cell is used there the Logic of Email send can be used.

Thanks, Priyanka with your help and XAML file provided, I got a new idea and implemented it.
Now it is working.

1 Like