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.pngIMG_0551.pngIMG_0553.png

Solved Solved
1 27 675
1 ACCEPTED SOLUTION

This is a long one!

From all the screenshots and auditing logs you've provided I've been trying to work out the structure of your apps and how they pass data around between them.

  • I have guessed that you have a table of Equipment, EquipmentInspections and a table of EquipmentServices
  • For each Item of Equipment, there will be MANY EquipmentInspections and MANY EquipmentServices
  • Each EquipmentInspection and EquipmentService record is automatically added once the Inspection/Service Interval has elapsed and the correct Inspector is informed to do the task.
  • The responsible person is using a different APP, possibly on a mobile device, to perform the inspection/service.
  • That person marks the inspection/service as completed...whereupon a BOT tries to inform the PARENT Equipment that a NEW Inspection/Service has been completed and it should use the ID of this new record in the [Last Inspection]/[Last Service] column.
  • The BOT informs the PARENT Equipment record using the Appsheet API thus simplifying the Inspector's App
  • The correct JSON Body has been provided to do a record UPDATE (Edit) and the KEY of the Parent being UPDATED and the KEY of the Inspection/Service record to be stored in the PARENT record is passed correctly.
  • The RECEIVING APP's audit history suggests that an API request was received, but the KEY of the inspection/Service record is missing.  Consequently, no update of the parent record's [Last Inspection] column is made.

Now you have said that it confused you about the email addresses of the api request being different for the originating app and the receiving app, but I don't think that matters as all BOTS run as the APP OWNER.  Yes, the data that is available to a BOT can depend on the user who is logged on at the time, but there is a toggle switch on every bot that allows the bot to ignore any security filters etc when running.

Also, your API request to the MAIN app would not care about the USER who sent the request.  It's job is purely to perform the record update and then to execute any bots in your main app that are triggered by that record update (if any).  The only way to make those bots DEPEND on a specific user is if you also sent the userid in your record update and we can see from your JSON that you are not doing this.

So...what the hell is going on?  Everything looks normal apart from the spectre of another TABLE called Trucks?  How does this table fit into the mix?  Are you sure that the record update is being sent to the correct table?  A screenshot of your bots TASK settings would be helpful here.  In fact screenshots of your data and sheets would be much improved if you HIDE all the columns we don't need to see and show only the record KEY and the Columns that are important.  Also your screenshots don't give the TABLE names?  What is DATA supposed to represent...is this maybe just something from mobile Sheets...would be better to give us shots from web sheets ๐Ÿ˜

Hope you can see there is a determination to help you fix this problem from the community ๐Ÿ˜ƒ

 

View solution in original post

27 REPLIES 27
Top Labels in this Space