Save to Webhook

Sending JSON data to POST URL on your Plumsail Documents fails when I include:

  • Dropdown (with multiple selection enabled)
  • Table (which contains dropdown with multiple selection enabled)

JSON data is "formatted" like this:

{
"SheetNo": "{{@number}}",
"date": "{{@date}}",
"Name": "{{Name}}",
"Type": "{{Type}}"
}

Webhook.site returns the following when I include either/both of the above:
image

Just wondering if anyone has any ideas how to fix or ever encountered this "issue"?

I'd like to push through both the dropdown and the table.

Thanks,
V.

Thanks!

Hi @Viorel,

This is because Dropdown and Table are of array datatype, not string like all other values in your JSON data. Thus, when saving data to webhook, an error occurs if you define array as string (put it in double quotes) like so:

"Table": "{{Table}}"

For the data to be pulled through correctly, any array values should be placed without double quotes as follows:

"Table": {{Table}}

1 Like

Hi Anton,

This worked perfectly when sending to webhook.site

How do I get it to transmit the data to Power Automate

Using "Table": {{Table}} in Power Automate for the HTTP trigger to generate schema returns the following error:

Thank you!

Hi @Viorel,

Here, you should paste a sample of your raw JSON payload (input data). It is the data that you use to populate the template or to test it. Simply put, you should replace {{Table}} with an array of data like so:

{
   "Name": "TestName",
   "Type": "TestType",
   "Table": [
      {
         "data": "..."
      }
   ]
}

Hope this makes sense!

@a.cox What am I doing wrong?

It doesn't work :man_shrugging:

{
"SheetNo": "{{@number}}",
"date": "{{@date}}",
"Name": "{{Name}}",
"Type": "{{Type}}",
"JobNumber": "{{JobNumber}}",
"OpComments": "{{OpComments}}",
"StartTime": "{{StartTime}}",
"FinishTime": "{{FinishTime}}",
"WaitingTime": "{{WaitingTime}}",
"DelaysObstructions": "{{DelaysObstructions}}",
"DOComments": "{{DOComments}}",
"Signature": "{{Signature}}",
"RepName": "{{RepName}}",
"Position": "{{Position}}",
"RepEmail": "{{RepEmail}}",
"ClientRepComments": "{{ClientRepComments}}",
"Table": [
{
"Seal": "Seal",
"Location": "Location",
"Length": "Length",
"Height": "Height",
"MaterialManufacturer": "MaterialManufacturer",
"OtherMaterial": "OtherMaterial",
"Placement": "Placement",
"Treatment": "Treatment",
"SealType": "SealType",
"SpecialType": "SpecialType",
"InstalledBy": "InstalledBy",
"Drawing": "Drawing",
"Ref": "Ref"
}
]

}

@Viorel,

Did you manage to input this JSON into the window to generate the schema? If the schema has been generated fine, is the data not getting through to Power Automate, or is it something else?

Yup so it accepted the above to generate the schema.
But when I select the fields to populate in an excel file, the data won't come through.

I'm getting this error:

image

image

I've added a few of table values from the HTTP trigger to the excel part and the flow fails. I've tried one a few different table values and the flow still fails:

If I remove the Apply to each step, and don't add any of the table values:

The data still doesn't pull through to the excel file but the flow succeeds.

Hi @Viorel,

What if you generate the schema from a JSON without the Table array and then apply it to the Excel action? Is there any result?

Btw, if you just put static values in the Excel action, does it generate a correct Excel file? If yes, try to add some dynamic values one by one and check when it starts to fail to add the data to the result excel file.

Best regards,
Petr
Plumsail team

Hi Petr,

I've sorted this with Anton.

Arrays have to be brought over like this {{FieldName}} as supposed to what I was doing which was "{{FieldName}}"

1 Like