BOT - Can't use scheduled event, Wait process is terribly inaccurate, how could I avoid using it?

Hi everybody,

Initially, my problem is that I use starter plans and I needed to have a time scheduled bot that check every morning reports made by my App users, and change the field [Status] of the row to "CLOSED" depending on a condition (if the reporting is fully completed, based on VC that count ref-rows from child reports).

Basically, I needed a bot that would check at 5am all reports from the day before and close those that are completed and send a reminder to those which are not completed.

Unfortunately, scheduled bots are for Core plan users only, therefore I thought about a workaround that uses the WAIT process and that would be: 

  • When the user clock-in in the morning, this would trigger the bot (data change event, update only),
  • the bot starts by waiting 12 hours (like this I am sure the working day is over and by then, users should have filled in the full reporting, therefore the bot can close them if report is fully completed.)
  • If the reporting is not fully done, send a notification to the user so that he finishes the report. 

--> Data change event triggers the boat for this row --> WAIT 12 hours --> Branch on condition ( VC [is_reporting_done?]=true) --> if yes:  run a data action [Status]="CLOSED" | if no: send a notification + run a data action [Warning]="YES". END

This would have been a great workaround, unfortunately, the wait step is inefficient, meaning some of the bots wait 16, 20, 30 or even more time to proceed to the check of the report completion. I have a bot waiting since more than 3 days (triggered on the 16.02.2024 at 14:00, still pending on the WAIT step).

I think I'll start digging into a App Script daily even that would check if the reports are fully done, update a cell accordingly, that will trigger my Appsheet bot thanks to the Appsheet Events' addon. Unforunately I don't have any experience with App Script I'll have to convert some VC into Physical columns as my reporting completion check condition was based on some VC.

If someone has another idea on how I could achieve that, I would be happy to take your input!

Thanks a lot in advance.

0 16 332
16 REPLIES 16

One workaround is to have a Core subscription but only with one license. Then you could trigger the schedule Bot from that account/app. That app probably doesn't need more than one.. two tables. 

Thanks for your answer. I thought about that, but it means:

  • I need to use another Google account, but this is quite ok.
  • If I understood correctly how notifications are sent, I wont be able to send a reminder notification on the phone of the user that needs to be reminded, as this user won't be using the app from which the bot is working.
    AUTO_EDIT: "The application that the user signed in to need not be the application sending the notification." from Send a notification from an automation - AppSheet Help (google.com).
    You made me double check how Appsheet handles notifications and therefore have another account with 1 appsheet core licence could do the job, for an extra 100 bucks a year.

If anyone has another workaround I would gladly hear it, otherwise I might go on with a 2nd CORE account.

I see 2 alternatives:

1) Create an Alert view that only shows when a user has incomplete reports from the day before.  Use a Slice to gather incomplete reports.  Create a view on this Slice that is shown only when THIS user has rows.  Not only does this alert the users to the issue but they have a list from which they can access the reports and complete them.

2)  Trigger an automation when a user "clocks-in" - it sounds like your users are expected to go through a "clock-in" process.  If so, then you can tie into that process to identify if there are incomplete reports from the day before and trigger a notification.  Sending notifications might be more readily seen than an Alert View and you KNOW the user is active in the app to receive those notifications.  In my opinion this is better than using a Scheduled Bot to trigger a notification.  The user may NOT be active and therefore never see the notification if it were a text or Push Notification.

I hope this helps!

Thank you for your answer.

alternative 1: Users already have an "incomplete reports" view on their dashboard, showing only their incomplete reports from today or passed date, but some still don't finish them...

Alternative 2: If I understand correctly, this is what I i proposed there, no?


@thelimp wrote:

therefore I thought about a workaround that uses the WAIT process and that would be: 

  • When the user clock-in in the morning, this would trigger the bot (data change event, update only),
  • the bot starts by waiting 12 hours (like this I am sure the working day is over and by then, users should have filled in the full reporting, therefore the bot can close them if report is fully completed.)
  • If the reporting is not fully done, send a notification to the user so that he finishes the report. 

It triggers the bot when the user "clocks-in". but it means I need to use the wait step to wait until the end of the day and then check if the report is fully completed. OR a scheduled bot the morning after. I can't see how to do that without a wait OR a scheduled bot. (because when they "clock-out", they still have time to complete their report, for example the expenses, that they can fill in after work with the parking tickets). Would you develop what you have in mind?

Many thanks anyway for your help.

Btw.. if you are thinking the app script, it doesn't trigger any Bot. The Bot is triggered only by direct access on a gSheet or adding the data through gForm.

I thought that too but from what I read, there is a Gsheet add-on that lets you triggers Appsheet bots from data changes made in GSheet.

External eventing with Google Sheets - AppSheet Help

Haven't tried it though, but I thought it would work as well with data changes made by App Script.? maybe I am wrong and that's what you are saying when you say app script can't trigger any bot.

When using AppSheet Event add-on, the script won't trigger any Bot.

Instead of Appsheet Scheduled BOTs you can also rely on external services like cron-job.org to call the Appsheet Action via api

 

jyothis_m_0-1708516267247.png

 

Thanks for your input. I can only trigger an action from the API, not a bot, right? As i can't branch on conditions and send notification through an Action.

What i meant is you can trigger the condition for BOT using an action say a data change action using the external api call

Oh true, just need an extra increment column whose only purpose is to trigger the bot. Thanks for the input i think i'll go on with that!

I digged a bit more into it, and I can't have it work...

From what I read this is only for Entreprise plan, which doesn't help me then. However, i can enable the "IN: from cloud services to your app" integration from the Editor.

did you manage to have it work with a starter plan?
this is how I set-up cron-job:

URL: https://api.appsheet.com/api/v2/apps/{appId}/tables/{tableName}/Action?applicationAccessKey=<applicationAccessKey>

Method: POST

body:{"Action": "BOT_Trigger_execute_action"}

When I test it, i have this error: 415 Unsupported Media Type

Not exactly

URL : https://api.appsheet.com/api/v2/apps/{appid}/tables/{tablename}/Action

In cron-job Advanced Tab you have to mention the following headers

jyothis_m_0-1709029150097.png

and this is the body

jyothis_m_1-1709029202439.png

 

{
"Action": "Edit",
 "Properties": {
    "Locale": "en-IN",
"Timezone": "India Standard Time"
  },
"Rows": [
{
"ID": "1"
}
]
}

 

 

 

This is brilliant, thanks for sharing

I had opened a ticket about Wait not working.

Supposedly, it has been fixed.  Please post your results so we can collectively know if that is, indeed the case.

Top Labels in this Space