Burgers & Bytes
December 30, 2025

How AI Builder helped me solve a very practical Power Platform problem

Dec 30, 2025  •  5   • 975 
Table of contents

AI Builder is a feature within the Microsoft Power Platform that allows you to create and use AI models to automate and optimize business processes. You’ll often see impressive demos: invoices, receipts, images, predictions.

But this blog is not about a complex AI use case. It’s about a very down-to-earth, real-life problem that you may recognize.

And that’s exactly why I’m sharing it.

Context: AI-first… but still practical

At the company I work for, we have an “AI-first” strategy. Sounds great (and it is) but if I’m honest, my first instinct is often:

Can I solve this with the Power Platform techniques I already know?

Expressions. Conditions. Switch cases. Maybe a bit of regex if I’m feeling brave.

In this scenario, I tried. And quickly realized: this would become ugly, fragile, and hard to maintain.

That was the moment where AI actually became the simplest solution.

The real-life scenario

We receive lines of free-text input coming from users, emails, or uploads. Each line describes a commercial agreement or contribution and somewhere in that text, a period is mentioned.

Examples like: The scenario is a situation in which the input are line of text with multiple details in it.

If you work in finance, retail, or operations: you’ve seen data like this a lot.

The challenge

From each line, we needed to extract two clean values:

The desired outcome

The result examples for each lines should be like displayed in the table below.

InputOutput: from dateOutput: to date
Retailer A 42204504 contribution 4% Q3 20252025-07-012025-09-30
Retailer B 4224054045 promotional allowance 2% Oct-Nov 25 Region X2025-10-012025-11-30
Retailer C DK 047891233 bonus Nov252025-11-012025-11-30
Retailer D 404204042 anniversary bonus 25 year *20262026-01-012026-12-31
Retailer D 57278287007 recycling 0,25% jan-feb252025-01-012025-02-28
Retailer F 40646707 partner alliance EH 2% Q4 20242024-10-012024-12-31
Retailer G 4564080/456045670 online category 1% Q3'252025-07-012025-09-30
Retailer G 176104/70930118 online 1% Q1'252025-01-012025-03-31
Retailer H FR 0452424524 dynamic 3% 2024 Concept Y2024-01-012024-12-31

Why classic Power Platform logic falls short

Yes, technically you could solve this with:

But take a step back and think about what that solution would actually look like in practice. Would the flow still be readable a few months from now? Would it be easy to extend when a new date format shows up? And when another developer opens the flow for the first time, would they understand it?

For me, the answer to all of those questions was a very clear no.

Enter AI Builder – Custom Prompts

Instead of building logic for every edge case, I used AI Builder → Run a prompt.

The idea was simple:

Let the AI interpret the text like a human would and return structured dates.

The prompt

The key was being very explicit about:

Task
Determine the correct "from date" and "to date" based on the provided information.

Input Data (JSON Format)
{
  "description": "string" 
}

the input:
/jsoninput 

Processing Logic (Priority Order) 

1. Identify Period Indicators (if no explicit dates found) 
Look for these keywords in the description: 
"Q3'25", "okt25", "okt-nov25" 
Quarter indicators: - "Q1", "Q2", "Q3", "Q4", "1st quarter", "2nd quarter", etc. → Use quarter date ranges 
Half-year indicators: - "H1", "H2", "S1", "S2", "first half", "second half" → Use half-year date ranges 
Year indicators: - Year mentioned (e.g., "2025" or "25" )  

Additional Considerations 
- Account for leap years (February 29) 
- Use correct days per month (28/29/30/31) 
- Handle various date formats and separators 

Output Format 
{ 
"from_date": "YYYY-MM-DD", 
"to_date": "YYYY-MM-DD"
 } 

Examples
Example 1 - quarterly: 
Input: { "description": "Supermarkt 12345345 bonus 4% Q325
" }
Output: { "from_date": "2025-07-01", "to_date": "2025-09-30" } 

Example 2 - multiple months: 
Input: { "description": "Bakker 654321 extra 2% okt-nov25 Hoog " }
Output: { "from_date": "2025-10-01", "to_date": "2025-11-30"} 

Example 3 - one month: 
Input: { "description": "Slager 123789 party 1,5% nov25 Laag " } 
Output: { "from_date": "2025-11-01", "to_date": "2025-11-30" } 

Output Requirements 
- Return ONLY valid JSON 
- No explanations or additional text 
- Ensure all dates are in YYYY-MM-DD format 
- Validate before returning

Using it in Power Automate

The flow itself is very simple:

  1. Run a prompt (AI Builder)
  2. Pass the description text
  3. Receive clean JSON
  4. Parse JSON
  5. Use from_date and to_date anywhere in the flow

Because the prompt is forced to return valid JSON, parsing is trivial and reliable.

flowactions

Output for run a prompt:

prompt

Output for ParseJSON:

output

What I learned

Talking to colleagues and reading similar examples, a few patterns stand out:

Final thought

This is not a groundbreaking AI solution. It won’t end up in a keynote.

But it removed complexity, made the flow cleaner, and saved future maintenance time.

And honestly? Those are often the best AI wins.

If you’re working with semi-structured text and you’re forcing Power Automate to behave like a language parser, it might be time to let AI do what it’s actually good at.

comments powered by Disqus
Empowering productivity - one blog at a time!