Google Sheets - Insert Columns

Updated 3 months ago by Karan


Byteline provides a Google Sheets - Insert Columns node to configure the Google Sheets column mapping using Byteline expressions.

Use this task to export data to Google Sheets by mapping the Sheets columns to different expressions. In contrast, you can use the more straightforward task of "Google Sheets - Insert All Values" to send all values from a single expression to the Google sheet.

Create Google Sheet - Insert Columns node

For this document, we are assuming that a flow has been initiated with the Scheduler node and followed by Reddit - Get Subreddit Posts node. But you can use a Google Sheets - Insert Columns node with any trigger. For more detail, you can check How to create your first flow design.

Step 1: Select the Google Sheets - Update Values node from the select node window.

Step 2: Click on the edit button of the Google sheet update node.

Configure the Node

Sign in to Google Sheets

Click on the sign-in button on the configuration window of the update/insert Google Spreadsheet values node.

How to Copy Spreadsheet Id

Step 1: Open your Google spreadsheet and copy the spreadsheet Id from Google Sheet URL.

Step 2: Paste the copied Id in the Spreadsheet Id field.

Step 3: Enter the sheet name in the field below.

Step 4: Tick the Clear Value from Spreadsheet checkbox to clear the spreadsheet before inserting the newly fetched data.

Loop Over

You can iterate over an array using for loop over. Instead of processing element by element, you can iterate the index by using loop over starting from 0 to the length of the array and access elements at each index.

Step 1: Click on the loop over checkbox to enable the loop over.

Step 2: Select an array from the Loop over dropdown menu to apply a loop over the array.

Configure Spreadsheets Columns

Step 1: Enter the column name in the header field.

Step 2: Click on the selector tool to pick the column path.

The column path is automatically fetched in the value field.

Optional: To Replace Function

Step 1: Click on the selector tool for the function you want to replace. This function can be used if you want to replace part of the expression value with something else.

Step 2: Click on the function button to view all the functions.

Step 3: Click on the replace button to replace the existing function.

Step 4: Enter the expression you want to replace in the search for field.

Step 5: Enter the replacement expression in the replacement field.

Step 6: Select either the Yes or No option from the is regex dropdown menu to confirm that the replacement is of a regular expression.

Step 7: Click on the save button to save the function replacement.

You will observe the function is replaced in the value field as shown below.

To Add Row

Click on the add button to add new header-value pair in the node configuration window.

To Delete Row

Click on the delete button to remove the row, if not required.

Click on the save button to save the node configuration.

Here you can insert a new row or update an existing row.

Once you have saved the configuration, the indicator over the top-right corner of the node will turn green. The green indicator shows that the Google Sheets - Update Values node has been successfully configured to your flow.

Your Google sheets - insert columns node has been configured successfully. Feel free to connect us for any doubt.

How did we do?