cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AutomatingMyJob
New Member

Building flow to find string in converted PPTX doc

Trying to search text of PPTX for specific string (tech blueprint). Since you can't seem to use get file content alone as it returns binary I'm using Convert to PDF & Get PDF Text Layer

 

@contains(toLower(outputs('Get_PDF_Text_Layer')?['body/TextLayer']),'tech blueprint')

 

Says expression isn't valid, any suggestions?

2 REPLIES 2
AutomatingMyJob
New Member

So I changed to 

contains(tolower(outputs('Get_PDF_Text_Layer')?['body/TextLayer']),'tech blueprint'

and it saves, but then I get error:

InvalidTemplate. Unable to process template language expressions for action 'Check_for_Tech_Blueprint' at line '1' and column '30734': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Boolean'.'.

 

Of course I'm trying to capture any case of the string with the ToLower expression.

rrovira
Microsoft
Microsoft

Hello, @AutomatingMyJob!

 

I could be wrong, but I think the "@contains" is what's returning the boolean and the Get PDF Text Layer requires a "A Base64 encoded representation of the PDF file to be processed." as you can see here Get PDF Text Layer – Encodian Customer Help. Could you try creating a variable within a conditional that uses the  @contains(tolower(outputs('Get_PDF_Text_Layer')?['body/TextLayer']),'tech blueprint')

 

I'll keep researching, if I find anything useful I'll be sure to post it immediately!

Cheers

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,799)