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 Data Actions panel to refresh data on a schedule
- Use
REFRESH()
,REPEAT()
, andSCHEDULE()
- Use checkboxes with an automation function
- Send scheduled emails
Let’s go 🚀!
Data Actions
If you've imported data using our Data Actions panel, you can toggle the Schedule refresh option on by editing the data table like so —
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.
Automations in forms
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 below. |
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. |
Schedule parameter options and examples
Acceptable Parameters for schedule_message
For numbers (including time and date), use the cardinal number in numeral form. For example: 1, 14, 28.
For days of the week and months, use the full name in lowercase. For example: monday, wednesday, sunday, february, december.
Incompatibility
REPEAT()
, REFRESH()
, and SCHEDULE()
Frequency | Use | Example |
---|---|---|
Every X minutes | “every X minutes” | SCHEDULE(NOW(), "every 5 minutes") |
Every X hours | “every X hours” | SCHEDULE(NOW(), "every 1 hours") |
Every X minutes within a time period | “every X minutes from HH:MM to HH:MM” | SCHEDULE(NOW(), "every 5 minutes from 10:30 to 20:30") |
Every X hours within a time period | “every X hours from HH:MM to HH:MM” | SCHEDULE(NOW(), "every 2 hours from 09:00 to 21:00") |
Every day a specified time | “every day HH:MM” | SCHEDULE(NOW(), "every friday 15:00") |
Every given weekday at a specified time | “every weekday HH:MM” | SCHEDULE(NOW(), "every day 15:00") |
Every given weekday for certain months at a specified time | “every weekday of month HH:MM” | SCHEDULE(NOW(), "every friday of march,april 15:00") |
More than one weekday at a specified time | “every weekday1,weekday2 HH:MM” | SCHEDULE(NOW(), "every monday,tuesday 09:00") |
Every X day of a month at a given time | “every day of the month of month HH:MM” | SCHEDULE(NOW(), "every 1 of month 18:00") |
More than one day of a month at a given time | “every day of the month1, day of the month2 of month HH:MM” | SCHEDULE(NOW(), "every 1,2 of month 19:00") |
More than one day of a month for certain months at a given time | “every day of the month1, day of the month2 of month1,month2 HH:MM” | SCHEDULE(NOW(), "every 1,2 of january,february 19:00") |
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?