Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
 View Only
  • 1.  Email Reminder 5 days before Start Date in Child Flow

    Gold Contributor
    Posted Feb 14, 2023 10:22 AM
      |   view attached

    I have a child flow that I created in which I need to send an email to the manager of a new employee 5 days before the Start Date at 9AM Arizona time. Important note: my client is in AZ and I'm on Eastern Time. No issues with the Parent/Child Flow in my Solution. The issue is converting the Start Date from UTC to Arizona Time in the child flow. Every time the flow runs, the time the email is sent is off by 5 hours. Latest test I ran was yesterday. Start Date is 2/16/23. The Flow ran pending the "Delay until" which is set to 9AM. The email came through at 4AM.  I've tried multiple ways to do this, but here's current config. Child flow - Manually Trigger Flow with several inputs from parent flow, including the Start Date.

    Then I have a Convert time zone action named "Convert StartDate to MDT":

    Base time: Outputs (from Compose StartDate)

    Format string (Expression): formatDateTime(addDays(outputs('Compose_StartDate'),-2, 'yyyy-MM-dd')). Note: I'm using -2 instead of -5 in here for testing purposes

    Source time zone: (UTC-11:00) Coordinated Universal Time-11

    Destination time zone: (UTC-07:00) Arizona

    Then I have a "Delay until" action with timestamp using expression: formatDateTime(body('Convert_StartDate_to_MDT'), 'yyyy-MM-ddT09:00:00Z')

    Last action is "Send an Email".

    Note: I also have the "Respond to a PowerApp or Flow" action in between. I could move, if necessary, but for now, the order doesn't seem to be an issue. And I realize the Flow may be running 2 hours ahead being I'm on Eastern Time vs AZ time so maybe an adjustment needs to be made considering that, but the Convert Time zone action still doesn't seem to be working correctly.



    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------


  • 2.  RE: Email Reminder 5 days before Start Date in Child Flow

    Gold Contributor
    Posted Feb 14, 2023 04:20 PM

    I may have figured this out, but am testing the Flow with a Start Date of 2/17/23 so the email reminder should arrive tomorrow at 9AM MT. Crossing my fingers!



    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------



  • 3.  RE: Email Reminder 5 days before Start Date in Child Flow

    Gold Contributor
    Posted Feb 15, 2023 01:45 PM
      |   view attached

    Here's my latest attempt. I received some reminder emails overnight, but they came in at 4AM ET (2AM MT) so it looks like I'm still 7 hours off and thus the Convert time zone action doesn't seem to work. Or I've written the Expression incorrectly.



    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------



  • 4.  RE: Email Reminder 5 days before Start Date in Child Flow

    Posted Feb 16, 2023 08:52 AM
      |   view attached

    Beth,

        Try starting your flow with a recurrence, set for every day , you can choose the time zone and the start time ...

        The second statement would be your list rows to determine if any records are found and if no records are found just die else compose and send your email.

        Jeff



    ------------------------------
    Jeff Rath
    Sr. System Analyst
    Okuma America Corporation
    Charlotte NC
    7045887000
    ------------------------------



  • 5.  RE: Email Reminder 5 days before Start Date in Child Flow

    Gold Contributor
    Posted Feb 18, 2023 10:48 AM

    @Jeff Rath Thank you. Your recommended approach is working. I'm still confused as to why my Flow doesn't work, but am good to go. Thank you so much!



    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------