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?


image

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.

Did that get you past the problem?

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.

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.”}”

@Phil
+ is not working good and as expected with the API. %20 is a better choice. FYI.

Ok tried %20 and it worked! I’ll put this in my notes. Thanks so much for your help Phil!

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")>>
1 Like

Got it. Inserting to notes as well. A million thanks!

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”
}

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