bitfocus/companion-module-google-sheets

Support for Companion Internal Variables

Terranesaurus opened this issue · 10 comments

Describe the feature
Support custom variables in the cell and value fields.

Usecases
Dynamically change the cell or content that is being edited based on custom variables provided by companion.

One specific use case is to set a checkbox on each row to TRUE based on the number of times that the button has been pressed.
Another use case is to write dynamic content to a cell based on internal variables from companion.

Here's an example of what I would expect to work (it doesn't currently):
image

@Terranesaurus beat me to it!

I would like a similar function – for instance, if "$(internal:time_hms)" was in the Value field, that the actual timestamp would be put into the Spreadsheet, such as 12:32:14.

Also, it would be helpful to have an Action that adds data to a new row, and also an Action that would generate a new sheet within a workbook.

For instance, I want to automate YouTube livestream chapter markers after a show. Each button press on Stream Deck during a show would create a new row below the most recent data and timestamp a cell (ie hence converting $(internal:time_hms)" to "12:32:14"). Ideally I can import dynamic Stream Deck button Text in an adjacent cell that would contain the description.

Support for variables is something that will definitely be added.

As for an action that adds data to a new row, the trouble I can see with this is if someone has a sheet with 10 rows of data, and then 10 empty rows, should the data be added to row 11, or should a row 21 be created and used? What if on row 20 there was a single cell with data in some column but the column for the timestamp is empty? It sort of gets complicated and so it may be easier to use custom variables to target a specific row/column and then increment the variable used to target a row.

I'm thinking of how Google Forms will add new submissions to a row at the bottom of a spreadsheet. Not sure how that works on the back end. Either way, some ability to press the same button in Companion and it adds the data to a new line, rather than overwriting the same field.

We would love to see the internal variable function to be implemented. We wanted to create an easy way to mark a specific timecode into an spreadsheet for the editor. Currently we just write it down on a piece of paper. The program we use for recording sends out a timecode to companion which we could then write into a custom variable and then write that variable to a new field in google sheets.

@davidjoshuaford one way you could write such a time into a new field is having a custom variable which increases by 1 everytime you press the button. The companion instance does need to accept internal variables but hopefully we'll see that option soon.
Screenshot 2022-12-13 at 14 33 08

I would also love to have internal variables working both for value and cell! Also the function "add sheet" (with support for internal variable within the sheet name) could be nice to have.

Just wanted to chime in to say thank you for the Google Sheets support!

I would absolutely benefit from being able to pass a Companion internal variable to a cell in Google Sheets, essentially completing the link between Companion and Sheets. Any more functionality would obviously be welcome, but at a base level the "value" field should support custom internal variables. Thank you!