New Bug Encountered:Google Docs not opening from Workflow Body Template

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?


2X_f_f04a58ed218ba00825bf55277a44a75247f09388.png

0 26 1,769
26 REPLIES 26

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:

  1. The โ€œDefault folder pathโ€ for your account. It is on the Account > Settings pane.
  2. Open the folder named for your app.
  3. Open the Content folder.
  4. That is where we write the template file

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:

  1. Any change made by the client.The client change can occur because of a user enter value or an action performed on the client.
  2. A change made by the REST API.

A workflow cannot be triggered by:

  1. A DataChange invoked by a workflow rule. (We do not do this because were worried that this might lead to infinite recursion. One DataChange might make a change that triggers another workflow rule. That workflow rule might make a DataChange that triggers yet another workflow rule. If the user is not careful this can result in loops where: A triggers B, which triggers C, which triggers A, which triggers B, which triggers C, and so forth in an infinite loop.)

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.

Top Labels in this Space