Cannot able Copy the file from folder to another

Hello, I am trying to copying the file from a folder and that folder containes an another folder . i want to copy that file and paste it to another folder

ERROR: Bad request - please check your parameters

Please share the workflow

Share the output returned by the last node

[

{

"createdDateTime": "2022-04-29T05:13:26Z",

"eTag": ""{62768349-C824-4AB4-8CDA-D52678CFC398},1"",

"id": "01GZO67JSJQN3GEJGIWRFIZWWVEZ4M7Q4Y",

"lastModifiedDateTime": "2022-04-29T05:13:26Z",

"name": "Order Booking",

"webUrl": "https://smcsmits-my.sharepoint.com/personal/smf_salesautomation_sanmiguel_com_ph/Documents/Order%20Booking/BeatRoute/Order%20Booking",

"cTag": ""c:{62768349-C824-4AB4-8CDA-D52678CFC398},0"",

"size": 0,

"createdBy": {

"application": {

"id": "18af71ed-16f3-4efa-8ae3-107a46649d3b",

"displayName": "BeatRoute Matrix"

},

"user": {

"email": "[email protected]",

"id": "a5c79bca-fd33-4cf6-a775-e9c119974060",

"displayName": "Sales Automation SMF"

}

},

"lastModifiedBy": {

"application": {

"id": "18af71ed-16f3-4efa-8ae3-107a46649d3b",

"displayName": "BeatRoute Matrix"

},

"user": {

"email": "[email protected]",

"id": "a5c79bca-fd33-4cf6-a775-e9c119974060",

"displayName": "Sales Automation SMF"

}

},

"parentReference": {

"driveType": "business",

"driveId": "b!n5849nByhUSUxpRyW8sGFVRF67fTTrdNtv0kzlLmw-Ckwc3sMAKTRI6pZ-dBxcUg",

"id": "01GZO67JSTD3RWBAONIJC2Q2IURIZV4354",

"path": "/drive/root:/Order Booking/BeatRoute"

},

"fileSystemInfo": {

"createdDateTime": "2022-04-29T05:13:26Z",

"lastModifiedDateTime": "2022-04-29T05:13:26Z"

},

"folder": {

"childCount": 0

},

"shared": {

"scope": "users"

}

},

{

"@microsoft.graph.downloadUrl": "https://smcsmits-my.sharepoint.com/personal/smf_salesautomation_sanmiguel_com_ph/_layouts/15/download.aspx?UniqueId=bb730680-3a57-4cf7-9d22-334a203ed374&Translate=false&tempauth=eyJ0eXAiOiJKV1QiL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CIsInR0IjoiMiIsInVzZVBlcnNpc3RlbnRDb29raWUiOm51bGwsImlwYWRkciI6IjIwLjE5MC4xNDUuMTcxIn0.MU14T3V5Vlh3cElSWjVuY3luQlhvTVlrM3ArdWVoR2N0akc5dFhnWlBZMD0&ApiVersion=2.0",

"createdDateTime": "2022-04-28T06:41:50Z",

"eTag": ""{BB730680-3A57-4CF7-9D22-334A203ED374},2"",

"id": "01GZO67JUAAZZ3WVZ265GJ2IRTJIQD5U3U",

"lastModifiedDateTime": "2022-04-28T07:03:27Z",

"name": "OrderBookingfresh-v2.xlsx",

"webUrl": "https://smcsmits-my.sharepoint.com/personal/smf_salesautomation_sanmiguel_com_ph/_layouts/15/Doc.aspx?sourcedoc=%7BBB730680-3A57-4CF7-9D22-334A203ED374%7D&file=OrderBookingfresh-v2.xlsx&action=default&mobileredirect=true",

"cTag": ""c:{BB730680-3A57-4CF7-9D22-334A203ED374},2"",

"size": 11409,

"createdBy": {

"user": {

"email": "[email protected]",

"id": "b6130e86-ac5c-4376-afb3-8fd9992bf5c4",

"displayName": "Fe Rowena T. Juntilla"

}

},

"lastModifiedBy": {

"user": {

"email": "[email protected]",

"id": "a5c79bca-fd33-4cf6-a775-e9c119974060",

"displayName": "Sales Automation SMF"

}

},

"parentReference": {

"driveType": "business",

"driveId": "b!n5849nByhUSUxpRyW8sGFVRF67fTTrdNtv0kzlLmw-Ckwc3sMAKTRI6pZ-dBxcUg",

"id": "01GZO67JSTD3RWBAONIJC2Q2IURIZV4354",

"path": "/drive/root:/Order Booking/BeatRoute"

},

"file": {

"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",

"hashes": {

"quickXorHash": "rdyqvg2d9U4E7GnBle/ayYaUd+A="

}

},

"fileSystemInfo": {

"createdDateTime": "2022-04-28T06:41:50Z",

"lastModifiedDateTime": "2022-04-28T07:03:27Z"

},

"shared": {

"scope": "users"

}

}

]

I AM TRYING TO COPY THE OrderBookingfresh-v2.xlsx INTO ORDER BOOKING FOLDER.

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hi @Farheen_I, welcome to the community!

I am sorry to hear you’re having trouble here. I gave this a quick go on my end and could reproduce the problem. From playing around with this it seems specifying both ID and name of the new parent are causing a conflict here.

When using only the ID of the new parent folder, the node runs fine and the OneDrive API doesn’t error:

Could you try specifying only the ID of the source file and the ID of the new parent folder?

Thanks @MutedJam for your help!
Id or path helped me to get rid of this error. And now it is working fine . Thank you so much ! :grinning:

1 Like

Sweet, glad to hear this works for you and thanks for confirming!