Your instinct is right — relying only on the agent's instructions for default date logic is not reliable, because by default, each input is set to "Dynamically fill with the best option": the agent tries to populate the value from available context, and if no appropriate value is found, it generates a question to ask the user. Microsoft Learn Instructions alone don't guarantee the fallback will always be applied consistently.
Here are the two recommended approaches:
Option 1 — Override the input directly with a Power Fx formula (simplest fix)
On your flow's tool configuration in Copilot Studio, for the StartDate and EndDate inputs:
Select "Set as a value" under How will the agent fill this input? and enter the desired value. Microsoft Learn You can use a Power Fx formula to compute yesterday and 7 days ago dynamically:
EndDate → Text(DateAdd(Today(), -1, TimeUnit.Days), "yyyy-MM-dd")
StartDate → Text(DateAdd(Today(), -7, TimeUnit.Days), "yyyy-MM-dd")
This makes the default deterministic — the agent never needs to ask the user for these values unless you explicitly want it to.
Option 2 — Create a dedicated Topic (more control)
Build a topic that triggers when the user asks for data without specifying dates. Inside the topic:
- Add a Condition node: check if the user mentioned a date in their message
- If no date → use a Set Variable node with the Power Fx formulas above to assign
StartDate and EndDate
- If date mentioned → use a Question node to capture it
- Then call the flow with the pre-populated variables
When you define a tool in Copilot Studio, the agent orchestrator handles input collection at runtime — but you can also call tools explicitly from within topics, giving you full control over how inputs are filled. Microsoft Learn
One important note on date types
You can't configure agent flow inputs as Date & Time directly — doing so causes a TriggerInputSchemaMismatch error. The recommended pattern is to pass dates as strings and handle the conversion inside the flow itself. Veronique\\\'s Blog Make sure your flow inputs are typed as Text, not Date.
Recommendation: Start with Option 1 — it's the quickest fix and removes the ambiguity entirely. Use Option 2 if you need to ask the user for dates when they explicitly mention them while keeping the default otherwise.
Hope this helps!
Paolo
✅ Did this solve your issue? → Accept as Solution
👍 Partially helpful? → Click "Yes" on "Was this reply helpful?" or drop a Like!
Want more tips on Power Platform & AI? Follow me here:
🔗 LinkedIn: https://www.linkedin.com/in/paoloasnaghi/
▶️ YouTube: https://www.youtube.com/@BeyondThePlatforms
📸 Instagram: https://www.instagram.com/beyond_the_platforms/
🌐 Website: https://www.beyondtheplatforms.com/