n8n - ✅(Solved) Fix Google Drive files not getting copy using URL [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28962Fetched 2026-04-24 06:13:06
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1labeled ×1mentioned ×1

Error Message

  1. Now select Url to copy, and run the node, getting error, in case of URL
  • error: all

Fix Action

Fixed

PR fix notes

PR #29025: fix(Google Drive Node): Support URL mode when copying files

Description (problem / solution / changelog)

Summary

Google Drive → File → Copy returns a 404 when the file is selected via URL mode. The copy operation reads the fileId resource locator with getNodeParameter('fileId', i) and takes .value directly. In URL mode that value is the raw https://drive.google.com/file/d/<ID>/view string rather than the extracted ID, so it ends up concatenated into /drive/v3/files/${url}/copy and Google responds with 404.

Every sibling file operation in the same directory (deleteFile, move, update, share, download) already uses the correct form:

const fileId = this.getNodeParameter('fileId', i, undefined, {
  extractValue: true,
}) as string;

That path triggers the GOOGLE_DRIVE_FILE_URL_REGEX extractor declared on fileRLC in packages/nodes-base/nodes/Google/Drive/v2/actions/common.descriptions.ts. This PR brings copy in line with the sibling pattern and keeps the existing resource locator around (as fileLocator) so the Copy of ${fileLocator.cachedResultName} fallback for the default name continues to work.

How to test

  1. Add a Google Drive node (v2), pick Resource = File, Operation = Copy.
  2. In the File selector, switch to URL mode and paste any share URL like https://drive.google.com/file/d/<ID>/view.
  3. Before the fix: request hits /drive/v3/files/https:%2F%2Fdrive.google.com%2Ffile%2Fd%2F<ID>%2Fview/copy and Google returns 404.
  4. After the fix: request hits /drive/v3/files/<ID>/copy and the copy succeeds.

Regression test

packages/nodes-base/nodes/Google/Drive/v2/test/file-copy-url-mode.workflow.json exercises URL mode against the existing shared nock mock (POST /drive/v3/files/123/copy). The test only passes if the regex extractor runs — verified locally by reverting the fix, watching the test fail, and re-applying it.

Out of scope

  • Open PR #28819 addresses the Copy of undefined default-name fallback when cachedResultName is missing (ID mode). The same cosmetic fallback is still imperfect in URL mode (cachedResultName is only populated by the list-mode picker), but that is orthogonal to the 404 fixed here and belongs in that separate PR's scope.
  • The analogous pattern in other Google nodes (Sheets, Docs) is not audited in this PR.

Related Linear tickets, Github issues, and Community forum posts

Closes #28962

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive.
  • Docs updated or follow-up ticket created. <!-- No user-facing docs change; behavior matches what the node already advertises for URL mode. -->
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

Changed files

  • packages/nodes-base/nodes/Google/Drive/v2/actions/file/copy.operation.ts (modified, +5/-3)
  • packages/nodes-base/nodes/Google/Drive/v2/test/GoogleDriveV2.workflow.test.ts (modified, +1/-0)
  • packages/nodes-base/nodes/Google/Drive/v2/test/file-copy-url-mode.workflow.json (added, +64/-0)
RAW_BUFFERClick to expand / collapse

Bug Description

Google Drive files getting copy using Id but copy with Url is not working.

Using ID

<img width="1456" height="739" alt="Image" src="https://github.com/user-attachments/assets/60912540-ed56-456c-958e-bfd2e1ef4103" />

Using URL

<img width="1465" height="732" alt="Image" src="https://github.com/user-attachments/assets/e664a0dd-f9f5-4440-bb32-23323e44f985" />

To Reproduce

  1. Add Google Drive node and select copy operation.
  2. Select ID and run the node, the file will be copied.
  3. Now select Url to copy, and run the node, getting error, in case of URL

Expected behavior

  1. When trying to copy a file using URL it should also copy a file successfully.

Debug Info

Debug info

core

  • n8nVersion: 2.18.0
  • platform: npm
  • nodeJsVersion: 24.15.0
  • nodeEnv: undefined
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/146.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-04-23T09:01:35.483Z

Operating System

Mac OS

n8n Version

2.18.0

Node.js Version

v24.15.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

n8n cloud

extent analysis

TL;DR

The issue can be resolved by checking the URL format and ensuring it is correctly formatted for the Google Drive node in n8n.

Guidance

  • Verify that the URL used for copying the file is in the correct format, as the Google Drive node may have specific requirements for URL structure.
  • Check the n8n documentation for the Google Drive node to ensure that the URL parameter is being used correctly.
  • Compare the ID and URL copy operations to identify any differences in configuration that may be causing the issue.
  • Test the URL copy operation with a different file or URL to determine if the issue is specific to a particular file or a more general problem.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The issue may be related to the specific version of n8n (2.18.0) or the Node.js version (v24.15.0), but without further information, it is difficult to determine the exact cause.

Recommendation

Apply workaround: Check and correct the URL format to ensure it is compatible with the Google Drive node in n8n, as this is the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  1. When trying to copy a file using URL it should also copy a file successfully.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING