FAQ Q104: How to send new data transactions to the Tangle based on data from my Google Sheets spreadsheet?

In this tutorial it is assumed you've already created a Totangle account.

In the blue menu on the left, go to Rules and add a new rule. Choose Google Sheets as the trigger.

Then, click the blue button to allow Totangle to access your Google account.

Choose the Google account which has access to your spreadsheet.

The next screen will tell you which access type is requested. The View metadata access is needed so that we can fetch the list of your Google Sheet spreadsheets and the View and manage spreadsheets access is needed to read from and write to your chosen spreadsheet.

Now, click once again on the Google Sheets trigger in the rule configuration:

Let's take a look at the actual spreadsheet. There are a few conditions that must be met:
1. You must use the first (default) sheet.
2. The data must start in the first row (column labels in row 1 and data rows in rows 2 and higher).
3. Totangle will only attempt reading columns A through Z so you cannot have more data columns than 26.
4. You must add an extra column called e.g. Transaction status which will be used for communication with Totangle. Totangle will NOT export any data rows UNTIL the value of the cell in this column is set to ok or send. This is to prevent accidental sending of a half-finished data row. Then, when Totangle sends the data transaction to the tangle, the value of such cell will change to sent XYZ where XYZ is the unique Totangle transaction ID.

Now, select the spreadsheet document to be used. When you do this, you'll see the list of columns read. Indicate which column is the status column, in the case of this tutorial, it's called Transaction status.

Submit the configuration screen, then skip the second step of the configuration (filters) and in the third step select the IOTA tangle action. This will open the IOTA tangle configuration screen. Transaction type should be set to Data transaction (JSON) so that each column can be sent separately in the JSON format. You will also need to name the JSON fields sent, they can have the same names as the spreadsheet columns (Totangle doesn't enforce the same naming so you can have more flexibility in choosing the format).

In the fourth step, you need to map the trigger fields (columns in the spreadsheet) to the JSON fields which will be sent in the data transaction on the tangle. Use the tags $(...) which will be replaced with the spreadsheet data or other information, such as current timestamp or the Totangle transaction ID. You can also specify any other text you wish or put multiple tags in a single field.

Now, activate the new rule:

Let's do a simple test. In the Google Sheet, let's add a data row. Remember to set the last column (transaction status) to send only after all other columns are filled out.

After a few minutes the transaction should be sent and you'll see the Totangle transaction ID (BDW in the example below) in place of the word send:

Note that if you quickly add multiple data rows, only a single record will be sent at a time, so e.g. 10 records will take over an hour to be sent.
Back to Frequently Asked Questions