Creating webhook to update the columns from one app to another app

I need to update the the columns from one app to another app.

In the annualloadbook app I need to update the, Table {Trucks} Column [Last Inspection]

From the inspection app Table {Equipment} Column [Last Inspection]

{
“Action”: “Add”,
“Properties”: {
“Locale”: “en-US”,
},
“Rows”: {
[
“id_truck”: “<<[ID]>>”,
“Last Inspection”: “<<[Last Inspection]>>”}
]
}

I’m getting an error and I’m unable to see what’s wrong if anyone can spot it please

![IMG_0552.png|2388x1668](upload://899W5XMh3sTTPupAiYYc4RpLZVC.png)


Hi @Jack_Bates

One bracket was misplaced :slightly_smiling_face:

Can you try:

{
  "Action": "Add",
  "Properties": {
  "Locale": "en-US",
  },
  "Rows": {
    [
      "id_truck": "<<[ID]>>",
      "Last Inspection": "<<[Last Inspection]>>"
    ]
  }
}

I’ll try that and let you know
Thank you
Jack

I’m still getting the error I don’t quite understand

I tried to make it come from the Inspection table Virtual column [Vehicle Inspection Date] that is where the table Equipment column [Last Inspection] gets the date from

I just need to update the date in table Trucks [Last Inspection]

Am I missing something?

  • Error 1 : Failed to parse JSON due to Invalid property identifier character: [. Path ‘Rows’, line 1, position 61.. Invalid JSON value starts with: [“id_truck”: “e594058b”,“Last Inspection”: “f093af0a”]}}

{
“Action”: “Add”,
“Properties”: {
“Locale”: “en-US”,
},
“Rows”: {
[
“id_truck”: “<<[ID]>>”,
“Last Inspection”: “<<[Last Inspection]>>”
]
}
}

but:

What about using “Edit” instead?

Update records in a table - AppSheet Help

EDIT:

At looking at the documentation, brackets are being reversed, and one comma must be removed after the “locale” part.

Can you try this:

{
"Action": "Edit",
"Properties": {
"Locale": "en-US"
},
"Rows": [
{
"id_truck": "<<[ID]>>",
"Last Inspection": "<<[Last Inspection]>>"
}
]
}

I changed the Action to Edit and still have the same error

I noticed the ApplicationAccessKey was missing is disappeared after I edited the action and saved it

HTTP Headers

Optional HTTP headers. (Expressions that yield HTTP header names or values are supported.)

Every time I edit it here and put the access key back in and save it disappears

In the error that is the right [ID] for the Truck and that is the right date for the Inspection date

Replaced brackets and removed the coma after “Locale”

It tested OK

Thank you Ill test it to see if the data is moving

Thank you for the help

After testing it says in the monitor that it was a success but the data in the destination [Last Inspection] didn’t change

The Column [Last Inspection] should have updated to 10/28/2024

As of the last few tests I’m not getting any errors and on execute it says success

But its still not changing the Last Inspection Date in the destination column

It looks correct you can see the Truck [ID] matches and the [Last Inspection] date is correct 10/28/2024

But it did not change the date in the destination column [Last Inspection] Type Date

I’m afraid I don’t see how to help you further.

You may want to consider contacting Support Team here: Contact Us - AppSheet Help

Are there any bots in your destination app that will trigger on the record update you are sending? Could they be resetting the data?

The bot sends an email when the days since Last Inspection is greater than
the inspection interval.

If the API returns success that means the API request was sent…that’s all.
We need to see the audit log of the App the request was sent to. It is that App where the proper error messages for why it couldn’t carry out the request will be displayed…

Scott Thank you I didn’t know to look there.

It looks to me that it is only looking at the Key column [id_truck] which doesn’t need to be edited as the id_truck in the destination app is the same ID in the host app.

It’s the [Last Inspection] column that needs to update and I don’t see it included her in the log

I posted the audit log for the destination app

it is show only the id_truck key column not the [Last Inspection] date


I do see something wrong. I reran the API by doing another inspection in host app I’m signed in both app using the same email.

The API was a success and it does now include both the [id_truck] Key column and the edit column [Last Inspection]

What I am noticing and i’m not sure but the host app sends API under the jacknrene email

The destination app receives under the annualloadbook email

Look at the image for the latest API call

It looks like its sending under one email account and receiving under the owner email account

Are you the owner of both apps though? If not, do you have edit rights (through the app) to the table you are trying to update? Does that field on the table have any constraints on it? For instance, no edits if there is already a value stored etc.

I am the Owner of both apps Under the annualloadbook email

I am also a user under the jacknrene email and I do have edit rights on both apps for the table and the columns in those tables

No constraints that my user privilege would stop

security filter on destination app Table trucks

LOOKUP(USEREMAIL(), App User, “EMAIL", “Type”) = “SOLO”, [CreationEmail] = USEREMAIL()

Security filter on Host app table Equipment

OR(USEREMAIL()=[Created By],USEREMAIL()=(PII Removed by Staff))

Question, Why would it send request by user jacknrene and receive request using the annualloadbook email when both apps are logged in as jacknrene

The equipment inspection date that it’s sending belongs to jacknrene email