Read and manipulate data in your Google Sheets directly from LioranBoard!
For example, you could create your own leaderboard sheet and easily share it with others.
Important Note
This extension only works with public Google Spreadsheets that have been previously created with it. It cannot read or modify any of your other files.
Some read and write quotas per minute apply (more in documentation).
Available commands
Get Data, Find Data
Append Data, Update Data, Batch Update, Copy Paste, Clear Data
Auto Fill, Auto Sort, Randomize, Find and replace, Delete Duplicates, Split Text
Merge Cells, Unmerge Cells, Insert Range, Delete range
Create Spreadsheet, Duplicate Sheet, Add Sheet
Who is it for?
This extension expects you to have some basic to advanced Google Spreadsheets knowledge. You will also need to have some basic understanding of LioranBoard (such as understanding of how stacks work).
With this knowledge you can easily add new data, modify them, sort them, retrieve them and much more directly from LioranBoard!
Special thanks goes to: SteveLevesque and Djargic for their continued support on Github. The Argamenmock, EndoSkull, Evan, Panic, DoctorFu, kurocha, Stephen, Ethan, griddark, Kenny, Mill, William, Paul, deaffrasier, Venge, PapaBear Does Stuff, TTarantox, Rodrigo, Harvey Toadface, Alchemy_03, REVAMPEDDRDTH37 Williams, RhinoMonsterGC, JimmyPotato, Bryan, my amazing Patrons!
If you would like to support me in creating more extensions for LioranBoard, you can navigate to the Donate section.
Need a custom tailored extension? Head to the Commissions section!
DISCLAIMER: The extension is provided as is. The developer has no obligation to provide maintenance and support services or handle any bug reports. Feel free to edit the extension for your own use. You may not distribute, sell or publish it without the author’s permission.
We recommend using OBS Websocket 4.9.1. Use OBS Websocket 5.0 at your own risk, as some extensions might not properly function.
Important to know
The extension only works with public spreadsheets specifically created with it (video guide on how to make a spreadsheet public). It cannot read or modify any of your other files.
Your read quota is 60 requests/minute and you do not share it with other extension users. There is no daily limit.
Your write quota is 30 requests/minute (you can send batch requests that count as 1 request) and you share it with other extension users. Total quota is 300 requests/minute. The extension assumes there will be no more 10 users making 30 write requests per minute at the same time. There is no daily limit.
How it works
The extension utilizes Google Sheets API endpoints to read and write data.
While reading data is easy, as it only requires an API key, writing data is more complex. The extension ulitizes a custom made API to retrieve your refresh token, as this is only possible server-side and cannot be done from your Transmitter.
Important: This extension can only modify public spreadsheets that have been previously created with it. It cannot modify or delete any of your other Drive files.
Note for other devs
If you would like to use your own project credentials instead, you will need a bit of Google Cloud and JS coding knowledge, but it is possible to edit the extension for this purpose. I have added comments inside the .lbe file on what modifications to make and some very basic explanation on how to retrieve your refresh token.
Configure INIT button
You should see a new premade deck in your Receiver. Right click on the red INIT button - edit commands. Scroll down to the Send to extension command and fill out the following fields: (if you cannot see them, reinstall the extension and refresh your Transmitter).
refreshToken - you need to allow the extension to access your Google Sheets and retrieve the refresh token. Please follow this link and all its instructions after you get redirected.
Note: This will allow the extension to read and modify only files that have been previously created with it. It does not have permissions to do anything else.
ApiKey - you will need your own Google API Key.
Follow the video guide showing all the steps below:
Go to the Google Cloud Console.
Click the project drop-down and select or create the project for which you want to add an API key.
Click the menu button and select APIs & Services.
Click on the + Enable APIs and services. Search for Google Sheets, click on the search result - Enable. Repeat the same process for Google Drive API (search and enable it as well).
Click the menu button again and select APIs & Services > Credentials.
On the Credentials page, click + Create Credentials > API key. You can optionally restrict it to Google Sheets API.
Copy the newly created key and paste it in the apiKey field in your INIT button.
itchKey - key which was provided to you on the Itch.io purchase page. You can click on the purchase confirmation link that was sent to your email to retrieve it again. If you have any issues retrieving your key, please join our Discord server and ask for assistance.
ShowAlerts - whether you want to show yellow notification messages for successful requests. If you set it to false, only errors are shown.
You can optionally fill out the spreadsheetID in Math:Change Variable command if you’re going to use the extension only for one specific SpreadSheet.
You must use Create Spreadsheet button first as this extension can only modify spreadsheets specifically created with it. The Spreadsheet also has to be made public (which the Create Spreadsheet button will do for you).
Spreadsheet ID can be then retrieved by going to your spreadsheet in the browser and copying it from the URL: https://docs.google.com/spreadsheets/d/YOURSPREADSHEETID/edit?usp=sharing
Configure OPTIONS button
Inside the button you can choose which extension commands you wish to use and display in your Extension drop down menu (this is to prevent clutter as there are a lot of them). Select true to display it or false to hide it and press the button.
Default commands which are always displayed after pressing INIT button: Get Data, Append Data, Update Data, Batch Update, Find Data, Sort Range.
Your basic setup is now done. You’re ready to start using the extension!
I have created a walkthrough with examples showing how to use the extension.
Please follow buttons number 1-15 in the specified order while looking at your spreadsheet and commands inside the button to see what they’re doing to better understand how to use them.
You can watch the video guide (no talking + the video is missing the step where you need to make the new spreadsheet public) or simply read all the steps below.
Note: This walkthrough is intended for English version of sheets. You might need to modify some commands (such as your sheet name or button 5. where it adds months in English) for it to work for other languages.
Create Spreadsheet
We are starting with this button, because our extension can only modify spreadsheets we previously created with it.
Go ahead and create Testing Spreadsheet. A new URL should open in your browser with your newly created spreadsheet (or you can go to https://docs.google.com/spreadsheets). You need to make the spreadsheet public , this extension can only work with public spreadsheets.
We will work with this spreadsheet from now on, so keep it open to see what is happening when you press the next buttons.
Append by Value
This command will append a few names to our sheet by using a single variable containing all the values. | separator marks one cell.
Append by Stack
You can also append values by stack. In our example we append some points to our previously created user names.
Update by Value
This is the same as Append by Value command, except it will override cells if they already contain values.
In our example we update a cell with a formula that calculates the total amount of points of all the users and immediately returns the calculated value in a stack called ‘updated’. This is to show that you can write simple values into your sheets, but also complex formulas!
Update by Stack
This is the same as Append by Stack command, except it will override cells if they already contain values. In our example we add some months to our list of users.
Get Data
This command simply retrieves data by range.
In our example we retrieve all users, their points and months by columns, which will be saved in 3 separate stacks: getData1 (containing names), getData2 (containing points) and getData3 (containing months).
Find Data
To look up an individual user, we can use find data command.
In this case we’re trying to look for Melonax within our usernames and we want to return the whole row. We want to know what her points and months are. All should be saved in foundData stack now.
Sort Range
We can sort the users by their points, starting from the one with the most amount of points.
Auto Fill
In our example we auto fill more months.
Find and Replace
We search for ‘ju’ (in June and July) and replace it with ‘SUMMER:’. Because why not.
Split Text
Now that we have a called SUMMER:ne and SUMMER:ly from our previous command, we can split them into 4 spells, using : as delimiter.
Batch Update
Extremely useful command to update multiple ranges at once.
In our example we add more users and their points to the list.
Randomize
We shuffle the user points around and randomly assign them to our users. They will be surely happy about that…
Clear Data
Now we will just clear all the points. Our users can start all over!
Delete Duplicates
As you might have noticed, we’ve got two Melonax entries in our user list. With this command we can easily find the duplicate one and delete it.
A lot of buttons share the same parameters, which are going to be skipped in the Buttons section below.
SpreadsheetID
You can either fill it out manually for each button or set up spreadsheetID variable in your INIT button if you intend to use a single Spreadsheet.
Spreadsheet ID can be retrieved by going to your spreadsheet in the browser and copying it from the URL: https://docs.google.com/spreadsheets/d/YOURSPREADSHEETID/edit?usp=sharingSheetName
Name of the particular Sheet you want to Get or Edit data in.
The extension automatically converts your sheet name to your sheet ID to make it easier to work with. If you rename a sheet to another sheet's name that previously existed in your SpreadSheet (i.e. Sheet1 becomes Sheet2 and Sheet2 becomes Sheet1), you must completely close and reopen Transmitter to reset your session. Otherwise it will still assign the old sheet ID to the name.
Range
Range you wish to Get or Edit data in, such as A1:B10.
Dimension
Major dimension to Get or Edit data in.
For example, if you use the Get Data command and set the range to A1:B10 and your dimension to ROWS, it will return 10 stacks, each containing one row (first stack will be A1-B1 values, second one A2-B2 values, etc.).
If you change your dimension to COLUMNS, it will return 2 stacks, each containing 1 column (first stack will be A1-A10 values and second stack will have B1-B10 values).
Values (applies to Append Data, Update Data and Batch Update commands)
You can send values to the extension in two different ways:
A string of values separated by | marking individual cells. For example, if you want to insert values in A1:A7 range (make sure dimension is COLUMNS), you can enter them like this: Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday.
Result
A stringified stack. All values from the stack will be inserted into the selected rfalse, starting from position 0 and ending with the last position.
Create a stack with some entries.
Use Stack: Stringify command.
Use String: Replace command on the newly stringified stack. Replace “ with ‘
Insert the stringified stack variable in the Values field.
Sending a stack to Google Sheets
Append by value/stack
Appends values to a spreadsheet, either by a single variable or a stack. Must be either a single column or single row.
Input box
Description
inputType
How the data should be interpreted. Default is User Entered.
Update Data
Same as Append Data command, except it will update (=overwrite) data in the selected rfalse instead of appending them.
Batch Update
This is a very important button to understand if you want to perform update data batch requests. Instead of sending multiple single requests, use Batch Update button instead.
Please remember that you share write request quota with all other users using the extension, so try your best to group up your Update Data requests.
Input box
Description
Amount
amount of Update Data requests you’re sending
Send ‘Google Sheets Batch Update’ command and specify the amount of requests.
Send all your following Update Data requests as you normally would.
The extension will queue up the requests and wait for the last request to send them all at once. If you fail to supply all requests within the next 10 seconds, the queue will be deleted and resetted. Simply said, either all requests are sent or none.
Get Data
Retrieves data based on the range and dimension, and saves them into a stack.
Input box
Description
Render
How values should be represented in the output. Default is formatted value.
Delete Empty
Whether to delete empty values before putting them into the stack.
StackName
Base name of the stack for the retrieved data. For a base name My Stack and request for data from 2 columns, you will get back ‘My Stack1 and My Stack2` stacks, each containing 1 row of values.
Get data example
Find Data
Matches a string/value to a cell in a single column or row and returns its coordinates + related values. Must be an exact match. Finds the first occurence only.
Input box
Description
Range
Range to search. Must be exactly one column or one row, i.e. A1:A10 or A1:K1.
Find
string to find (must exactly match the cell contents, case sensitive)
Dimension
select COLUMNS or ROWS depending on whether your range is a column or row.
Span
The span of the rows/columns to retrieve. If set to 0, the whole column/row is returned. If Span is set to 1:5, it will return row 1-5 if you search by column and column A-E if you search by row.
Variable
variable to save the cell’s coordinates. A stack containing the returned row/column values will be also created (same name as the variable).
Create SpreadSheet
Creates a new SpreadSheet. The extension can only modify spreadsheets specifically created with this command.
Input box
Description
Title
Name for your new SpreadSheet
Variable
variable to save your new SpreadSheet ID into
You need to manually make the newly created spreadsheet public.
There will be a hidden sheet added to every spreadsheet you create. This sheet serves as sort of a look up sheet for Find Data command. Please don’t delete or rename it.
Duplicate Sheet
Duplicates an existing sheet.
Input box
Description
SourceSheetName
name of the sheet you wish to duplicate
newSheetName
name of the new duplicated sheet
insertSheetIndex
where in your SpreadSheet you want to insert the duplicated sheet
Add Sheet
Adds a new sheet to the selected SfalsedSheet
Input box
Description
Name
name for your new sheet
Index
where in your SpreadSheet you want to insert the new sheet
Hidden
whether you want to make the sheet hidden
Copy Paste
Copies data from the source to the destination
Input box
Description
Range
source range to copy
TargetSheet
sheet name to paste the data to
TargetRange
range to paste the data to
PasteType
what kind of data to paste
PasteOrientation
how the pasted data should be oriented. Transpose = all rows become columns.
Auto Fill
Fills in more data based on existing data.
Input box
Description
Range
range to autofill.
useAlternateSeries
generate data with the “alternate” series. Differs based on the type and amount of data.
Find Replace
Finds and replaces data in cells over a selected rfalse.
Input box
Description
Range
range to find/replace over
Find
value to search (string). If you want to use regex, prefix the expression with regex. Example: find regex o.* (.*), replace $1 Hello Your formatting must follow Java regex rules.
Replace
value to use as the replacement
matchCase
true if the search is case sensitive
matchEntireCell
true if the find value should match the entire cell
Split Text
Splits a column of text into multiple columns, based on a delimiter in each cell.
Input box
Description
Range
the source data range. This must span exactly one column.
Delimiter
the delimiter to use. For example :> or ,>.
Sort Range
Sorts data in rows based on a sort order per column.
Input box
Description
range
the range to sort
sortOrder
the order the data should be sorted.
dimIndex
the dimension index the sort should be applied to, for example B or 1 (which is the same as B).
Randomize
Randomizes the order of the rows in a selected rfalse.
Input box
Description
Range
the range to randomize
Merge Cells
Merges cells for row or column.
Input box
Description
Range
the range of cells to merge
mergeType
how the cells should be merged. MERGE_ALL creates a single merge from the range. MERGE_COLUMNS will create a merge for each column in the range. MERGE_ROWS will create a merge for each row in the range.
Unmerge Cells
Unmerges previously merged cells.
Input box
Description
Range
The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge.
Clear Data
Clears all data in the selected rfalse.
Input box
Description
Range
range to clear the data from. Example: A1:A10.
Insert Range
Inserts cells into a range, shifting the existing cells over or down.
Input box
Description
Range
range to insert new cells into
Shift
dimension to be shifted when inserting cells. ROWS = shifted down. COLUMNS = shifted right.
Delete Range
Deletes a range.
Input box
Description
Range
the range of cells to delete
Shift
ROWS = existing cells will be shifted upward, COLUMNS = cells will be shifted left
Delete Duplicates
Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Removes duplicates with different letter cases, formatting, or formulas.
Input box
Description
Range
the range to remove duplicates rows from.
Dimension
dimension to analyze for duplicate values
StartIndex
The start (inclusive) of the span. The columns in the range to analyze for duplicate values.
EndIndex
The end (exclusive) of the span. The columns in the range to analyze for duplicate values.
Privacy Policy
This developer has disclosed that it will not collect or use your data.
Additional information provided by the developer
The extension ulitizes a custom AWS secure API to retrieve your refresh token, as this is only possible server-side and cannot be done from your Transmitter. It never stores or shares any of your credentials and can only ever access public spreadsheets that have been previously created with it.
This developer declares that your data is:
Not being sold to third parties.
Not being used or transferred for purposes that are unrelated to the extension's core functionality
Not being used or transferred to determine creditworthiness or for lending purposes