How can I retrieve the file ID when using the 'Copy and Rename file/folder' action in OneDrive?
I am using the Copy and Rename file/folder action in OneDrive, but the response only returns the status. In my journey, I need the file ID of the copied file for subsequent steps. To get the file ID, I currently have to use the List Children action and search the result in a Foreach loop, which makes the journey more complex. Is there a way to get the file ID directly in the response of this action?
0
-
The 'Copy and Rename file/folder' action in OneDrive uses an asynchronous API, which only accepts the file/folder copying request and doesn't return the file/folder ID in the response. To address this:
- Use the action to 'Asynchronously copy and rename file/folder'.
- The Status retrieval URL data pill can be used to check the status of the copying request.
- Use the 'Send new request' action of the HTTP connector to call this URL.
- We recommend adding a 5-second delay using the 'Delay' action in Scheduler by Quickwork before hitting the URL.
- Use the action called 'Get file/folder details from Path'. Once the URL returns the status as 'completed', you can use this action to retrieve the file/folder ID. Since you already have the file/folder path and name, this action will return the file/folder details, including the ID.
This way, you can simplify your journey without needing to manually search for the file ID.
0
Please sign in to leave a comment.
Comments
1 comment