Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Problem with condition and SharePoint

(0) ShareShare
ReportReport
Posted on by 67

Hello people! I'm using a flow for change name in some archives, and I do OCR on the archive and get the infos I want to use, but they should be placed in different folders, so I'm using a condition... The problem is that for some text I get from the OCR it works fine, but for the others, it returns InvalidTemplate contains expect to receive a string... Here is some screenshot from my flow, it is in portuguese, but I think it won't be a problem... 

victor_lion_0-1603894772371.png

I receive the OCR from HTTP, but also tried to use substring function, compose, and others, with no success

  • victor_lion Profile Picture
    67 on at
    Re: Problem with condition and SharePoint

    @v-litu-msft, just used string() on both flows, and it came out ok, will do some more tests, and I hope this is it, thanks for the help!

  • victor_lion Profile Picture
    67 on at
    Re: Problem with condition and SharePoint

    Hi @v-litu-msft

     

    I'm using string(), and also have used substring, to select just one line of the document:

    victor_lion_0-1603969659488.png

    This nested flow receives information from this flow:

    victor_lion_1-1603969771135.png

    But it appears to be random, as some of the files it goes well, and for some of them occurs the related error.

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Problem with condition and SharePoint

    Hi @victor_lion,

     

    It seems that the error is caused by the different data types input in the two sides of Condition action.

    If a string on one side of Condition action, an integer on the other side, the condition couldn't work. You should use int() function or string() function to convert one side, for example:

    Screenshot 2020-10-29 103817.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,695 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow