Actions are a special type of formula that you can use in Lido to perform powerful tasks like sending emails, updating values in other cells, or even making changes to external systems such as your database or CRM. They are different from other formulas because they only run when triggered.
Think of actions like the logic behind a button that you click to perform a specific task. When you click the button, the action formula runs and completes the task.
There are two types of actions: those that change the state of the spreadsheet itself (like updating cells, inserting rows, and deleting rows), and those that write to external systems (like your database or Salesforce).
Actions that change the state of the spreadsheet itself:
|UPDATECELL||=UPDATECELL(cell, value)||Updates cells with given values.|
|INSERTROWS||=INSERTROWS(sheet, values)||Adds a new row of data to a given worksheet.|
|ADDROW||=ADDROW(sheet, row_number)||Adds an empty row|
|ADDCOLUMN||=ADDCOLUMN(sheet, column_number)||Adds an empty column|
|SETVALUE||=SETVALUE(component_name, value)||Changes the value of a dashboard input component|
|CHAIN||=CHAIN (action1, [action 2])||Create an action, which when invoked, invokes each of it's arguments in order|
>> For example, Action 1 (i.e., input 1 of the CHAIN formula) could be to send a gmail (with the formula SENDGMAIL) and Action 2 (i.e., input 2 of the CHAIN formula) could be to update the status cell of a recipient as sent (with the formula UPDATECELL)
Actions that write to external systems:
|SENDGMAIL||=SENDGMAIL(sender, recipient, subject, body)||Sends an email from your Gmail account|
|SENDSLACK||=SENDSLACK(workspace, channel, message)||Sends a Slack message|
|CALLURL||=CALLURL(url, method, body, headers)||Makes any HTTP request|
|SQLMUTATION||=SQLMUTATION(connectionString, sqlQuery, ssl)||Updates your SQL database|
|OPENURL||=OPENURL(url, new_window)||Opens a url|
Actions are just another type of spreadsheet formula. They can live either directly in a spreadsheet cell or in the component sidebar of the associated button.
You can write any action formula directly in your Lido spreadsheet.
Next, we need to add a button to the dashboard to trigger the action.
And finally, we need to connect the button to the action cell.
Flip your dashboard from edit mode to preview mode to test your action.
You can also write an action formula directly in a button's action property input. These input components behave exactly like spreadsheet cells, so you can reference other cells and write formulas as well.
Actions can have unintended side effects
When you use an action formula, you should be aware that it can change the state of your data.
This means that if you're using the formula to make changes to a shared spreadsheet, other users might see those changes immediately. If you're not careful, an action formula could overwrite or delete data that other people are relying on, so it's important to use them with caution.
Updated 14 days ago