Help understanding "Key column 'member_id' is not present in the Data payload"

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):

Error: "Key column 'member_id' is not present in the Data payload."
Properties: { "Exception": "Key column 'member_id' is not present in the Data payload.", "AppTemplateName": "f26ffb08-c11a-4e3d-9681-586b7b867907", "Operation": "Change Bot", "Result": "Failure" }
 
I can't find reference to this error in the documentation , forum or online.  I have confirmed the key column is present and filled with a valid value in the Google Sheet.
 
What's it trying to tell me (beyond the obvious!), and any thoughts on why and how can I fix or workaround?
Solved Solved
0 4 69
1 ACCEPTED 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." .

View solution in original post

4 REPLIES 4

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." .

Top Labels in this Space