Iโm getting a Page Not Found when attempting to View a Body Template from the Workflow Webhook option. I ran the app from IE vs. Chrome but Iโm getting the same error. Can someone assist?
Please try clicking the โbrowseโ icon just after the file name. Then navigating to the template file.
That will ensure the template file is present and you are using the right template file name.
Thanks Phil, I was creating a new template and needing the default JSON data the system generates for reference but with the Page Not Found Iโm unable to generate the first copy.
What do you see if you go to:
checking nowโฆ
ok followed the path for the app referencing AppID etc. and see no new template has generated.
Unfortunately Iโm in a time crunch and needed the JSON Body Text for copying a parent/child record - Quote Header along with its corresponding Quote Products. Do you have any samples for a webhook handy I could quickly reference? I can type it in manually until I figure out why this isnโt generating.
Anything would help. Thanks Phil
The template is not being created because your webhook URL does not specify a table name.
We retrieve the schema based on the table name. Your URL specified something other than a table name, so the schema could not be found. As a result, we did not generate a JSON template.
I modified the URL for rule โcopyquoteโ to specify table โQuote Headerโ. It then generated a JSON body for table โQuote Headerโ.
You should create a second webhook rule for table โQuote Detailโ. Make sure the URL includes that table name. Then generate the JSON template for it.
The REST API is not currently capable of inserting parents and children in a single call. You need to call once to create the parent. You need to call a second time to create the children. You can add one or more child records in the second call.
Thanks Phil, Iโll create two webhooks for the header and detail. I was testing in that database but have the URL correct in my live db FTSFieldOperations-876021 - or so I thought. I came across this error that states the url is not โwell formedโ: I referenced this article to help ensure I had a good format. https://help.appsheet.com/integrations/api/example-copying-newly-added-records Note: I have another workflow for quotes invoking on this db that works great.
Hi Phil, just an update it looks like the second webhook is not triggering as thereโs no activity in the audit logs. I created an action to update a field called Copy and set it to TRUE. I was hoping the Update would have triggered the second webhook but not sure if it recognizes the field update as an update if it was not a manual one.
Will standby. Thanks
Did that get you past the problem?
Your table name has a blank in it. The blank must be replaced by either + or %20
Error:
โ{โMessageโ:โREST API invoke request failed: Table or slice โQuote+Headerโ was not found.โ}โ
Ok tried %20 and it worked! Iโll put this in my notes. Thanks so much for your help Phil!
@Phil
+
is not working good and as expected with the API. %20
is a better choice. FYI.
Thanks Levent!
@Daisy_Ramirez
Providing the endpoint URL like this; is an option too:
<<CONCATENATE("https://api.appsheet.com/api/v2/apps/{appId}/tables/",ENCODEURL(_TABLENAME),"/Action")>>
Got it. Inserting to notes as well. A million thanks!
[quote=โDaisy_Ramirez, post:20, topic:10034, full:trueโ]
Hi Levent, would you know how to trigger a second webhook from the first? See notes to Phil on this question.
"Just an update it looks like the second webhook is not triggering as thereโs no activity in the audit logs. I created an action to update a field called Copy and set it to TRUE. I was hoping the Update would have triggered the second webhook but not sure if it recognizes the field update as a workflow โupdateโ if it was not a manual one.
Will standby. Thanks Levent
@Daisy_Ramirez
Iโm afraid a data change with workflow cannot trigger a second webhook unless you are not doing it with API. Only if you use API to change the data, it will trigger the actions and workflows associated with that table. But of course @Phil can explain better.
Hi Levent, so I could first run an Edit webhook but how would I run the edit on the 2nd table (child)?
Thanks Levent! I learn something new every day.
Hi Phil, sorry but it looks like I have an error when creating the webhook for the Quote Detail (children). Iโve set the header webhook to mark each of the Quote Detail records โCopyโ so when the Quote Detail webhook recognizes the record has been updated itโll invoke the workflow to Add the records. The workflow runs when I press Test but hereโs the error I get in the logs when I run it live: Should I not be using โAddโ as the action?
Error:
โ{โRowsโ: [{โ_RowNumber": โ9โ,โquote_idโ: โf64a05fdโ,โQuantityโ: โ2โ,โProductโ: โRE66100P-XX-Xโ,โNotesโ: โHhhjโ,โCopyโ: โFalseโ,โNew Quoteโ: โโ,โEntered byโ: "daisyramirez.methods@gmail.com",โDate Time Enteredโ: โ04/25/2019 23:18:20โ,โquote_detail_idโ: โ810f93cbโ,โvir_priceโ: โ75โ,โvir_ext_materialsโ: โ150โ,โvir_install_timeโ: โ3โ,โvir_ext_installationโ: โ130โ,โvir_total_saleโ: โ280โ,โvir_bill_typeโ: โOne Timeโ,โvir_categoryโ: โPanelโ,โvir_commission_amtโ: โ48โ,โvir_product_imageโ: โProducts::Products_Images/RE66100P-XX-X.Image.112236.jpgโ,โvir_tax_amtโ: โ10.69โ,โvir_ext_material_costsโ: โ127.5โ}] }"
Properties:
{
โTableNameโ: โQuote Detailโ,
โActionโ: โAddโ,
โRestActionTypeโ: โAddโ,
โDataActionโ: โApp: add a new row (not a row-level action)โ,
โlocaleโ: โen-USโ,
โlocationโ: โ47.623098, -122.330184โ,
โrunAsUserEmailโ: "daisyramirez.methods@gmail.com",
โtimezoneโ: โPacific Standard Timeโ,
โtzOffsetโ: โ420โ,
โuserIdโ: 913283,
โRowsโ: 1,
โRowSizeโ: 52,
โAppTemplateNameโ: โb432d3eb-721e-4648-9834-3e6582ce7cfcโ,
โOperationโ: โREST API invokeโ,
โRecordTypeโ: โStopโ,
โStatusCodeโ: โOKโ,
โPerformanceโ: โ{โVersionโ:1,โTimeโ:โ00:00:02.1732462โ,โPerformanceTimingRootโ:{โMidโ:317,โTimerโ:{โTimeโ:โ00:00:02.1732462โ},โChildrenโ:[{โMidโ:62,โTimerโ:{โTimeโ:โ00:00:00.0656840โ}},{โMidโ:318,โTimerโ:{โTimeโ:โ00:00:02.1035908โ},โChildrenโ:[{โMidโ:314,โTimerโ:{โTimeโ:โ00:00:02.1035824โ},โChildrenโ:[{โMidโ:335,โTimerโ:{โTimeโ:โ00:00:01.2581163โ},โChildrenโ:[{โMidโ:330,โTimerโ:{โTimeโ:โ00:00:01.2578110โ},โChildrenโ:[{โMidโ:19,โTimerโ:{โTimeโ:โ00:00:01.2568621โ},โChildrenโ:[{โMidโ:18,โParamsโ:{โParamListโ:[{โPidโ:1,โValueโ:โvir_categoryโ}]},โTimerโ:{โTimeโ:โ00:00:01.2567964โ},โChildrenโ:[{โMidโ:32,โParamsโ:{โParamListโ:},โTimerโ:{โTimeโ:โ00:00:00.8345080โ},โChildrenโ:[{โMidโ:32,โParamsโ:{โParamListโ:[{โPidโ:13,โValueโ:โProduct Categoryโ}]},โTimerโ:{โTimeโ:โ00:00:00.8345024โ},โChildrenโ:[{โMidโ:33,โParamsโ:{โParamListโ:[{โPidโ:9,โValueโ:โ10โ}]},โTimerโ:{โTimeโ:โ00:00:00.8320342โ},โChildrenโ:[{โMidโ:133,โTimerโ:{โTimeโ:โ00:00:00.4368808โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โgetDriveItemโ}]},โTimerโ:{โTimeโ:โ00:00:00.3296347โ}},{โMidโ:278,โTimerโ:{โTimeโ:โ00:00:00.1067605โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โrequestโ}]},โTimerโ:{โTimeโ:โ00:00:00.1066522โ},โChildrenโ:}]}]}]}]}]},{โMidโ:32,โParamsโ:{โParamListโ:},โTimerโ:{โTimeโ:โ00:00:00.4212059โ},โChildrenโ:[{โMidโ:32,โParamsโ:{โParamListโ:[{โPidโ:13,โValueโ:โProductsโ}]},โTimerโ:{โTimeโ:โ00:00:00.4212004โ},โChildrenโ:[{โMidโ:33,โParamsโ:{โParamListโ:[{โPidโ:9,โValueโ:โ42โ}]},โTimerโ:{โTimeโ:โ00:00:00.4208102โ},โChildrenโ:[{โMidโ:133,โTimerโ:{โTimeโ:โ00:00:00.4181439โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โgetDriveItemโ}]},โTimerโ:{โTimeโ:โ00:00:00.2815970โ}},{โMidโ:278,โTimerโ:{โTimeโ:โ00:00:00.1336735โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โrequestโ}]},โTimerโ:{โTimeโ:โ00:00:00.1335656โ},โChildrenโ:}]}]}]}]}]}]}]}]}]},{โMidโ:331,โTimerโ:{โTimeโ:โ00:00:00.6192503โ},โChildrenโ:[{โMidโ:19,โTimerโ:{โTimeโ:โ00:00:00.6151471โ},โChildrenโ:[{โMidโ:18,โParamsโ:{โParamListโ:[{โPidโ:1,โValueโ:โvir_tax_amtโ}]},โTimerโ:{โTimeโ:โ00:00:00.6150846โ},โChildrenโ:[{โMidโ:32,โParamsโ:{โParamListโ:},โTimerโ:{โTimeโ:โ00:00:00.6149034โ},โChildrenโ:[{โMidโ:32,โParamsโ:{โParamListโ:[{โPidโ:13,โValueโ:โQuote Headerโ}]},โTimerโ:{โTimeโ:โ00:00:00.6148954โ},โChildrenโ:[{โMidโ:33,โParamsโ:{โParamListโ:[{โPidโ:9,โValueโ:โ8โ}]},โTimerโ:{โTimeโ:โ00:00:00.6144304โ},โChildrenโ:[{โMidโ:133,โTimerโ:{โTimeโ:โ00:00:00.6057306โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โgetDriveItemโ}]},โTimerโ:{โTimeโ:โ00:00:00.4977060โ}},{โMidโ:278,โTimerโ:{โTimeโ:โ00:00:00.1066469โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โrequestโ}]},โTimerโ:{โTimeโ:โ00:00:00.1065332โ},โChildrenโ:}]}]},{โMidโ:15,โTimerโ:{โTimeโ:โ00:00:00.0086013โ}}]}]}]}]}]}]},{โMidโ:100,โTimerโ:{โTimeโ:โ00:00:00.2248028โ},โChildrenโ:[{โMidโ:108,โTimerโ:{โTimeโ:โ00:00:00.2248000โ},โChildrenโ:[{โMidโ:101,โTimerโ:{โTimeโ:โ00:00:00.2247090โ},โChildrenโ:[{โMidโ:21,โTimerโ:{โTimeโ:โ00:00:00.2238662โ},โChildrenโ:[{โMidโ:256,โTimerโ:{โTimeโ:โ00:00:00.2172075โ},โChildrenโ:[{โMidโ:278,โTimerโ:{โTimeโ:โ00:00:00.1096207โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โrequestโ}]},โTimerโ:{โTimeโ:โ00:00:00.1095491โ},โChildrenโ:}]},{โMidโ:277,โTimerโ:{โTimeโ:โ00:00:00.1075815โ},โChildrenโ:[{โMidโ:276,โTimerโ:{โTimeโ:โ00:00:00.1068729โ},โChildrenโ:[{โMidโ:282,โParamsโ:{โParamListโ:[{โPidโ:16,โValueโ:โaddOrUpdateRowsโ}]},โTimerโ:{โTimeโ:โ00:00:00.1068456โ},โChildrenโ:}]}]}]}]}]}]}]}]}]}]},โIsEmptyโ:false}โ,
โResultโ: โSuccessโ
}
Are you expecting a workflow DataChange action to trigger a webhook workflow rule?
If so, that will not work because workflow DataChanges never trigger any form of workflow rule.
Yes, ok what if I change the data of the 2nd table (child) from the 1st table (parent) in Parent/Child type of form - will this get it to trigger?
Will an action data change trigger the workflow webhooks?
I am not sure I understand the big picture, but here are the rules:
A Workflow can be triggered by:
A workflow cannot be triggered by:
A single workflow rule can invoke a sequence of workflow actions.
These actions can include a sequence of webhook calls that invoke the REST API.
Not sure if that will help in your case.
User | Count |
---|---|
43 | |
34 | |
27 | |
23 | |
15 |