Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

Gathering data from XML file triggering the flow

(0) ShareShare
ReportReport
Posted on by 2

Hello 🙂

I have a form created with InfoPath that's submitted to a designated folder as xml. This is a trigger for the flow to grab the item and attach it to email that's sent.

 

With Nintex workflow it was really easy to also get some data from the form itself via xpath address... I fail to find an option to do so using the flow.

 

Has anyone managed to gather a data from the file using the flow?

PS: I apologize if I hijacked an incorrect topic.

  • v-bacao-msft Profile Picture
    on at
    Re: Gathering data from XML file triggering the flow

     

    Hi @Sanel ,

     

    Any updates?

     

    Best Regards,

  • v-bacao-msft Profile Picture
    on at
    Re: Gathering data from XML file triggering the flow

     

    Hi @Sanel ,

     

    Could you provide an sample data of Xml data? What you are currently offering seems to be a part of it.

     

    Best Regards,

  • Sanel Profile Picture
    2 on at
    Re: Gathering data from XML file triggering the flow

    Thank you @v-bacao-msft 🙂

     

    I think you're pointing me in the right direction. I use the xml in compose as input/output however, seems I'm off the track with compose 2 with the following error:

     

    Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '2654': 'The template language function 'xpath' expects two parameters: an XML object and an XPath expression. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#xpath for usage details.'.

     

    Snippet of my XML

    <?xml version="1.0" encoding="utf-8"?>
    <?mso-infoPathSolution name="*makingItShort*" solutionVersion="1.0.0.412" productVersion="16.0.0.0" PIVersion="1.0.0.0" href="*makingItShort*"?>
    <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.4"?>
    <?mso-infoPath-file-attachment-present?>
    <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" *makingItShort xml:lang="en-GB">
    	<my:AssociatesDataAuto>
    		<my:*PeoplePicker>
    			
    		<pc:*Person xmlns:*pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"><pc:*DisplayName>Name, Surname</pc:*DisplayName><pc:AccountId>i:0#.f|membership|name@name.net</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:*Person></my:*PeoplePicker>
    		<my:UnableToFindAssociate>false</my:UnableToFindAssociate>
    		<my:FirstName>Variable_I_Want</my:FirstName>

     

    Snippet of my Compose 2

    xpath(xpath(xml(outputs('Compose')), '//*[local-name()="myFields"]/*[local-name()="AssociatesDataAuto"]/*[local-name()="FirstName"]/text()')[0])

    I'll try to play a bit to see where I go wrong, as this is new to me 🙂

  • v-bacao-msft Profile Picture
    on at
    Re: Gathering data from XML file triggering the flow

     

    Hi @Sanel ,

     

    Currently, MS Flow does not support InfoPath connector, and cannot directly obtain the XML file in the designed folder.

    If it can be issued as an attachment, you could use the existing features of Flow to process this XML data.

    It should be noted that only Attach file can be used to finally get the contents of the attachment in Flow.

     

    What is your current progress? There are a lot of threads in the community that deal with attachment content and handle XML data.

    Please refer to the following thread and see if it helps:

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/XML-convert-to-other-XML-format/m-p/271568#M23570

    https://powerusers.microsoft.com/t5/Connecting-To-Data/xPath-parsing-noob/td-p/345459

    If you have any questions, just ask.

     

    Best Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics