8. Build the Parking Request Power Automate Flow

8. Build the Parking Request Power Automate Flow

In this Power Up Challenge walkthrough, we take our *Parking Review Model App* to the next level by integrating it with *Power Automate*. You’ll build a complete *capacity enforcement flow* that limits the number of parking requests per day and sends notifications when the limit is reached. Along the way, we:
* Format and convert dates properly
* Enforce submission cutoff times
* Retrieve linked *Vehicle* records automatically
* Apply logic using key expressions in *Power Automate*

⚠️⚠️ *IMPORTANT – TIMEZONE WARNING* ⚠️⚠️

➤ Always *use your own local timezone* (e.g., ‘Eastern Standard Time’, ‘Central Standard Time’, etc.)
➤ All codes shown use ‘Central Standard Time’ — update accordingly if you’re in a different region
➤ Inaccurate timezone usage may result in incorrect filtering or false capacity rejections

### 🎯 **In Part 8, we:**

* Build the *Automated Capacity Check flow* that runs when a Parking Request is added
* Fetch the *Vehicle Info* using `Get a row by ID`
* Convert and store the *ParkingRequestDateTime* using Power Automate variables
* Apply a *daily capacity filter* across requests using a dynamic `List Rows` query
* Use a condition to check if capacity exceeds `15`
* Send a *capacity full email* if the limit is reached
* Enforce a *cutoff time of 5PM* using time-based logic
* Confirm valid entries with a success notification

### 🔧 *Key Expressions Used*

powerautomate
// Extract and format the request datetime from the trigger
formatDateTime(triggerOutputs()?[‘body/patc_parkingrequestdatetime’], ‘yyyy-MM-ddTHH:mm:ssZ’)

// Build a dynamic daily filter (UTC → CST)
patc_parkingrequestdatetime ge @formatDateTime(convertTimeZone(utcNow(), ‘UTC’, ‘Central Standard Time’), ‘yyyy-MM-ddT00:00:00Z’)
and
patc_parkingrequestdatetime le @formatDateTime(convertTimeZone(utcNow(), ‘UTC’, ‘Central Standard Time’), ‘yyyy-MM-ddT23:59:59Z’)

// Format just the start of day
formatDateTime(convertTimeZone(utcNow(), ‘UTC’, ‘Central Standard Time’), ‘yyyy-MM-ddT00:00:00Z’)

// Extract hour from the request date for cutoff comparison
int(formatDateTime(convertTimeZone(variables(‘varRequestDate’),’UTC’,’Central Standard Time’),’HH’))

// Format time for human-readable display
formatDateTime(
convertTimeZone(variables(‘varRequestDate’), ‘UTC’, ‘Central Standard Time’),
‘hh:mm tt’
)

### ✅ *You’ll build:*

* An end-to-end *flow* that enforces the 15-request cap
* Time-based enforcement for cutoffs
* Human-readable email confirmations with formatted times
* Dynamic condition branches using variables and filters
* Reusable OData filters for capacity checks

### *Power Up Challenge 2025/26 Walkthrough Series – Parking Challenge*

https://youtu.be/xz1ULz2iuns – (You are here)

*MVP Complete.*

💡 *Join the challenge and build your Parking Inspection App from start to finish with the Power Platform!*