I'm trying to capture attachments to emails sent to an email address and save them to a folder based on a reference in the subject line.
To do so, I'm looking to see if the string starting with "CO-" in the subject line corresponds to a document set in the target directory "CO-#####".
I then try to save the file in that directory in an "apply to each" attachment, but the dynamic content references in the "create file" keep changing. I have a dynamic content reference to the SharePoint Document Set title on the "Folder Path", and dynamic content for the Outlook 365 attachment for the saved file. But when I save or test the flow, the dynamic content for the Folder Path reverts to the "Title" referencing the Outlook 365 email.
This is my flow:
Here is how I set out the Create file:
The test is successful:
But after the test, the Folder Path dynamic content has switched to referencing the Outlook content, not the SharePoint content: