Stage 9 of 17

Stage 9 of 17

Automate

Two Power Automate flows handle the notification requirements. The first sends an immediate notification to the host when their visitor arrives. The second sends a daily summary of expected visitors to the reception team each morning.

Why Are We Doing This?

Automation removes the manual notification step that was the biggest pain point in the current process. Instead of the receptionist calling or emailing each host individually, the flow sends the notification automatically within seconds of check-in. This directly addresses F-002 and SC-002 (notification within 2 minutes).

Flow 1 — DToDLab004-HostArrivalNotification

DToDLab004-HostArrivalNotification

Trigger: When an item is modified (SharePoint) | List: Visits

This flow triggers every time a record in the Visits list is modified. It checks whether the Status has been set to "Arrived". If so, it sends an email to the host and updates the status to "Host Notified".

1

Trigger: "When an item is modified"

Site Address: your SharePoint site URL. List Name: Visits. This trigger fires on every modification to any Visits record.

2

Action: "Get item"

Site Address: your SharePoint site URL. List Name: Visits. ID: ID (dynamic content from trigger). This retrieves the full record including all fields.

3

Condition: Check Status = "Arrived"

Left: Status Value (dynamic content from Get item). Condition: is equal to. Right: Arrived (type this value). This prevents the flow from sending a notification on every modification.

Status Value — is equal to — Arrived
4

Yes branch: Send an email (V2)

To: HostEmail (dynamic content). Subject: Your visitor [VisitorName] has arrived. Body: see email template below.

To: @{body('Get_item')?['HostEmail']} Subject: Your visitor @{body('Get_item')?['VisitorName']} has arrived Body: Hello @{body('Get_item')?['HostName']}, Your visitor has arrived at reception. Visitor: @{body('Get_item')?['VisitorName']} Organisation: @{body('Get_item')?['VisitorOrganisation']} Expected time: @{body('Get_item')?['ExpectedArrivalTime']} Actual arrival: @{formatDateTime(body('Get_item')?['ActualArrival'], 'HH:mm')} Office: @{body('Get_item')?['Office']?['Value']} Please come to reception to collect your visitor. This is an automated notification from the Visitor Management system.
5

Yes branch: Update item — set Status to "Host Notified"

Site Address: your SharePoint site URL. List Name: Visits. ID: ID (dynamic content). Status Value: Host Notified. This updates the record so the flow does not trigger again for the same visit.

6

Scope: Failure handling

Add a Scope action around steps 4 and 5. Configure a 'Run after' on the Scope set to 'has failed'. Inside the failure scope, add a Send an email action to notify the reception team that the notification failed.

To: reception@contoso.co.uk Subject: ALERT — Visitor notification failed Body: The arrival notification for visitor @{body('Get_item')?['VisitorName']} (Visit @{body('Get_item')?['Title']}) could not be sent automatically. Please contact the host @{body('Get_item')?['HostName']} directly.

Common Mistake

The "When an item is modified" trigger fires on every modification — including when the flow itself updates the status to "Host Notified". Without the condition in step 3, the flow would trigger again on that update, creating an infinite loop. The condition is essential.

Testing the Flow

  1. 1.Open the Power Apps app. Navigate to Register Visitor. Register a test visit for today with your own email as the host.
  2. 2.Navigate to Today's Visitors. Find the test visit. Select Check In.
  3. 3.Open Power Automate → My flows → DToDLab004-HostArrivalNotification. Check the run history.
  4. 4.Verify the flow ran and succeeded.
  5. 5.Check your email. Verify the arrival notification was received.
  6. 6.Return to the Visits list. Verify the Status is now "Host Notified".

Flow 2 — DToDLab004-ExpectedVisitorsSummary

DToDLab004-ExpectedVisitorsSummary

Trigger: Recurrence — every day at 08:00 (Monday–Friday)

This flow runs every weekday morning at 08:00. It retrieves all visits expected today with status "Expected", creates an HTML table, and sends it to the reception team email address. If no visitors are expected, it sends a brief notification to that effect.

1

Trigger: Recurrence

Interval: 1. Frequency: Day. At these hours: 8. At these minutes: 0. Days of the week: Monday, Tuesday, Wednesday, Thursday, Friday.

2

Action: Get items (SharePoint)

Site Address: your SharePoint site URL. List Name: Visits. Filter Query: see expression below.

Filter Query: ExpectedDate eq '@{formatDateTime(utcNow(), 'yyyy-MM-dd')}' and Status/Value eq 'Expected'
3

Condition: Check if any visits were returned

Left: length(body('Get_items')?['value']). Condition: is greater than. Right: 0.

length(body('Get_items')?['value']) — is greater than — 0
4

Yes branch: Create HTML table

From: value (dynamic content from Get items). Columns: Custom. Add columns: Visitor Name (VisitorName), Organisation (VisitorOrganisation), Host (HostName), Expected Time (ExpectedArrivalTime), Office (Office/Value), Type (VisitorType/Value).

5

Yes branch: Send an email (V2)

To: reception@contoso.co.uk (or a Teams channel email). Subject: see expression. Body: see expression.

Subject: Expected visitors today — @{formatDateTime(utcNow(), 'dd/MM/yyyy')} Body: Good morning, The following visitors are expected today: @{body('Create_HTML_table')} This is an automated summary from the Visitor Management system.
6

No branch: Send an email (V2) — "no visitors today"

To: reception@contoso.co.uk. Subject: No visitors expected today. Body: Good morning, no visitors are expected today.

Beginner Tip

To test this flow without waiting until 08:00, use the "Test" button in Power Automate and select "Manually". The flow will run immediately using today's date. Verify that the email is received and the table contains the correct visits.

Common Failures and Fixes

Flow does not trigger at 08:00

Check the recurrence trigger timezone setting. Power Automate defaults to UTC. If your office is in BST (UTC+1), set the timezone to "(UTC+00:00) Dublin, Edinburgh, Lisbon, London" and adjust the hour accordingly.

Filter query returns no results even though visits exist

Check the date format in the filter query. SharePoint stores dates in ISO 8601 format (yyyy-MM-dd). The formatDateTime expression must match this format exactly.

HTML table is empty

Check the "From" field in the Create HTML table action. It must reference the "value" array from the Get items action, not the entire Get items output.

Flow Ownership and Co-ownership

Both flows must be owned by the IT Manager (Priya Mehta) or a service account, not by an individual employee. If the flow owner leaves the organisation and their account is deactivated, the flows will stop working.

Add the IT Manager as a co-owner on both flows: open the flow → Edit → Share → Add people → enter the IT Manager's email → select Co-owner.

Stage Complete — What You Now Have

  • ✓DToDLab004-HostArrivalNotification: 6 actions including condition, email, status update, and failure handling
  • ✓DToDLab004-ExpectedVisitorsSummary: 6 actions including recurrence, filter query, HTML table, and conditional email
  • ✓Testing steps for both flows
  • ✓Common failures and fixes documented
  • ✓Flow ownership guidance
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