My set-up:
1. Google Sheet runs a scheduled script to extract data from an online system, adding new records to the end of the existing table of data. [member_id] is the key.
2. Same Google Sheet has Appsheet Events configured and send 'changeBot' trigger to Appsheet
3. My AppSheet defines the same Google Sheet as a data source
4. In the AppSheet a BOT is set for EVENT = Data Change, Adds; PROCESS = Add New Rows to WaitingList table, waitinglist_key = member_id.
If a new row is added manually to Google Sheet, the workflow executes correctly.
If a new row is added automatically by the scheduled script, the BOT execution fails with (in the Audit Log):
Solved! Go to Solution.
I got a solution from support.
My first bot adds a new row to a table.
My second bot "on data change / add" sends an email, from data in that new row.
I got the following error as the second bot fired (and failed).
Error: "Key column 'qev_id' is not present in the Data payload."
Properties: { "Exception": "Key column 'qev_id' is not present in the Data payload.", "AppTemplateName": "8bfa7498-b2ab-4222-a7ea-a4097bf37756", "Operation": "Change Bot", "Result": "Failure" }
The solution is to explicitly define the key column in the first bot. ie setting qev_id = uniqueid(UUID)
I already had the table column defined with initial value = uniqueid(UUID) however, support clarified "The initial value works when we use the form to add a row but while using bot we have to define all the required columns." .
I feel like some info is missing. It seems like updates to a table happening outside of AppSheet are triggering an appsheet data-change trigger. But I believe these triggers can only be triggered by events occurring within AppSheet. So my first question about the error you are getting is what is triggering the bot?
As far as I know, if you modify the data I gSheet, that should not trigger any Bot. Only manually adds, updates or deleted should be able to trigger the Bot or when adding data with the gForm.
THanks for the input. I'm going to go back to basics and start from first principles. The error is clearly warning me of something - but, as it seems pretty clear I shouldn't be able to do what I'm trying, I'll give it up as a bad job and move on.
Thanks again for trying to help.
I got a solution from support.
My first bot adds a new row to a table.
My second bot "on data change / add" sends an email, from data in that new row.
I got the following error as the second bot fired (and failed).
Error: "Key column 'qev_id' is not present in the Data payload."
Properties: { "Exception": "Key column 'qev_id' is not present in the Data payload.", "AppTemplateName": "8bfa7498-b2ab-4222-a7ea-a4097bf37756", "Operation": "Change Bot", "Result": "Failure" }
The solution is to explicitly define the key column in the first bot. ie setting qev_id = uniqueid(UUID)
I already had the table column defined with initial value = uniqueid(UUID) however, support clarified "The initial value works when we use the form to add a row but while using bot we have to define all the required columns." .
User | Count |
---|---|
41 | |
31 | |
31 | |
16 | |
14 |