Skip to content

Integrate with Google Spreadsheet

Samurai AI can integrate with Google Spreadsheets to read and write data. This makes it possible to streamline data management and analysis. Follow these steps to learn how to integrate with spreadsheets.

First, select “Google Spreadsheet” on the Connect screen and authorize the necessary permissions. If not installed in the app, install it from the uninstalled list at the bottom of the screen.

If it remains in an “unauthorized” state, you cannot access the spreadsheet, so click “Authenticate” and perform authentication. Authentication is done via browser, so enter the necessary information.

Google Spreadsheet authentication

First, prepare a spreadsheet to integrate with Samurai AI. Copy the sample spreadsheet from the link below.

Since the sample spreadsheet is a file under our authority, please copy and save it to your own Google Drive.

Sample Spreadsheet

Next, create a new app in Samurai AI’s Studio. Select “Studio” from the navigation bar and click “Create App” in the upper right.

Enter a name and click Save.

Create new app

After creation, opening the app will display the following screen.

Studio screen

By default, one LLM node is placed. This time we will use an external connector instead of the LLM node, so let’s delete the LLM node.

To delete, use either of the following methods:

・Right-click the LLM node and execute delete ・Select the LLM node and press the Delete or Backspace key on the keyboard

Next, add an external connector.

Click the arrow between the Start and End nodes to display the ➕ mark, and add an external connector from there.

Add external connector

Add external connector

Alternatively, you can add nodes by drag and drop. Select “External Connector” from the node list on the left and place it on the screen. Then connect the arrow from the Start node to the external connector, and connect the arrow from the external connector to the End node.

After placing the external connector, click the node to open the prompt settings screen.

Next, click “Add Tool” and select Google Spreadsheet from the list.

Add Google Spreadsheet

Next, edit the prompt to output sheet data. Enter as follows:

Enter the URL of the spreadsheet you created earlier in [Sheet URL]. You can easily operate it just by entering the spreadsheet URL.

[Sheet URL]
Output the table data from this sheet.

After entering, save and execute with Debug.

When execution is complete, the spreadsheet data will be output. If the sheet data is displayed as shown below, it’s successful.

Prompt and output

Next, let’s try updating the spreadsheet data. Change the external connector prompt as follows:

[Sheet URL]
Add the following to the last row of this sheet. Do not update other cells when adding
Product Category: Mineral Water
Price: 100
Publisher: D-san
Publication Status: Published

Save and execute again. After execution is complete, check the spreadsheet and you’ll see new data has been added to the last row.

Add row

This way, you can easily read and write Google Spreadsheet data using Samurai AI. Please take advantage of this to streamline data management and analysis.