I am currently working on a flow in Power Automate that is triggered when an invoice is uploaded to a specific SharePoint site. The goal of this flow is to extract two key pieces of information from the invoice: the Customer Name and the Invoice Date. Based on this information, I need to create a structured folder hierarchy as follows:
- Customer Name
- Invoices
- Year (Invoice Date)
- Invoices
While I have successfully set up the flow to create these folders, I am encountering a significant issue with the Send an HTTP request to SharePoint action, which I am using to check for the existence of the required folders (Customer Name, Invoices, and Year).
Here are the specifics of the problem:
- Folder Existence Check: The Send an HTTP request to SharePoint action correctly returns a 404 status code when the folders do not exist. However, this action causes the entire flow to stop when it encounters this error.
- Conditional Execution: To address this, I configured the Condition action to run regardless of whether the Send an HTTP request to SharePoint action is successful or has failed. Specifically, I set it to run after both is successful and has failed.
- Move File Action Issue: Despite the flow continuing after the HTTP request, I am encountering a problem with the Move file action. It fails to find the destination path, even though the folders were created in the earlier steps of the flow.
Given these challenges, I am seeking guidance on how to ensure the flow runs smoothly, especially regarding:
- Allowing the flow to proceed after a 404 status without causing interruptions.
- Ensuring that the Move file action correctly recognizes the newly created folder structure.
If anyone has experience with similar scenarios or can provide insight into resolving these issues, your assistance would be greatly appreciated.
Thank you in advance for your help!