Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - AI Builder
Answered

Query on validating extracted fields (using Ai builder) into SharePoint list

(0) ShareShare
ReportReport
Posted on by 147

Hello

 

I have created the below which reads invoice attachments sent via email and extracts certain fields such as invoice number etc and stores the data into a SharePoint list. I have tried placing a condition as a test after the "extract info" step (currently not showing) to only update SharePoint if the invoice number was below a certain number but it skips updating SharePoint but doesn't return an error on the flows page. Please can someone advise where i'm going wrong? Apologies if i don't reply as going on a/l returning 10/10.

 

AVFC_0-1695999154721.png

 

Categories:
  • AVFC Profile Picture
    147 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    @cchannon Got to say a big thanks for all your help on this and i've now learnt some of the quirks of Power Automate 😉 It's now working as i expected.

  • AVFC Profile Picture
    147 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    No i didn't (see below) 😬

    AVFC_0-1697126501500.png

    So i should you use the same input in the compose and replace the invoice number value in condition 2. Will give it a try and let you know. Thanks for your continued help 🙂

  • Verified answer
    cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Did you use the Compose output in Condition 2 instead of Invoice Number?

  • AVFC Profile Picture
    147 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Hello

     

    So just tried your suggestion but got the same error with condition 2 as above. 

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Yes, that's the one. So this is another quirk of Power Automate: the two tabs (Expression and Dynamic Content) give you different capabilities. Expression is where you find functions and operations, but you cannot find variables there. Dynamic Content is where you find variables, but you cannot find functions there. 

     

    So what you do is pick the Int expression, put your cursor inside the parenthesis, then go over to the Dynamic Content tab and insert your variable.

  • AVFC Profile Picture
    147 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Do i use the conversion function for Int as below within my compose? If so how do i place my parameter invoice value from my AI model into that as when i type invoice number value nothing comes up?

     

    AVFC_0-1697034188869.png

     

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Yeah, what you're seeing there is just inconsistency from PowerAutomate in how it present data types. It doesn't put quotes around strings so it can be easy to think they are numbers when they aren't. In your compose, try wrapping the input in the function Int() to force Power Automate to read it as a number, then use the output of your Compose as the input in your Condition.

  • AVFC Profile Picture
    147 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    Thanks for the reply @cchannon 

     

    So i added a compose step (using the Invoice number value from my AI builder) before my 2nd condition as below:

     

    AVFC_0-1697027182251.png

    So i would expect the flow to skip updating my SP list as the invoice number value detected on the email attachment is below 2 mil. Instead i got the below error saying condition 2 has failed. I don't get why it's complaining that my parameter types don't match?

     

    AVFC_1-1697027516513.jpeg

     

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Query on validating extracted fields (using Ai builder) into SharePoint list

    There are lots of reasons why that condition (the invoice number logic) might be returning false when you expect it to be true.

     

    What I normally do when I am debugging something like that is I add a Compose step just before the Condition. I then copy the value I am checking in the Condition and paste it into the Compose. Then I run a test execution of the flow. It will still behave the same way (Compose should change nothing), but now in the flow execution record you will be able to click on the Compose step and inspect the value. This is usually a very helpful first step in debugging.

     

    Give this a try, then let us know if it helps!

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1