I’m trying to call an Appsheet action through a script (Image), I can see the script being called (im using a bot to call the script), but the action isn’t triggered. Can anyone help me with this. thanks.
Have you checked your audit history in your application to see if the API was invoked and if any errors were encountered?
Audit history:
Properties: { "EventType": "Change", "InvokedBy": "Add", "AppTemplateVersion": "1.000384", "Process Name": "Process for New bot - 1", "ServerRegion": "europe-west4", "TableName": "Public Form", "OperationUpdateMode": "ADDS_ONLY", "EventMatch": "Workflow event successfully matched", "IgnoreSecurityFilters": true, "Condition": "=true", "MatchesCondition": "True", "Success": true, "ReturnValue": "{ \"nullValue\": \"NULL_VALUE\" }", "Task Type": "AppsScript", "Task Name": "New step 2 Task - 1", "ScriptId": "1VgQdffmoCrbhDv1PD36_1YkniCKuk2zKdF_552hR4s4hDIKIpcRdJKFp", "FunctionName": "triggerAppSheetAction", "FunctionArguments": "", "AppTemplateName": "e1b75072-6f96-4059-80a5-eca491b122d7", "Operation": "Change Bot", "Performance": "{\"Version\":1,\"Time\":\"00:00:00\",\"PerformanceTimingRoot\":{\"Mid\":100,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:03.3949377\"},\"Children\":[{\"Mid\":108,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:03.3950292\"},\"Children\":[{\"Mid\":577,\"Timer\":{\"Time\":\"00:00:00.0138894\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[]},{\"Mid\":101,\"Timer\":{\"Time\":\"00:00:01.0369602\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":21,\"Timer\":{\"Time\":\"00:00:01.0362472\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":25,\"Timer\":{\"Time\":\"00:00:00.1338458\",\"ElapsedTime\":\"00:00:00\"}},{\"Mid\":53,\"Timer\":{\"Time\":\"00:00:00.7411292\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":95,\"Timer\":{\"Time\":\"00:00:00.1894215\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":475,\"Timer\":{\"Time\":\"00:00:00.1893803\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":94,\"Timer\":{\"Time\":\"00:00:00.1893455\",\"ElapsedTime\":\"00:00:00\"}}]}]},{\"Mid\":75,\"Timer\":{\"Time\":\"00:00:00.5508483\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":71,\"Timer\":{\"Time\":\"00:00:00.1703161\",\"ElapsedTime\":\"00:00:00\"}},{\"Mid\":93,\"Timer\":{\"Time\":\"00:00:00.2120054\",\"ElapsedTime\":\"00:00:00\"}},{\"Mid\":68,\"Timer\":{\"Time\":\"00:00:00.1683437\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":83,\"Params\":{\"ParamList\":[{\"Pid\":20,\"Value\":\"1\"}]},\"Timer\":{\"Time\":\"00:00:00.1683374\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":498,\"Timer\":{\"Time\":\"00:00:00.1683022\",\"ElapsedTime\":\"00:00:00\"}}]}]}]}]},{\"Mid\":34,\"Timer\":{\"Time\":\"00:00:00.1611222\",\"ElapsedTime\":\"00:00:00\"}}]}]},{\"Mid\":563,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3581036\"},\"Children\":[{\"Mid\":503,\"Params\":{\"ParamList\":[{\"Pid\":32,\"Value\":\"New event 2\"}]},\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3577679\"},\"Children\":[{\"Mid\":507,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3577417\"},\"Children\":[{\"Mid\":477,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3577243\"},\"Children\":[{\"Mid\":476,\"Params\":{\"ParamList\":[{\"Pid\":33,\"Value\":\"Process for New bot - 1\"}]},\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3577241\"},\"Children\":[{\"Mid\":510,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3576373\"},\"Children\":[{\"Mid\":511,\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3576367\"},\"Children\":[{\"Mid\":512,\"Params\":{\"ParamList\":[{\"Pid\":34,\"Value\":\"New step 2\"}]},\"Timer\":{\"Time\":\"00:00:00\",\"ElapsedTime\":\"00:00:02.3576138\"},\"Children\":[{\"Mid\":531,\"Timer\":{\"Time\":\"00:00:02.3537260\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":28,\"Timer\":{\"Time\":\"00:00:00.1404788\",\"ElapsedTime\":\"00:00:00\"},\"Children\":[{\"Mid\":29,\"Timer\":{\"Time\":\"00:00:00.1350603\",\"ElapsedTime\":\"00:00:00\"}}]}]}]}]}]}]}]}]}]}]}]}]},\"IsEmpty\":false,\"TableAttributionTimings\":{}}", "Result": "Success" }
In the Apps Script, i see the script be called.
![]()
You’re calling a script from a bot to trigger an action via API? Why? If it’s not just for testing, that’s a rather silly workflow. You could post to the API directly from the bot. Or you could just trigger the action directly from the bot if it’s on the same app.
As to why it’s not working. Probably because you didn’t supply it any row keys to run the action on. You also don’t need the app name in the URL.
I actually have a use case for this that I decided to implement because of efficiency of looping within AppsScript. Based on a new entry in one table, I pull records from approximately 3 other tables (via API), then use those records to create row objects that then get added to up to 5 tables again via the API since the row objects can be added in one call for each table. I know it sounds somewhat convoluted but it was my best option.
I can´t call the action directly from the bot, is an “App: go to another view within this app”, and for some reason the action didn’t appears in selection menu on the process. But if i change for another type of action like “Data: …”, i can select it. Thats the reason i try call the action from a script
There’s your issue. That action can only be triggered from within the app.
Its make some sence, but i change the action to “Data: Set the values…”, and didn’t work.
There is some way to the action “App: go to another view within this app” can be selected in the process? Thanks
Like I pointed out, you also aren’t supplying any row keys for the action to run on.
No. That is a client-side action, it cannot be run server-side.
