Google Drive Download Errors out With ID field but works with full name

Hi,

When I try to download a file from Google Drive, I add {{steps.trigger.event.id}} in the File Field, and it will error out every time. But if I select the file by name “Notes > Recording.MP3”, it works every time. Any suggestions?

Error
File not found: 2RPkE7njiIV5RaUYbaHXSi6xhTrkTKBFE.

    at Gaxios._request (/tmp/__pdg__/dist/code/1a41dc8911e5b149c41a8d3540d82ce2ba2f30cb882caa69f4766e00695afeac/node_modules/.pnpm/gaxios@6.1.1/node_modules/gaxios/build/src/gaxios.js:141:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at OAuth2Client.requestAsync (/tmp/__pdg__/dist/code/1a41dc8911e5b149c41a8d3540d82ce2ba2f30cb882caa69f4766e00695afeac/node_modules/.pnpm/google-auth-library@9.2.0/node_modules/google-auth-library/build/src/auth/oauth2client.js:379:18)
    at Object.getFile (file:///tmp/__pdg__/dist/code/1a41dc8911e5b149c41a8d3540d82ce2ba2f30cb882caa69f4766e00695afeac/code/google_drive.app.mjs:780:9)
    at Object.run (file:///tmp/__pdg__/dist/code/1a41dc8911e5b149c41a8d3540d82ce2ba2f30cb882caa69f4766e00695afeac/code/actions/download-file/download-file.mjs:92:26)
    at null.executeComponent (/var/task/launch_worker.js:267:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:764:28)

Hi @serge,

It seems like you’re encountering an issue with dynamically specifying the file ID in your Google Drive download step. When you use {{steps.trigger.event.id}}, it’s possible that the value isn’t the correct file ID or isn’t being passed correctly.

To help you further, I need a bit more information:

  1. Could you confirm where the id you’re using in {{steps.trigger.event.id}} is coming from? Is it from a previous step in your workflow that triggers when a file is added to Google Drive, or is it from another source?
  2. Please ensure that the id corresponds to the actual file ID on Google Drive that you’re trying to download.
  3. If possible, could you share the part of the workflow configuration where you’re setting the File Field?

Once I have this information, I’ll be able to provide more targeted assistance.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

Hi @serge,

It seems like you’re encountering an issue with the file ID not being recognized when you use {{steps.trigger.event.id}} in the File Field for downloading a file from Google Drive. This could be due to a few reasons:

  1. The id you’re referencing from the trigger event might not be the correct Google Drive file ID.
  2. The file ID might be correct, but the file may not be accessible due to permissions or it might not exist at the location specified.

To troubleshoot this issue, please ensure the following:

  • Verify that the id you’re using is indeed the Google Drive file ID.
  • Check that the file with the given ID exists in Google Drive and that your Google Drive account has the necessary permissions to access it.
  • Ensure that the trigger event is providing the correct file ID.

If you’ve confirmed the above points and still face issues, you might want to consider using a different method to reference the file ID or debug the trigger event to see what file ID it’s providing.

If you continue to have difficulties, please visit Pipedream Support for further assistance.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

I get the ID field from the successful trigger from the previous event.

steps.trigger{2}

context{16}

event{42}

capabilities{27}

copyRequiresWriterPermission:true

createdTime:2024-07-28T16:03:14.099Z

explicitlyTrashed:true

fileExtension:mp4

fullFileExtension:mp4

hasThumbnail:true

headRevisionId:1B0t84yLLW6fpUje1PVJxVHqaR4MyZR7XVJtQYR2TmgTVE2wPQ

iconLink:https://drive-thirdparty.googleusercontent.com/17/type/video/mpeg

id:2RPkE7njiIV5RaUYbaHXSi6xhTrkTKBFE