Stage 9 of 17

Stage 9 of 17

Automate

5 Power Automate flows: submission acknowledgement with risk calculation, approval notification, decision update, implementation reminder, and weekly schedule summary. Each flow is built step by step with complete configuration.

Run Flows Under a Service Account

All 5 flows must use a service account connection (itchangemgmt@contoso.co.uk or equivalent), not a personal account. If a personal account is used and that person leaves the organisation, all flows will fail. POTENTIAL PREMIUM LICENSING — a service account requires a Power Automate Per User licence or a Power Automate Per Flow licence.

Flow 1 — DToDLab011-SubmissionAck

DToDLab011-SubmissionAck

Trigger: When an item is created in Changes

Why Are We Doing This?

This flow does three things on submission: calculates the Risk score (because Power Apps cannot reliably calculate and store a derived value in the same Patch call), generates the ChangeID, and sends the acknowledgement. Doing this in a flow ensures the Risk and ChangeID are always set correctly, even if the app formula has an edge case.
  1. 1.Trigger: When an item is created — Site: IT Change Management, List: Changes.
  2. 2.Add a Switch action on the expression: concat(triggerBody()?['Impact'], "|", triggerBody()?['Likelihood']). Cases: "Critical|High" → Critical, "Critical|Medium" → Critical, "Critical|Low" → High, "High|High" → Critical, "High|Medium" → High, "High|Low" → Medium, "Medium|High" → High, "Medium|Medium" → Medium, "Medium|Low" → Low, "Low|High" → Medium, "Low|Medium" → Low, "Low|Low" → Low. Default: Medium. Set a variable varCalculatedRisk to the result.
  3. 3.Add a Compose action to build the ChangeID: concat("CHG-", formatDateTime(triggerBody()?['Created'], 'yyyyMMdd'), "-", padLeft(string(triggerBody()?['ID']), 3, '0')).
  4. 4.Add Update item action: Site: IT Change Management, List: Changes, ID: triggerBody()?['ID']. Set Risk = varCalculatedRisk, ChangeID = outputs('Compose').
  5. 5.Add Condition: triggerBody()?['AffectsPersonalData'] is equal to true. If yes: Send an email to f.alhassan@contoso.co.uk: "Data Protection Review Required: Change [ChangeID] — [Title] affects personal data processing. Please review."
  6. 6.Add Send an email action: To: triggerBody()?['RequesterEmail']. Subject: "Change Request Received: " & outputs('Compose'). Body: "Your change request has been received. Change ID: [ChangeID]. Title: [Title]. Risk: [Risk]. Status: Draft. The Change Administrator will review your request and contact you if further information is needed."
  7. 7.Add Post a message in a chat or channel action: Team: IT Team, Channel: IT Changes. Message: "New change request: [ChangeID] — [Title] — Risk: [Risk] — Submitted by: [RequesterName]".

Flow 2 — DToDLab011-ApprovalFlow

DToDLab011-ApprovalFlow

Trigger: When an item is modified in Changes

Detecting Status Changes

The trigger fires on every modification to the Changes list. You must check whether the Status field specifically changed to "Approval". Use the Get changes for an item or a file (properties only) action, or use the PreviousStatus workaround: add a PreviousStatus column to the Changes list and check whether Status = "Approval" AND PreviousStatus <> "Approval".
  1. 1.Trigger: When an item is modified — Site: IT Change Management, List: Changes.
  2. 2.Add Get changes for an item or a file (properties only) action. Site: IT Change Management, List: Changes, ID: triggerBody()?['ID']. Since: triggerOutputs()?['body/Modified'] (previous modification time).
  3. 3.Add Condition: Status has changed AND new Status is equal to "Approval".
  4. 4.If yes: Add Send an email action to the Approver. To: triggerBody()?['Approver/Email']. Subject: "Approval Required: Change " & triggerBody()?['ChangeID']. Body: "Change [ChangeID] — [Title] requires your approval. Risk: [Risk]. Please open the IT Change Management app to review the implementation plan, rollback plan, and record your decision."
  5. 5.Add Post a message in a chat or channel action to the Approver. Message: "Action required: Change [ChangeID] — [Title] is awaiting your approval. Risk: [Risk]."

Flow 3 — DToDLab011-DecisionUpdate

DToDLab011-DecisionUpdate

Trigger: When an item is modified in Changes

  1. 1.Trigger: When an item is modified — Site: IT Change Management, List: Changes.
  2. 2.Add Condition: ApprovalDecision is not empty AND Status has changed from "Approval".
  3. 3.Add Switch on ApprovalDecision:
  4. 4. — Case "Approved": Send email to RequesterEmail: "Your change [ChangeID] — [Title] has been approved by [Approver]. It is now scheduled for [PlannedStart]. You will receive a notification when implementation begins."
  5. 5. — Case "Rejected": Send email to RequesterEmail: "Your change [ChangeID] — [Title] has been rejected. Reason: [ApprovalNote]. The change has been returned to Draft status. Please review the rejection reason and resubmit if appropriate."
  6. 6.In both cases: Post a message to the IT Changes Teams channel with the decision.

