Using Webhook API to copy updated record to another table

Jin_Tan
Participant V

Hi,

I am using workflow rule to trigger Webhook so that i can copy the updated record to another table.
I have been following the instruction from this document:
https://help.appsheet.com/en/articles/2393264-example-copying-updated-records

However, the workflow rules did not copy the updated record to another table.
What could go wrong? Is there any sample app i can follow or any video tutorial which can help me solve this?

This is my JSON body template where i insert it in a google word that i created in โ€œBody Templateโ€.
{
โ€œActionโ€: โ€œEditโ€,
โ€œPropertiesโ€: {
โ€œLocaleโ€: โ€œen-UK,
โ€œLocationโ€: โ€œ47.623098, -122.330184โ€,
โ€œTimezoneโ€: โ€œPacific Standard Timeโ€,
โ€œUserSettingsโ€: {
โ€œOption 1โ€: โ€œvalue1โ€,
โ€œOption 2โ€: โ€œvalue2โ€
}
},
โ€œRowsโ€: [
{
โ€œSewing Order Details IDโ€: โ€œ<<[Sewing Order Details ID]>>โ€
โ€œSubCon": โ€œ<<[SubCon]>>โ€

}

]
}

0 13 1,328
13 REPLIES 13

MultiTech
Participant V

I think youโ€™re missing a comma
Screenshot_20190807-211707|281x500

Jin_Tan
Participant V

MultiTech_Visions Thanks, that is a good catch.

However the webhook is still unable to run properly.

When i look at the Log of this workflow rule, it shows this error:
Error:
โ€œWebhook HTTP post request failed with exception {โ€œMessageโ€:โ€œREST API invoke request failed: Web API is not enabled for this application.โ€} The remote server returned an error: (403) Forbidden.โ€

What does it mean?

What plan do you have? It may be because that account is not a Business Plan.

The app is still under prototype stage.

Hi @Bellave_Jayaram thank you for all your help on many posts of this community. Could you confirm if the rest API only works on deployed apps?

Thanks in advance!

I do not think so. To be sure, if it is not working in prototype mode for you, you can check with support@appsheet.com by giving details of your account and app. Good luck.

Thankyou so much for your answer @Bellave_Jayaram

Have you enabled the API as described here https://help.appsheet.com/en/articles/1979976-enabling-the-api

Yes i have enabled it.

That error is only reported when the web API is not enabled.
Is it enabled on the app that is the target of the webhook?

My web API is working fine now.

I recreate a new spreadsheet and start to test with one column which works.

When the Web API is successful to add data to the new spreadsheet then only i add the rest of the column to the new spread sheet.

I get the following error with my webhook while trying to make an api call:
โ€œErrorsโ€: โ€œError: Workflow rule โ€˜On Change in Asset Protectionโ€™ โ€˜Bodyโ€™ template properties could not be obtained due to Illegal characters in path. โ†’ Filepath contains invalid path character: Filepath argument โ€˜{ โ€œActionโ€: โ€œAddโ€, โ€œPropertiesโ€: { โ€œLocaleโ€: โ€œen-USโ€, โ€œLocationโ€: โ€œ47.623098, -122.330184โ€, โ€œTimezoneโ€: โ€œPacific Standard Timeโ€, โ€œRowsโ€: { โ€œCustomerโ€: โ€œ<<[CustNbr]>>โ€, โ€œStatusโ€: โ€œ<<[Status]>>โ€, โ€œTimestampโ€: โ€œ<<[Now()]>>โ€ } } }โ€™ passed to method โ€˜IdMappingFileProvider.translatePathโ€™ contains an invalid path character 'โ€โ€™, โ€˜0022โ€™. Error: Workflow rule โ€˜On Change in Asset Protectionโ€™ โ€˜Bodyโ€™ template could not be read due to FileMimeType โ€˜โ€™ is unexpectedโ€ฆ",

It looks like you may have entered the Body template value into the Body Template property. The Body template value should go into the Body property. The Body Template property should contain the file name of the Body Template file, if you have one.

Top Labels in this Space