How to get Destination Folder Drive Item

Hey. I’m trying to get the Drive Item to be able to upload files from my computer to a shared point.
image

using the “Get File or folder” activity, it saves the variable to an 0365DriveRemoteItem

Screenshot 2024-04-03 095024

But when I put that “DriveFolders” variable into the upload file activity. It does not accept as its looking for a DriveItem not the 0365Drive Item. How do I get the folder from the sharepoint and convert that to a drive Item.

hi,

you are using a combination of integration service and classic activity package.

If you have set up integration service you can use the following activity to upload file.

In which you can use the folder picker to select your folders.

For classic you can use this activity to search for files.

Output is an array of DriveItems.

Mark this as solution if it works for you.

Hey. I used the Find Files and Folders activity, got the main folder but could not get the subfolder that I was actually looking for.

Even with just the main folder when I tried to upload the file, I kept on getting an “itemNotFound”
error.

image

image

@cemenike if you have integration service set up I would suggest to use that. In case, you don’t have a look at this link on how to structure your queries

Also look at the subfolder property for find files or folder activity if you want to search within a subfolder.
For the upload error cross check your file path as well as the path of the onedrive folder, and if you are trying to move fie from your onedrive to a different onedrive check permissions.

for the subfolder issue, I tried putting the folder and the subfolder in the Find Files And Folders Activity but it doesn’t seem to work
image

For the upload File activity, I think the Destination folder that i get from the Find File and Folder activity is flawed. Because when I run it with no destination Folder input, the file is successfully transferred over to the SharePoint
image

If destination path is left blank it will upload to root folder.
Could you send a screenshot of your logs for variable of find files activity. You could blur sensitive data.

Also, I see you have declared only the first property in the output field Could you also declare Results property its an array. Can you debug and send a screenshot of the array.

if you only want to search under root folder: provide no value for Subfolder and Query parameters, and if you want to search under a specific folder: Subfolder = “MyFolder” & Query = (no value).

Hey Muktadir. I eventually figured it out using the other activity “Upload Files”. Thank you for your help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.