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.
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.
@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:
moved 1 new file into folder → Trigger fileUpdated fires with 1 item
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.
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.