Webhook REST API Key not found

Hi team,

I had a webhook that is throwing a REST API error.
It was working a month ago. But now I keep getting an error that the key value cannot be found
I’ve double checked my data source. The record with that value is there.
And it successfully shows when I test the webhook.

I made sure the correct useremail / USER ID was there as well.

But I continue to get the error

Any ideas?

0 15 1,028
15 REPLIES 15

@elan_Bailey
Can you copy&paste your API calls JSON request body here? Do you have any valid_if, editable_if, reset_on_edit formulas in any of the target table columns? Please elaborate.

Thanks for you help LeventK

I don’t have any valid_if or editable_if statements in the target table columns.
I have 2 Change Data workflows that check all new Inquiry records, and if certain columns are filled in then a Barrier or a Breakthrough gets created.

I then have two separate workflow/web hooks that trigger when an Inquiry gets updated.
It looks for the breakthrough or Barrier ID and updates the record.

Here are the API Calls:

Breakthrough

{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“RunAsUserEmail”: “YourEmail@google.com
},
“Rows”: [
{
“Breakthrough ID”: “<<REF_ROWS(“Breakthroughs”, “Source”)>>”,
“Subject”: “<<[Subject]>>”,
“Alignment”: “<<[Alignment]>>”,
“Realignment”: “<<[Realignment]>>”,
“Discovery”: “<<[Discovery]>>”,
“Commitment”: “<<[Commitment]>>”,
“Life Domain”: “<<[Life Domain]>>”,
“Source”: “<<[Reflection ID]>>”
}
]
}
Barriers

{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“RunAsUserEmail”: “YourEmail@google.com
},
“Rows”: [
{
“Barrier ID”: “<<REF_ROWS(“Barriers”, “Source”)>>”,
“Subject”: “<<[Subject]>>”,
“Misalignment”: “<<[Misalignment]>>”,
“Perceived Barriers”: “<<[Perceived Barriers]>>”,
“Hidden Commitments”: “<<[Hidden Commitment]>>”,
“Meaning”: “<<[Meaning]>>”,
“Impact”: “<<[Impact]>>”,
“Desire Gap”: “<<[Desire Gap]>>”,
“Discovery”: “<<[Discovery]>>”,
“Realignment”: “<<[Realignment]>>”,
“Commitment”: “<<[Commitment]>>”,
“Life Domain”: “<<[Life Domain]>>”,
“Source”: “<<[Reflection ID]>>”
}
]
}

I believe your problem generates from the Barrier ID and Breakthrough ID params in the JSON payload. Why do you need to set REF_ROWS(…) expressions for those columns? They are ref columns and will be automatically updated when table data is updated.

Hmmm, I did get help from AppSheet support and was told to enter it this way (with the REF_ROWS).
I tested at that time and it worked successfully.

So are you saying I just need Barrier ID or Breakthrough ID?
From my understanding the first reference is the field in the target table and the second reference is the field in the source table.

So how do I write the reference for the ID Row?
What do I replace “Barrier ID”: “<<REF_ROWS(“Barriers”, “Source”)>>”, with?

@elan_Bailey
If you are trying to update child records from a parent table, than you need to use <<start: …>> expression in your JSON payload. Worth reading below pages:

I’ve reviewed the articles and updated my JSON templates as follows:

{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“RunAsUserEmail”: “YourEmail@google.com
},
“Rows”: [
<<Start: Select(Breakthroughs[Breakthrough ID], TRUE)>>
{
“Subject”: “<<[Subject]>>”,
“Alignment”: “<<[Alignment]>>”,
“Realignment”: “<<[Realignment]>>”,
“Discovery”: “<<[Discovery]>>”,
“Commitment”: “<<[Commitment]>>”,
“Life Domain”: “<<[Life Domain]>>”,
“Source”: “<<[Reflection ID]>>”
},
<>
]
}

I still get an error

