Hi,
I’ve created a lot of automtions, but never used ‘scheduled time’ trigger, so I may be wrong.
but i think you can’t update multiple records in a single automation run
Can the “Update record” action update multiple records at once?
The “Update record” action does not support updating multiple records within one step. Currently, “Update record” updates a single record identified by the input record’s ID. If the pervious automation step, or trigger, attempts to pass multiple record ID’s into the “Update record” action the step will fail with an error. If you are looking to update multiple records at once, we recommend checking out the Batch Update App or explore writing a custom script using the Scripting App.
I would recommend 2 options:
-
use formula smth like IF(
AND(WEEKDAY(TODAY())=1,{Status}=‘shipped’),‘to_update’,’ ') in a new field (possibly hidden), create automation “When record matches condition”, that will run for each “to_update” record
-
use ‘scheduled time’ trigger, add scripting step to perform any desired action
you don’t need to add any input variables in automation step, just correct table/field names
i’ve adjusted my usual template to your task, but depending on your field types it may fail and needs a little adjusting.
rec.getCellValue(fld)?.includes(‘shipping’)) filters records and case-sensitive, works for text field only, if you have single-select, use getCellValueAsString.
if you feel at least a minimum understanding of it, you may follow this way, if not, you can return to first option
const table=base.getTable('YOUR_TABLE');const fld='YOUR_FIELD' //edit this line
const upd=await table.selectRecordsAsync({fields:[fld]}).then(q=>q.records
.filter(r=>r.getCellValue(fld)?.includes('shipping')).map(r=>
({'id':r.id,'fields':{[fld]:'needs processing'}})));
while(upd.length) await table.updateRecordsAsync(upd.splice(0,50))