Reputation: 667
I have an integration scenario where I need to pull documents from SharePoint Online and submit the content (PDF) to a downstream API. I'm using the When a file is created or modified in a folder trigger to pull documents from a SharePoint library. My question is whether there is a way to set a filter on the trigger so that only PDF documents are retrieved i.e. (*.pdf)?
Upvotes: 0
Views: 2409
Reputation: 15744
For this requirement, you can click "Settings" of your trigger.
And then add the expression @contains(triggerBody()?['{FilenameWithExtension}'], '.pdf')
to "Trigger Conditions".
After that, the logic app can just be triggered with file name which contains .pdf
.
=================================Upate==============================
You can change the expression to:
@contains(trigger().outputs?['headers']?['x-ms-file-name'], '.pdf')
Upvotes: 1