Adding X rows to table via appSheet API

I have a workflow that I want to run nightly. The point of this workflow is to send a GET request to an API and get a massive JSON obj. its around 2500 rows. It would then add those rows to a table.

Below is a snippet example of what the API I'm sending a GET request looks like.

 

[
    {
        "bac": "XXX",
        "programCode": "XXX",
        "dealerName": "XXX",
        "formId": XXX,
        "isTerminated": XXX,
        "terminatedDate": "XXX",
        "provider": "XXX",
        "enrollmentStatus": "XXX",
        "submittedDate": "XXX",
        "updatedOn": "XXX",
        "productId": XXX,
        "productName": "XXX",
        "productStatus": "XXX",
        "activeDate": "XXX",
        "canceledDate": "XXX",
        "startBillDate": "XXX",
        "endBillDate": "XXX",
        "isSecondary": XXX,
        "isPackage": XXX,
        "gcProductName": "XXX",
        "isAllCancelled": XXX,
        "isEditable": XXX,
        "isProviderChanged": XXX,
        "dateOverwritten": XXX,
        "occurrence": "XXX",
        "quantity": XXX,
        "qtyRequired": XXX,
        "packageInclusionBilling": XXX,
        "expired90Days": XXX,
        "isLess90": XXX,
        "isExpired": XXX,
        "is7DaysSubmitted": XXX,
        "is7DaysUpdated": XXX,
        "isLast48": XXX
    },
    {
        "bac": "XXX",
        "programCode": "XXX",
        "dealerName": "XXX",
        "formId": XXX,
        "isTerminated": XXX,
        "terminatedDate": "XXX",
        "provider": "XXX",
        "enrollmentStatus": "XXX",
        "submittedDate": "XXX",
        "updatedOn": "XXX",
        "productId": XXX,
        "productName": "XXX",
        "productStatus": "XXX",
        "activeDate": "XXX",
        "canceledDate": "XXX",
        "startBillDate": "XXX",
        "endBillDate": "XXX",
        "isSecondary": XXX,
        "isPackage": XXX,
        "gcProductName": "XXX",
        "isAllCancelled": XXX,
        "isEditable": XXX,
        "isProviderChanged": XXX,
        "dateOverwritten": XXX,
        "occurrence": "XXX",
        "quantity": XXX,
        "qtyRequired": XXX,
        "packageInclusionBilling": XXX,
        "expired90Days": XXX,
        "isLess90": XXX,
        "isExpired": XXX,
        "is7DaysSubmitted": XXX,
        "is7DaysUpdated": XXX,
        "isLast48": XXX
    }
]

 

 My question here is how do I work with this JSON object to insert the rows into an appsheet DB or table? 

I thought about using an appsheet API webhook, but I'm at a loss for how to write the body. Here is an example I tried:

 

{
"Action": "Add",
"Properties": {
   "Locale": "en-US",
   "Location": "47.623098, -122.330184",
   "Timezone": "Pacific Standard Time",
   "UserSettings": {
      "Option 1": "value1",
      "Option 2": "value2"
   }
},
"Rows": [
 {
  "productId": "<<[send hook].[productId]>>"
 }
]

 

This failed with err 

Error 1 : Failed to parse JSON due to Unexpected end when deserializing object. Path 'Rows', line 1, position 211..

 

0 1 49
1 REPLY 1

One thing for sure is that you are missing a closing }.

Top Labels in this Space