My intention was to use the Timer field to delay rule executions by seconds/minutes. As this didn’t work (see above), I’ve helped myself with this Script Action:
const sleepSync = (ms) => {
const end = Date.now() + ms;
while (Date.now() < end) {}
};
const section_gid = "YOUR_SECTION_GID";
async function run() {
sleepSync(5000);
await sectionsApiInstance.addTaskForSection(section_gid, {
body: { data: { task: task_gid } },
});
}
run();
By the way: delaying rule executions is a highly requested feature for years - see: Delay for Asana rules - #12 by Jakub_Kwaśniewski