Skip to main content

12.01.1 Using Google Group nodes

As an example of using Google Group nodes, let's create a scenario that results in:

  • retrieving a list of documents from a specific folder in Google Drive and then entering the names of the retrieved documents into a Google Sheets List on one of two sheets depending on the document name;
  • generating a response "OK" to notify of successful completion.

To enable the successful execution of the scenario, we need to add 7 nodes and two routes with conditions:

  • (1) Trigger on Run once node to initiate a single scenario run immediately after clicking the Run Once button;
  • (2) List Files node that provides information about the documents in the "Test" folder on Google Drive in the form of an array. To configure the ListFiles node correctly, you need to create a authorization, choose Google Drive, and select the desired folder:
  • (3) Iterator node, containing a sequence of values from the ListFiles node's array;
  • (4) SetVariables node, defining the variable Name. The value of the variable is the name of one of the documents (value of the name field) passed in the Iterator node's array;
  • (5)The first Add Single Row Node, adding a row to a Google spreadsheet. To configure the Add Single Row node correctly, you need to:
  • (6) Route between the SetVariables node and the first Add Single Row node "Sales" with a filter condition {{contains(4.Name;"Sale")}};
  • (7) The second Add Single Row Node, adding a row to a Google spreadsheet. To configure the Add Single Row node correctly, you need to:
  • (8) Route between the SetVariables node and the second Add Single Row node "Stocks" with a filter condition {{contains(4.Name;"Stock")}};
  • (9) Webhook Response node, returning the response "OK" in case of successful completion of the scenario.

The outcome of the scenario will be:

  • The name of the file Report Sale on the Sheet1 of the Google spreadsheet List:
  • The name of the file Report Stock on the Sheet2 of the Google spreadsheet List:
  • Generating a response "OK" to notify of successful completion.