@iandavies Using a Filter Array action as you've done in your first screenshot is more efficient than using an Apply to Each and Condition action.
I'm assuming you've used the Filter Array action to filter out files with a PDF extension. If that is the case you will then loop though the items from your Filter Array action. Please note: I'm using the Classic Designer as the New Designer still has a few bugs.

To get the identifier of the Filter Array item being looped through, you need an expression. Refer to this section of a YT Tutorial I uploaded on how to get dynamic content from a Filter Array action.
Review the output of the Filter Array action—locate the dynamic content key of the dynamic content you want to return. In this case it's {Identifier}.

Insert an expression into the File Identifier field.

Between the single quotes enter the dynamic content key.

Hope this helps!
To learn more about how to use the Filter Array action, please refer to this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?
In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
1️⃣ Cross-Referencing Data
2️⃣ Filtering by Key
3️⃣ Substring Matching
Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.
IN THIS VIDEO:
✅ 3 Ways to Use the Filter Array Action
✅ How to use the Scope Action to Group Actions
✅ How to Check the Number of Items returned from a Filter Array Action
✅ How to Cross-Reference Data in Excel with a SharePoint List
✅ How the Filter Array Action Works
✅ How to Access the Dynamic Content from a Filter Array Action
✅ How to Filter Items by a Key
✅ How to Filter Items by Matching a Substring
✅ How to Use Multiple Conditions in a Filter Array Action