Using Power Automate to send an email notification 9 months before expiry

Anonymous
2023-07-19T15:02:49.12+00:00

Hello,

I am trying to create a flow in Power Automate where my line manager is emailed when the expiration date of one of our partner institutions is due for renewal. We send and receive exchange students from our University to various EU and non-EU overseas partners. When that partner's agreement is 9 months away from renewal we need to be notified, hence the creation of the flow. My line manager wants to include specific details in the email - i.e. the partner/institution name, the date of expiry and the subject whatever that might be e.g. Biology.

I have reviewed several videos on YouTube but they all use the AddDays function in the variable expression BUT when they choose the date, they use the current date using UTCNow. This isn't what I want. For example, our first date of renewal is 22 June 2024 and we want to be notified that this is due for renewal 9 months prior to this by 22 September 2023. They use the expression:

addDays (utcNow(), 3, 'dd/MM/yyyy') - I have modified this to addDays (utcNow(), -175, 'dd/MM/yyyy') which would be 175 days before today (19 July 2023) but I want it to be 175 days before 22 June 2024.

We also have multiple renewal dates and I understand I would need to use branches to add more to this. I tried inputting (utc22/06/2024') in place of (utcNow(), and keep getting an error. I'm brand new to this, so any help is appreciated.

If it is also possible to do this monthly so I don't have to differentiate dates in June, for example, this would help also. So I could program all the renewals in June whether they be the 22, 30 or 16 etc to just the one date 9 months before, like September 1.

The video I'm following and want to amend is here: https://www.youtube.com/watch?v=g_SqkW9ZCR0 runs from 01.27 to 05.56.

Thanks.

Best wishes,

Nick

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,881 Reputation points
    2023-07-21T02:51:43.25+00:00

    Hi Nicholas Jensen (PGR),

    Welcome to the forum. It's a pleasure to be able to help you.

    I tested locally following the video provided, and base on my understanding of this issue, if you want to use the addDays() function to add days to a fixed date, you can follow this syntax:

     addDays('<timestamp>', <days>, '<format>')
    

    Here is the flow I test locally for your reference:

    Untitled1

    Finally, the email can be received normally.

    image003

    Hope this helps.

    Best Regards.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.