For the lookup you can use a Filter Query in a Get Items field. For that Filter Query you can use the Folder Path property and split on the '/' character.
I assume the first level of your library looks like the below, correct?
In that case you can always use the second item with the below OData filter
split(triggerBody()?['{Path}'], '/')[1]
Happy to help out 😁
I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
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.