Is it possible to setup the order of execution of bots?

I have 3 bots in one table.  The Bot "Create PDF" is executed when clicking a button, so I control when to trigger it

The others 2 bots are executed when the table is updated.  Both bots have different conditions to fire them. The order of execution is Bot 2 and then Bot 1, but I want to execute Bot 1 first and then Bot 2. Is it possible to setup the order?

AppSheet 1.png

Solved Solved
1 12 178
1 ACCEPTED SOLUTION

You could make another bot, the master coordinator, that runs the others in sequence.

  • Technically it will be running the processes from your bots, but the effect will be the same.

Here's how:

  1. For each of your bots, scroll down to the "Options" and turn on the "Make this process reusable" toggle
       - This will make the steps you've outlined for that individual bot as something that can be used by others.
  2. Create a master coordinator bot
  3. For each step the type = "Call a process", and then select the individual process you want to run.

The effect will be that they run in sequence, one after another.  You could even get fancy and include some branching steps, if you wanted to check for certain things and execute conditional steps. ๐Ÿ’ช

Hope it helps!

View solution in original post

12 REPLIES 12

The app is not deployed.

The only way I have found to do this is to disable/delete Bot 2 and create it again. This way it executes after Bot 1.

Is there another way to do this?

You could make another bot, the master coordinator, that runs the others in sequence.

  • Technically it will be running the processes from your bots, but the effect will be the same.

Here's how:

  1. For each of your bots, scroll down to the "Options" and turn on the "Make this process reusable" toggle
       - This will make the steps you've outlined for that individual bot as something that can be used by others.
  2. Create a master coordinator bot
  3. For each step the type = "Call a process", and then select the individual process you want to run.

The effect will be that they run in sequence, one after another.  You could even get fancy and include some branching steps, if you wanted to check for certain things and execute conditional steps. ๐Ÿ’ช

Hope it helps!

Hello Matt.  I'll follow the steps.

Thanks,

@MultiTech I made the 2 processes resusable, created a Master Bot and added those 2 processes in each step in the order shown here. AppSheet 2.png

I have some questions.

I got this.

AppSheet 3.png

AppSheet 4.png

I looked for information about this and this is what I found.

AppSheet 5.png

When I save, I see no errors or warnings, so I guess that completion of the "Add" and "Lookup" is optional.  What else do I have to do here?

 

You'll want to do the "Lookup" option

  • This will then ask you what columns to use for the lookup.
  • The easiest way is to select the ID column for that table.
  • And for the value for that ID column, enter the ID column again `[Your_Id_Column]`

MultiTech_0-1710625789096.png

This essentially says to the system:

  • Run "this" process on "this" record
  • With the ID value you enter determining which record is processed.

 

I did it.

AppSheet 6.png

Now I have 3 bots: Bot 1, Bot 2 and the Master Bot.

The Master Bot is the only one that must work. If all 3 bots are enabled, how do I tell it to AppSheet? Do I have to disable Bot 1 and Bot 2?

Automation has been made extremely modular, so that you can reuse the individual bits and pieces that make up the whole bot.  This includes:

  • Individual task steps
  • Entire processes

What you're doing here is reusing the process portion of the bot.

You should be able to actually delete the other bots.

  • Now that the process is marked as reusable, when you delete the bot the process should persist.

Another way of going about this might be:

  1. Go to Automation > Processes
  2. Make a process that you want to be reusable there.
  3. Then add that process to a bot

Ok. I get it. 
I disabled bot 1 and 2 and tested the "Master Bot" and it's working.

Thank you for all your help.

ace-ventura-happy-dance

Your welcome! (^_^)

I have just one comment. Since Bot 1 has a condition different from Bot 2 (conditions for firing each bot), it seems that only the condition of Bot 1 is the one that is applied in the Master Bot, but there's no doubt that this is a solution that works when I want the bots to be executed in a specific order as long as the bots have the same condition to fire the Master Bot.

I learn a lot from these posts. I appreciate the help received!


@maretec wrote:

Since Bot 1 has a condition different from Bot 2 (conditions for firing each bot), it seems that only the condition of Bot 1 is the one that is applied in the Master Bot, but there's no doubt that this is a solution that works when I want the bots to be executed in a specific order as long as the bots have the same condition to fire the Master Bot.


Technically what's happening here is you're reusing the "PROCESS" from the bot - not the bot.

  • And the bot is the thing that has the condition.

If you wanted to include your condition in your master bot, try this:

  1. Create a "Branching on condition" step for bot1.
  2. For the formula, copy what you have for bot1's criteria.
  3. For the "Yes" branch, insert your step that calls process 1.
  4. Create an addition branching step (after the end of the completion of the first branch, but not inside branch 1) for bot 2.
  5. Copy bot 2's formula
  6. Insert process 2
  7. Remove the criteria from the Master Bot (so it fires ever time), or modify the criteria to account for the 2 criteria for the branches.

Now when the bot is triggered, it will check for each of the conditions in sequence - kicking off whichever (or both) that apply.

It seems that you have a workaround for every issue. ๐Ÿ˜Š

Your suggestion sounds good!  ๐Ÿ‘   I'll try it.

Top Labels in this Space