Nov 08, 2024 03:50 PM
I have an Airtable automation that uses the AI module to summarize text fields for each record in a view. A repeating group iterates through that list. In Make, those newly updated records are processed through a Word template to output a report. I'd like to figure out a way to trigger them with one button press.
There are three ways I'm aware of for triggering Make, but I can't figure out how to make any of them to work.
Alternatives I'm trying to avoid
I thought about triggering the Make automation before the repeating group, but then I'd have to set a timer somewhere in the process so the AI summary section has time to finish. The problem is, I think the amount of time this takes will be pretty variable, so I can't estimate how long it will be. I could set a super long one, but since users trigger with a button, I want the output (an email with the annual report) to happen fairly soon after that. This might be my plan B, though.
I know Make has AI modules, they just cost money, whereas I think I can get by on the free Airtable credits.
I know Airtable has document creation integrated in automations, but it's a complex document that it can't handle.
I thought about having like 10 status values that could be updated every time the loop went through, but that caused multiple problems, not the least of which is that there might be different numbers of records at different times.
Probably the easiest would be to just have two buttons, one to summarize fields and one as a webhook to launch Make, I just hate that from a UI standpoint.
Solved! Go to Solution.
Nov 08, 2024 05:38 PM
It sounds like you want the Make scenario to run after all the actions in the repeating group have run for all of the records in the repeating group. You are running into difficulties because currently Airtable automations do not have a method of placing an action after all the repeating groups are done. You cannot even easily tell which record in the repeating group is the “last one” because records can be processed out of order.
The solution is to have all the records being processed linked to a single parent record. Have a single select (or checkbox) field in each record that is to be processed. Inside the repeating group, after the other actions, update the single select to say that that record is processed. You will also need a rollup field in the parent record that will check if all the records are processed. Finally, have a second automation that is triggered when the rollup field says that all records are processed.
Depending on your workflows and if things need to be repeated, you may also need actions that reset the single-select.
If you want to get fancy and avoid the rollup, you could use a script that checks the single-select of all the records to be updated and call the Make webhook only if all the records are processed. However, that might be harder to maintain.
Nov 08, 2024 05:38 PM
It sounds like you want the Make scenario to run after all the actions in the repeating group have run for all of the records in the repeating group. You are running into difficulties because currently Airtable automations do not have a method of placing an action after all the repeating groups are done. You cannot even easily tell which record in the repeating group is the “last one” because records can be processed out of order.
The solution is to have all the records being processed linked to a single parent record. Have a single select (or checkbox) field in each record that is to be processed. Inside the repeating group, after the other actions, update the single select to say that that record is processed. You will also need a rollup field in the parent record that will check if all the records are processed. Finally, have a second automation that is triggered when the rollup field says that all records are processed.
Depending on your workflows and if things need to be repeated, you may also need actions that reset the single-select.
If you want to get fancy and avoid the rollup, you could use a script that checks the single-select of all the records to be updated and call the Make webhook only if all the records are processed. However, that might be harder to maintain.
Nov 09, 2024 10:13 AM
This is what I ended up doing, thank you!
For anyone having a similar problem, here's the details: I have a last updated timestamp field pointed at the summary field, and another field that shows the time of the latest update of the child records I'm summarizing. Formula field compares them and marks the field updated if the update stamp is later than the child field stamp. Then I have to do rollups through several levels of hierarchy to get to a final "Annual Report" record, which when all records are summarized, will trigger the Make automation.
Thanks for the insight!