Intro
Wouldn’t it be great if you could execute certain tasks automatically? Funnily enough, we’ve thought about that ;).
In this article, we’ll cover how to:
- Use
REFRESH()
,REPEAT()
, andSCHEDULE()
- Use checkboxes with an automation function
- Send scheduled emails
Let’s go 🚀!
Automation functions
At Rows, we have three automation functions - which one you choose to use all depends on what you want to do:
Do you want to... | Then use.... |
---|---|
Refresh data in a cell or range periodically. For example, every minute of every day. | REFRESH() |
Repeat a formula or cell periodically. For example, every hour of every day. | REPEAT() |
Schedule an action on specific days of the year and at specific times. For example, every Monday of June at 09:00. | SCHEDULE() |
REFRESH vs REPEAT
REFRESH()
whenever you can, and REPEAT()
when you need to automate a function nested inside of another.
REFRESH
REFRESH()
lets you refresh the data in a cell or range periodically. This is particularly handy if you have a range of cells where you’d like to trigger an update or a formula execution.
Let’s just quickly cover the interval
, delay
, and unit
parameters:
Parameter | Mandatory | Description |
---|---|---|
range | Yes | Cell or range to be refreshed periodically. For example: A3 or B1:B6. |
interval | No | The interval between cell or range refreshes. By default this is 60 (min). The minimum is 1 (min). |
unit | No | The unit of time to use with the interval . Choose between: - " min " for minutes (default)- " h " for hours- " d " for days- " w " for weeks- " m " for months |
delay | No | The time until the first refresh. By default this is 1 (min). The minimum is 0 (min). |
interval | No | The unit of time to use with the delay . Choose between: - " min " for minutes (default)- " h " for hours- " d " for days- " w " for weeks- " m " for months |
REPEAT
REPEAT()
lets you repeat the execution of a function (or a cell that contains a function) periodically. This automation function is great when you want to include the function within the actual formula, and not just refer to a cell. Its syntax is pretty similar to REFRESH()
.
SCHEDULE
SCHEDULE()
allows you to execute functions or cells at very specific times or intervals. This function is great when you need to execute a function at a specific time or day, such as every Monday of June at 11 am.
Parameter | Mandatory | Description |
---|---|---|
task | Yes | The formula or cell to execute. For example NOW() , A1 , or B2:B7 . |
schedule | Yes | When and how often to execute the task . We use a special syntax for scheduling, which you can read about in depth in our SCHEDULE() article. |
time_zone | No | The UTC or GMT timezone in HH:MM to use when evaluating schedule_message . For example: Indian Standard Time (IST) = "UTC+05:30" . By default, this is set to UTC. |
Spreadsheet practice
In our spreadsheet, we're going to add an automation where we send a daily email of all the searches that users perform. We're also going to conditionalize the schedule with a checkbox. If it's checked - we perform the automation, if it isn't, we don't.
- Go to your App Log table.
- In cell D1, create a Checkbox by going to More action elements and selecting Checkbox.
- In cell E1, type in this formula:
❇️ Done! Now, when the checkbox is checked, we'll send an email every day at 09:00 with the full log of search queries. Cool right?