Moving files in OneDrive using mapping

Hi Make community! :wave:

I’m working on setting up a workflow to organize my invoices and could use some help with the file moving functionality in OneDrive.

Here’s my setup:
All my scanned invoices initially land in a “_scan” folder. I want to automatically move these files to different folders based on the supplier name.

I’ve tried a few approaches but can’t seem to get it working:

  1. First, I attempted to simply move the file to the parent folder using /../{{3.parentReference.id}} as the path, but even though the scenario runs successfully, the file doesn’t move.
  2. I also tried moving the file to a specific subfolder using {{3.parentReference.id}}/"new folder", but no luck there either.

I feel like I’m missing something basic about how the file paths work in OneDrive with Make. tried several steps, looked for examples or other topics on similar matters, but no clue…
Has anyone dealt with similar dynamic file moving operations? Any pointers would be greatly appreciated!

Thanks in advance for your help! :pray:

Hey Jonathan,

OneDrive uses folder IDs, not their names to identify them. If you navigate to the corresponding folder in your browser you can see its ID in the address bar. That one should work for your automation.

Thank you Stoyan. This helps a lot indeed.

Now if I want to search for a specific folder, i’ve tried using the Query Search, but I don’t get to figure out how that feature works.

For example, I work in folder “/_scans/”, and in this folder, several ones exist, lets name them “new1” and “new2”.

Based on a previous request, the workflow needs to move the files in the specific “new2” folder, how could I make that happen ?

Failed :

, but the module returns the following message :

Any ideas on how to make it work ?

I am not sure what could be causing this error. The search module is working fine in my scenarios with a similar setup - I am searching for folders with a specific name.

Usually 500 errors are server side issues. Maybe something with the permissions of the user you are using for the connection not being able to access these folders?

The user i’m using is my personal login for my personal drive. I didn’t see any particular setting appearing at the login screen when creating the connection with onedrive.

Note that when logging in, I just clicked on Create a Connection, no Connection name or Advanced Setting used.

Would you have a path for me to dig in ?

Also, How can I check if I have the right permissions ?
Isn’t it weird I can “search files/folders” using the module, but not searching for specific files/folders when I specify a name ? I can’t understand why it wouldn’t be the same permission setting.

Also @Stoyan_Vatov , when trying this, did you use a personal or business Microsoft 365 account ?

I find it quite difficult for something that is supposed to be accessible for most.


EDIT : I created a business account (since I’ve been trying with my M365 personal one so far), and now it’s not about permission but yet another [500] error : { “The call failed, please try again.” ###### Origin OneDrive }

Getting fed up lol.


EDIT 2: After a few hiccups, I got to make it work on the business account side.

However for the personal account, I still receive the “[500] Unable to find target address (Microsoft.MicrosoftSearch,MSA,False)” message.

Note that in the GRAPH EXPLORER I got to unlock the permission allowing for the GET https://graph.microsoft.com/v1.0/me/drive/root:/_scans:/search(q='"new2"') request to be proceeded.

Since the request worked for a MS365 Personal Account in the Graph Explorer, May I now conclude there is something going on by the side of the permissions allowed to MAKE ?

After extensive testing with the Graph Explorer and Make’s API Call module, I’ve discovered important differences:

  1. Through Graph Explorer tests:

    • With Personal Account: Search requests (/search(q='foldername')) return empty results for folders that definitely exist
    • With Business Account: The same search requests successfully find folders
  2. With Make’s API Call module:

    • No 500 errors when properly formatted
    • Personal Account: Same behavior as Graph Explorer - empty results when searching for folders
    • Business Account: Successfully finds folders
  3. Key findings:

    • The search functionality in Microsoft Graph API seems to have limitations specifically for folders in Personal accounts
    • The error “[500] Unable to find target address (Microsoft.MicrosoftSearch,MSA,False)” appears to be related to this limitation
    • Note the “MSA” in the error refers to “Microsoft Account” (personal accounts)

Going to work on point 4:

  1. Working solution for Personal accounts:
    • Instead of using “Search folder/file” module, use “List Files/Folders” on the parent folder
    • Then filter the results in Make to find the specific folder

This appears to be an API limitation rather than a Make-specific issue.

Any Thoughts @Michaela @samliew ?

For technical issues like this, directly contacting support can often lead to a faster resolution. They have access to internal tools and resources, which allows them to investigate more thoroughly than what you have access to.

You can open a new ticket here, or if you are unable to login for some reason, you can create another new free account to access the ticketing system (which is only available to logged-in users). After submitting a new ticket, you will receive an automatic confirmation email with the subject “Ticket Created” in the subject. If you do not receive this, try sending the ticket again.

If you manage to get your issue resolved with support, we’d still love to hear about it! Sharing your solution on the forum can help others facing similar problems.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

@samliew thank you very much for this quick reply !

I will definitely open a new ticket and keep the community posted about that.

Hence also why I kept track of what I tried. I’m a 90’s kid, forum was my hood back in the 2000’s haha.

Thanks again for your help (this helps!) and will keep you posted about that.

2 Likes

As promised, I come back up after more info from the technical team.

Here’s the message of the support :

Can you please confirm if you’re using your personal OneDrive account with Make?
We have investigated this for other users, and our development team has informed us that when we search for the files and folders using the OneDrive - Search files/ folders module using a query, we are making a request to the Microsoft - /search/query endpoint which requires Files.Read.All permission

Since personal Microsoft accounts do not support Files.Read.All (only work/school accounts do), thus you cannot search across all OneDrive files using /search/query at the moment.

I hope this helps many people to avoided the hassle I had to go through

1 Like

Thanks for the update.

This is completely new information. The OneDrive page in the Make Help Centre does not mention this important info at all. Please let them know they should include it on that page.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Indeed.

I already shared the suggestion (that would have helped me lots at the beginning :joy:).

Thanks for your help @samliew