01.5.2 New or Modified Files
The New or Modified Files node triggers the scenario if:
- a file on Google Drive has been edited;
- a new file has been added to Google Drive.
For example, let's create a scenario that:
- runs after adding a new file to Google Drive;
- returns the current list of file names on Google Drive, taking the added file into account.
You need to add three nodes:
- (1) New or Modified Files, to trigger the scenario when a file is added.
- (2) List Files, to get the current list of folder files and their attributes as an array;
- (3) Iterator, to sequentially process the array from the List Files node;
- (4) SetVariables, to create an array of file names;
- (5) Webhook response, to return the scenario execution response.
The result of the execution is an array of file names in the Google Drive folder, including the name of the added file:
["Add new 1","Add new","TestJson.json","TestJson.json"]