Flow 4 — DToDLab011-ImplementationReminder

DToDLab011-ImplementationReminder

Trigger: Scheduled — daily at 07:00

  1. 1.Trigger: Recurrence. Interval: 1. Frequency: Day. At: 07:00. Time zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, London.
  2. 2.Add Get items action: Site: IT Change Management, List: Changes. Filter query: Status eq 'Scheduled'.
  3. 3.Add Apply to each on the items.
  4. 4.Inside the loop: Add Condition. Expression: and(greaterOrEquals(items('Apply_to_each')?['PlannedStart'], utcNow()), lessOrEquals(items('Apply_to_each')?['PlannedStart'], addHours(utcNow(), 24))). This checks: PlannedStart is in the next 24 hours.
  5. 5.If yes: Send email to Assignee/Email. Subject: "Implementation Reminder: Change " & items('Apply_to_each')?['ChangeID']. Body: "Reminder: Change [ChangeID] — [Title] is scheduled to start at [PlannedStart]. Implementation Plan: [ImplementationPlan]. Rollback Plan: [RollbackPlan]. Please open the IT Change Management app to begin implementation."
  6. 6.Add Configure run after on the email action to handle failures gracefully (continue on failure, log the error).

Flow 5 — DToDLab011-WeeklySchedule

DToDLab011-WeeklySchedule

Trigger: Scheduled — every Friday at 08:00

  1. 1.Trigger: Recurrence. Interval: 1. Frequency: Week. On these days: Friday. At: 08:00. Time zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, London.
  2. 2.Add Get items action: Site: IT Change Management, List: Changes. Filter query: Status eq 'Scheduled' and PlannedStart ge '@{utcNow()}' and PlannedStart le '@{addDays(utcNow(), 7)}'.
  3. 3.Add Condition: length(body('Get_items')?['value']) is greater than 0.
  4. 4.If yes: Add Create HTML table action from the items. Columns: ChangeID, Title, Service, Risk, PlannedStart, PlannedEnd, Assignee/DisplayName.
  5. 5.Send email to s.obi@contoso.co.uk. Subject: Weekly Change Schedule — @{formatDateTime(utcNow(), 'dd MMM yyyy')} to @{formatDateTime(addDays(utcNow(), 7), 'dd MMM yyyy')}. Body: HTML table of scheduled changes.
  6. 6.If no: Send email to s.obi@contoso.co.uk. Subject: "Weekly Change Schedule — No changes scheduled". Body: "No changes are scheduled for the coming week."

Monitoring Flow Run History

After go-live, check the run history of all 5 flows daily for the first week:

  1. 1.Navigate to Power Automate → My flows.
  2. 2.Select each flow. Select the 28-day run history.
  3. 3.Look for failed runs (red X). Select a failed run to see which action failed and the error message.
  4. 4.Common failures: expired connection (re-authenticate), list name changed (update the action), email address not found (check the recipient).
  5. 5.Set up a flow failure notification: in each flow, add a Scope action wrapping all steps. Add a Configure run after action after the Scope set to run on failure. Send an email to t.reeves@contoso.co.uk: "Flow [flow name] failed. Please check the run history."

Stage Complete — What You Now Have

  • ✓5 flows built and active
  • ✓DToDLab011-SubmissionAck: risk calculation, ChangeID generation, DPO notification, acknowledgement, Teams notification
  • ✓DToDLab011-ApprovalFlow: detects status change to Approval, notifies Approver by email and Teams
  • ✓DToDLab011-DecisionUpdate: notifies requester of Approved or Rejected decision
  • ✓DToDLab011-ImplementationReminder: daily check for changes starting in next 24 hours
  • ✓DToDLab011-WeeklySchedule: Friday morning schedule summary to Sandra Obi
  • ✓Flow failure notification pattern documented
NextSecure

Need more help with the concepts?

Visit DosToDigital for guides, templates, and deeper explanations.

DosToDigital
DToD Labs

Learn it. Build it. Make it work.

A DosToDigital Project

About DToD Labs

Practical technology learning for Microsoft 365 and Power Platform. Build real business solutions from real business problems.

Learn the concepts at DosToDigital. Put them into practice at DToD Labs.

DToD Labs provides practical learning projects for educational purposes. Microsoft services, interfaces, licensing and product capabilities change over time. Always check current Microsoft documentation and licensing before implementing a solution in a production environment. All organisations, business scenarios and data used in DToD Labs are fictional. Learners should not use confidential employer, customer or personal information when following DToD Labs exercises.

© 2026 DToD Labs — A DosToDigital Project