Google Sheets - Insert Columns

Updated 1 day ago by Karan

Introduction

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

Step -1: 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 box.

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 for loop starting from 0 to the length of the array and access elements at each index.

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

Step -2: Go to the select variable tool icon in the top-right corner of the node configuration window and pick the array path.

Step -3: Paste the array path in the textbox to apply a loop over to the array.

Configure Spreadsheets Columns

Step -1: Enter the column id in the header textbox.

Step -2: Go to select variable tool icon in the top-right corner of the node configuration window to pick the column path.

Step -3: Paste the column path in the value input box.

Step -4: Click on the add icon to add new header-value pair in the node configuration window.

Step -5: Click on the delete icon to remove the row, if not required.

Step -6: 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?