Error:
“Row key field ‘Breakthrough ID’ value is missing.”
Properties:
{
“RestAPIVersion”: 2,
“TableName”: “Breakthroughs”,
“AppTemplateVersion”: “4.001322”,
“Action”: “Edit”,
“RestActionType”: “Edit”,
“DataAction”: “App: edit this row”,
“locale”: “en-US”,
“runAsUserEmail”: “YourEmail@google.com”,
“selector”: “”,
“timezone”: “Pacific Standard Time”,
“tzOffset”: “420”,
“userId”: 141441,
“Rows”: 28,
“RowSize”: 11549,
“AppTemplateName”: “e2f3bff9-2204-4acf-90da-568ccef73ad4”,
“Operation”: “REST API invoke”,
“RecordType”: “Stop”,
“ResultSuccess”: false,
“ResultError”: “Row key field ‘Breakthrough ID’ value is missing.”,
“StatusCode”: “BadRequest”,
“Performance”: “{“Version”:1,“Time”:“00:00:00.1847982”,“PerformanceTimingRoot”:{“Mid”:317,“Timer”:{“Time”:“00:00:00.1847982”},“Children”:[{“Mid”:62,“Timer”:{“Time”:“00:00:00.1826604”}}]},“IsEmpty”:false}”,
“Result”: “Failure”
}

You need to specify the key column in the JSON payload, that’s why you are receiving the error

Thanks . I’ll reach out to support.

You don’t need to email support for that. Simply you need to add the key column parameter to your JSON payload as it’s specified in the help documentation as well.



Simple as this:
{
	“Action”: “Edit”,
	“Properties”: {
		“Locale”: “en-US”,
		“Location”: “47.623098, -122.330184”,
		“Timezone”: “Pacific Standard Time”,
		“RunAsUserEmail”: “YourEmail@google.com”
	},
	“Rows”: [
	<<Start: Select(Breakthroughs[Breakthrough ID], TRUE)>>
		{
			“Breakthrough ID”: “<<[Breakthrough ID]>>”, //Key column for the targeted table
			“Subject”: “<<[Subject]>>”,
			“Alignment”: “<<[Alignment]>>”,
			“Realignment”: “<<[Realignment]>>”,
			“Discovery”: “<<[Discovery]>>”,
			“Commitment”: “<<[Commitment]>>”,
			“Life Domain”: “<<[Life Domain]>>”,
			“Source”: “<<[Reflection ID]>>”
		},
	<<End>>
	]
}

Thanks,

I just needed to know the exact way to structure the expression.

I’m now getting the error… “Errors”: “Error: Failed to parse JSON due to Invalid property identifier character: “. Path ‘Rows[0]’, line 13, position 1… Invalid JSON value starts with: },\n \n\t{\n\t“Breakthrough ID”: “8b96f837”,…”

@elan_Bailey
That might be because of the apostrophes provided you have copied&pasted the payload from my post directly. Try with this one:

{
	"Action": "Edit",
	"Properties": {
		"Locale": "en-US",
		"Location": "47.623098, -122.330184",
		"Timezone": "Pacific Standard Time",
		"RunAsUserEmail": "YourEmail@google.com"
	},
	"Rows": [
	<<Start: Select(Breakthroughs[Breakthrough ID], TRUE)>>
		{
			"Breakthrough ID": "<<[Breakthrough ID]>>",
			"Subject": "<<[Subject]>>",
			"Alignment": "<<[Alignment]>>",
			"Realignment": "<<[Realignment]>>",
			"Discovery": "<<[Discovery]>>",
			"Commitment": "<<[Commitment]>>",
			"Life Domain": "<<[Life Domain]>>",
			"Source": "<<[Reflection ID]>>"
		},
	<<End>>
	]
}

No luck,

I’ve copy and pasted.
And manually replaced every comma/apostrophe in every row.
I’ve removed any extra spaces.

Oh and now I’m back to getting the error that the row key doesn’t exist.
So frustrating

I reversed my last update and am back to the invalid property error:
“Errors”: “Error: Failed to parse JSON due to Invalid property identifier character: “. Path ‘Rows[0]’, line 1, position 176… Invalid JSON value starts with: “Breakthrough ID”: “351d3f74”,\t"Subject”: “”,“Alignment”: “Just following through…”,

@elan_Bailey
The error points out to an invalid JSON value so the error is either generating from the payload or the data itself. As I don’t have any info about your app build, table schema etc., it’s hard to say anything. As far as I have checked the JSON payload, it seems correct. May be @Phil needs to intervene here and check your workflow.

Thanks for everything you’ve done to help @LeventK

Hopefully someone from the AppSheet team can check behind the scenes and help me find the source.

Did you ever find the cause of this issue? I’m having the same problem with “Row having key not found” and absolutely cannot find the cause.

Top Labels in this Space