Webhook Issue: Nested Table is Empty on Add, but Populates on Update

 

Hi everyone,

I’m facing an issue with a webhook in my AppSheet automation. The webhook sends data from the app to an external service, including both main table and nested table data. Here’s a simplified example:

Webhook Call on Add (Add Event):

 

 

{
  "id_record": "abc12345",
  "item_code": "",
  "category": "Example Category",
  "record_type": "Single Entry",
  "name": "",
  "year": "",
  "reference_id": "",
  "url": "",
  "status": "Pending",
  "created_at": "19.09.2024 13:11:23",
  "created_by": "user@example.com",
  "related_items": []
}

 

 

 

Webhook Call on Update (Update Event):

 

 

 

{
  "id_record": "abc12345",
  "item_code": "",
  "category": "Example Category",
  "record_type": "Single Entry",
  "name": "",
  "year": "",
  "reference_id": "",
  "url": "",
  "status": "Pending",
  "created_at": "19.09.2024 13:11:23",
  "created_by": "user@example.com",
  "related_items": [
    {
      "id_related_item": "xyz67890",
      "url": "exampleurl.com",
      "name": "Example Item",
      "year": "2024",
      "reference_id": "",
      "status": "Pending",
      "created_at": "",
      "created_by": ""
    }
  ]
}

 

 

The Problem:

When I add a new record through the form, the webhook sends the main table values correctly to the external service, but the nested table (related_items) remains empty. However, when I edit and update the same record, the nested table values are sent correctly. I want the webhook to send the nested table data on the initial record creation.

 

Here is the JSON template I’m using for the webhook:

 

 

{
   "id_record": "<<[id_record]>>",
   "item_code": "<<[item_code]>>",
   "category": "<<[category]>>",
   "record_type": "<<[record_type]>>",
   "name": "<<[name]>>",
   "year": "<<[year]>>",
   "reference_id": "<<[reference_id]>>",
   "url": "<<[url]>>",
   "status": "<<[status]>>",
   "created_at": "<<[created_at]>>",
   "created_by": "<<[created_by]>>",
   "related_items": [
      <<Start: [Related items]>>
      {
         "id_related_item": "<<[id_related_item]>>",
         "url": "<<[url]>>",
         "name": "<<[name]>>",
         "year": "<<[year]>>",
         "reference_id": "<<[reference_id]>>",
         "status": "<<[status]>>",
         "created_at": "<<[created_at]>>",
         "created_by": "<<[created_by]>>"
      }
      <<End>>
   ]
}

 

 

Question:
Does anyone know why the webhook sends the nested table values only on update and not on the initial record creation? How can I ensure that both the main and nested table data are sent on the first add event?

Thanks in advance for your help!

0 1 78
1 REPLY 1
Top Labels in this Space