Google Drive New file trigger not working

I am trying to trigger my workflow when a new file appears on a google drive folder

I usually receive this file via gmail and I simply “add to drive” and then organise the file to be moved to that folder.

The trigger never occurs.
If I click “test workflow” from within the web environment it works perfectly.
If I download and upload the file the workflow gets triggered properly.

It would be great if the workflow could be triggered when I just move the file to the folder.

How can I do this?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Web version on Chrome
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Ioustinos_Sarris

Can you try if it works with the option Watched Folder Updated?

I tried and changed the trigger to what you are suggesting but now I am not getting as output of the trigger the file object but the folder object. I need to get the file.

I am having the same issue. If I make, for example, a change to 3 log files in a folder it seems like the only event that is captured is the last of these file changed events. For each run of the trigger, should it not capture 3 events and then run the entire workflow 3 times. This was what I thought would happen given the trigger is for changes in the parent folder.

Anyone? Am i not understanding the way this node works (watching for changed files. of which there might be N, in a given folder)?

@ria Can you shed any light here?

Hey all,
so sorry for the delayed response.

@jmc
The Google Drive Trigger is a polling node, this means that it checks every once a minute (or any other setting) for changes. If there were 3 changes within one minute it will return one output containing the 3 changes.

This may be a silly question, but do you have the workflow active?

@Ioustinos_Sarris Apologies, it should work with the Trigger option on fileUpdated.

Just tested again to make sure:

Currently facing the same issue. fileCreated only triggers if I hit the “Test the Workflow” button. Workflow is active, but nothing happens if i move files in to the folder.

Hey @Crazymind

you will have to use the option File Updated to capture events from files moved into a folder.

1 Like

Just latching on here as I am having issues with the “fileUpdated” (fU) version not triggering.

I am running the 1.54.4 version of n8n , in docker, installed as described in the Docu as of writing this post, no customization beyond getting the instance running.

Info:

  • The workflow was active.
  • fC & fU connected to a code node (CN that returns input.all.
  • “fileCreated”(fC) has given me no issues.
  • Only 1 file was uploaded/moved into the folder at a time.
  • All files mentioned in the post were PDF.
  • I tried the below, with variations of files being already present in the folder, no files in the folder.

I have tried the following scenario where fU has not worked:

  • fC & fU connected to a code node.
  • fC disconnected, fU connected to the code node.
  • fC not present in the WF, fU connected to the code node.

I have both nodes for GDrive (FileCreated and FileUpdated) and it just appears to be unreliable that FileCreated gets triggered. Sometimes it does, sometimes it doesnt. What is happening on my Mac is that a file is created (by a coffee roaster) into my Gdrive folder locally, which is then synched to GDrive in the cloud. This should be a new file event. More often that not, this does not work. I instead, after the file is synched, edit the file again which as far as I can see triggers the FileUpdated event and that IS captured and the process completes. Just a janky non-automated workflow that I have to edit the file (really just edit and undo) to make it work. Ugh.

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