I'm trying to build a schedule flow to send an email when an estimated close date is within the next 14 days. The XML works fine and pulls through the correct data in Fetch XML Builder but doesn't work in the power automate schedule flow. I've used the XML from the view i want to look at in Dynamics and it shows the correct opportunities in the builder so not sure why it isn't working in the flow.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" >
<entity name="opportunity" >
<attribute name="name" />
<attribute name="estimatedvalue" />
<attribute name="estimatedclosedate" />
<attribute name="ownerid" />
<attribute name="statuscode" />
<order attribute="estimatedclosedate" descending="false" />
<filter type="and" >
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="estimatedclosedate" operator="next-x-days" value="14" />
</filter>
<attribute name="opportunityid" />
</entity>
</fetch>
Any suggestions would be appreciated as I'm not experienced in XML and seem to be going round in circles trying to work it out.
Thanks