“We released in preview a new advanced feature that supports data changes happening in one Bot can trigger other Bots to execute”
Please see this page for detailed explanations: Creating a bot | AppSheet Help Center
Feel free to reach us if you are seeing any issues, or have any questions.
Thank you @Lusha_Wang1 for your works to bring this on our table.
We tested before and now re-tested with our sample app which is working fine.
Yes, indeed it repeats 5 times max to avoid looping endlessly.
Great job.
This is one of additional feature which we did not have at the time of Ex-workflow, I admit.
Exciting! I think this is a great feature, particularly the “Wait for execution”. I hope this can improve consistency for complex tasks that perform batch data processes or use the AppSheet API.
@Lusha_Wang1 how does the system handle recursive triggering of Bots? ex. Bot A performs a data change that triggers Bot B. Bot B then performs a data change that triggers Bot A.
Maybe @tsuji_koichi already described that it loops 5 times and then stops?
Hi @Stefan_Quartemont, yes, the bot triggering chain will stop after 5 times.
Yeah, two bots go on a rally - just 5 times
Hello
Will it be possible to choose specifically which other bots to trigger? Or specifically which bot Not to trigger?
Because when Deletes are involved in these workflows, if they are also triggered … well then it’s over.
Hi @sorin_mihai We don’t have an option to customize which bot to trigger or not to trigger. However, if deletion will be performed in the bot, and if you want certain bot not to be triggered, then you could make that bot not listening to deletion data change events. Please let me know if you have other questions. thanks
Hi @Lusha_Wang1 - can you help? I was thinking of going ahead and trying this - but thought the 5x limit might mean I waste my time... 🤪
In short:
Essentially I'd like to be able to trigger a bot on a set of rows (similar to executing an action on a set of rows, but having the action run server-side to avoid client-side user wait times).
Can we do this with this new feature, or will it only trigger the first 5 rows in the set?
In detail:
I have an action that writes a enumlist of user IDs into a column in my 'Invites' table. I'd like 'Invites table Bot A' (triggered by the Adds-Only data change) to trigger 'Users table Bot B' which would update a column in the 'Users' table (with the triggered task-action firing only if the User [ID] is in the enumlist of user IDs in the 'Invites table'), to then trigger 'Users table Bot C' which would send a personalised email to the user.
Is it possible with this new feature, or will my table B Bot only run for the first 5x rows that have the data changed by the table A Bot?
Alternatively is there a way to make this work with the process step 'Call a process'? (this is poorly documented).
Reason for all of this is that I want to be able to send personalised invite emails to a bunch of users in my users table (hence run Bot C for each row), and I'm trying to avoid executing a data change action on a set of rows on client-side - because if the user wants to send personalised invites to say 50 users, they then have to wait for 50 data changes to sync for each change to then trigger the Bot C. I'd rather have a single data change (enter enumlist into a single row in the invites table), a short wait time for the user; and have the necessary multiple data changes on the users table occur in the background and send the emails...
So like this...
Hi @Ed_Cottrell , first, the 5x limit means we only allow the bot triggering chain at most to be 5. It doesn't mean 5 data changes at most. So All the changes inside bot A would be able to trigger bot B.
See this documentation for more details: https://help.appsheet.com/en/articles/4865431-creating-a-bot
Trigger other bots - Enable this option to allow data change steps in this bot to execute other bots that are listening for the same data change events. Disable this option to prevent data change events triggered by the current bot from triggering other bots.
If enabled, the following policies are enforced to avoid infinite event-trigger loops:
An event that is a result of a data change made by the bot cannot subsequently trigger the same bot.
If two or more bots trigger one another continuously in succession, the maximum number of triggers that can be initiated between them is 5. For example:
Bot A triggers Bot B
Bot B triggers Bot A
Bot A triggers Bot B
Bot B triggers Bot A
Bot A triggers Bot B
We will have a new step type available in one or two months, which will support given a set of rows, call a child process. Will let you know once it is publicly available. thanks
Hi @Lusha_Wang1 ah thank you. Actually I did find the help article after I write this - I’m sorry about that, I hadn’t checked those automation docs for a while and they have been further updated/added to it appear.
Also I went ahead and tried my two bot method above with the action on a set or rows in the first bot triggering the second bot multiple times: it worked well!
It did require adding the extra column to identify/tag the rows to be acted on however - so if you are building a ‘on a set of rows’ type bot option that would be great in future as it would avoid having the extra column.
It would also be great in future to be able to have a simple event on table A trigger a bot in Table B, (single Bot) , the call a process option doesn’t seem to allow this.
@C-Connect Glad to hear that bot-trigger-bot works for you. Thanks for providing feedbacks.
@Lusha_Wang1 sorry I replied with a wrong account! (C-Connect) Thanks 😊
Hi @Lusha_Wang1 hoping you can help again? I can't get a scheduled bot to trigger other bots. Is this normal behaviour? (I.e. Scheduled BotA which changes data, and that data change is the same change event that BotB is listening for which should then fire... but it doesn't). Thank you!
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |