How do I get a Schedule Bot to trigger a Data Change Bot?

I thought I had this figured out but I am still doing something wrong.

In Automation I have a bot that increments the value of a variable called [Run] in my monthly processes table. Whether I Run the Bot manually, or allow it to run on schedule, it does exactly what I want it to do. 

I also have a Data Change Bot that adds records to another table whenever the [Run] variable in my monthly processes table changes. If I change the value of [Run] using a form that bot does exactly what I want it to do too.

All bots have the Trigger other bots turned on.

How do I get the scheduled bot to trigger the data change bot

Solved Solved
0 8 583
1 ACCEPTED SOLUTION

I had the same problem as you. The only solution I found was to trigger the update of the counter by an API call instead of a classic data modification.
From my undersanting, the change detection only works on an external action, from the ui or from an API call.

View solution in original post

8 REPLIES 8

Hi. I'm not sure how the two tables are linked.

So I'm guessing a little here.

I think you could have a column on your table called "Automation Trigger" that gets flagged when you run an action,and then run another one that  clears it afterwards(so you can use it again), and in that automation you instruct the system to look for that trigger and then fire off when the value in that column changes to the name of your flag. 

 

 

 

Hi Jared, I think that's what I am kind of doing. Since posting the question I managed to get part of the job done but the same problem exists with the second step so it's still important that I figure out how to make this work.

One table is called Monthly Invoices with a Key field called [Monthly Invoice Id] and the trigger field is {Run], which is a numeric.

The other table is called Invoices. It has a Ref field called [Monthly Invoice Id] linked to the Monthly Invoices table. 

I originally created a Bot that runs against each line in the Monthly Invoices table and increments the [Run] variable by 1. Effectively that's the same as your suggestion of having an Automation Trigger, except that I don't need to reset it after the Bot has run. That bot runs perfectly incrementing the value of [Run] by 1 on the scheduled day. 

I also have a Data Change bot that I thought should trigger whenever the value of [Run] changes. However it just doesn't fire when the [Run] variable is changed by the first Bot, it only fires when I change the [Run] variable within the app.

I've since found a way to add new records from the Scheduled Bot, instead of just changing the value of [Run], but I still need it to trigger another Bot to add rows to the related Line items table. I have a Bot that should fire when a row is added to the invoices table that adds a row to the line items table, but again, it won't fire when a line item is added to the Invoices table from the schedule bot. 

I thought the latest upgrade to AppSheet meant it would pick up a data change created by another bot (up to 5 levels) but it doesn't seem to be working for a scheduled bot and I can't figure out what I am doing wrong.

Confirm the schedule bot's Trigger other bots property is enabled.

dbaum_0-1664111471846.png

 

Yes I can confirm it is activated for all bots.

I've worked out a very messy way to do this. I run one scheduled Bot to add the invoices then I run another bot an hour later to create the line items. Far from ideal but it works. I'd still like to figure out why the standard approach isn't working.

 

I had the same problem as you. The only solution I found was to trigger the update of the counter by an API call instead of a classic data modification.
From my undersanting, the change detection only works on an external action, from the ui or from an API call.

Thanks Devvil. I must have missed that on the documentation. Looks like I need to start learning how to make an API call if I want to take my apps to the next level.

PREVIEW
 
 
 

If you are using Google sheets or Saleforce as a data source , you could evaluate the option of external eventing.

External eventing with Google Sheets - AppSheet Help

 

Very useful option. Thank you!!!

Top Labels in this Space