hi there,
I was trying to invoke api from appsheet i am getting error like this
Properties:
{
“AppId”: “6d6f6ea7-1710-446e-89f2-23213be53847”,
“AppTemplateVersion”: “1.000559”,
“RuleName”: “New Workflow Rule 2”,
“EventType”: “Change”,
“InvokedBy”: “Update”,
“Server”: “produ99110000Q6”,
“IgnoreSecurityFilters”: false,
“TableName”: “Receving form”,
“RuleTableName”: “Receving form”,
“OperationUpdateMode”: “UPDATES_ONLY”,
“EventMatch”: “Workflow event successfully matched”,
“Condition”: “”,
“MatchesCondition”: “True”,
“ActionNotPerformed”: “1 errors present.”,
“ActionResults”: “Created 1 ActionResults”,
“Action Type”: “Webhook”,
“Action Name”: “Action 1”,
“Errors”: “Error: The webhook url 'http://api.appsheet.com/api/v2/apps/6d6f6ea7-1710-446e-89f2-23213be53847/tables/Receving form/Action?applicationAccessKey=y6Rhx-RsTZ0-atYAf-Ssrzq-9MTZk-byIdP-hvqHw-avINz is not well formed”,
“Url”: “http://api.appsheet.com/api/v2/apps/6d6f6ea7-1710-446e-89f2-23213be53847/tables/Receving form/Action?applicationAccessKey=y6Rhx-RsTZ0-atYAf-Ssrzq-9MTZk-byIdP-hvqHw-avINz”,
“Verb”: “Post”,
“MimeType”: “application/json”,
“Headers”: “applicationAccessKey:y6Rhx-RsTZ0-atYAf-Ssrzq-9MTZk-byIdP-hvqHw-avINz, _webhookActionDepth:0”,
“Payload”: “{“Action”: “Edit”,“Properties”: {“Locale”: “en-US”,“Location”: “47.623098, -122.330184”,“Timezone”: “Pacific Standard Time”,“RunAsUserEmail”: “YourEmail@google.com ”},“Rows”: [{“Sno”: “6247aaf6”,“Date”: “11/7/2019”,“Time”: “3:43:47 PM”,“Name”: “yO8vDJhm”,“Email ID”: “Sreekar.pranav4@gmail.com ”,“Image”: “https://www.appsheet.com/get/?i=YXBwTmFtZT1CdWxic1Nob3BwaW5nLTgyODg0NiZUYWJsZU5hbWU9UmVjZXZpbmclMjBmb3JtJmZpbGVOYW1lPVJlY2V2aW5nJTIwZm9ybV9JbWFnZXMlMkY2MjQ3YWFmNlNyZWVrYXIucHJhbmF2NCU0MGdtYWlsLmNvbS5JbWFnZS4xMDE0MjguUE5HJmFwcFZlcnNpb249MS4wMDA1NTk=&w=600","Chain Color”: “Green”,“Length”: “100”}]}”,
“AppTemplateName”: “BulbsShopping-828846”,
“Operation”: “Workflow action”,
“Result”: “Failure”
}
Help me with this thanks in advance
When creating the endpoint URL, you need to URLENCODE values that contain special characters or spaces.
2 Likes
Phil
November 7, 2019, 8:50pm
3
If you are trying to invoke the AppSheet API directly from a webhook you should pick the appropriate “Preset” as described here https://help.appsheet.com/en/articles/3463654-invoking-the-appsheet-api-from-a-webhook
That will make using the API much easier to use because the system does most of the work for you.
2 Likes
Hi @Phil Actually i was trying to get data from a third party website to a form into appsheet can you suggest me how to do it .Its not like posting the data but to retrieve the data from the website.
Phil
November 8, 2019, 7:42pm
5
AppSheet webhooks allow you to invoke an external web service, send that service a Post body you define, and have the service perform some action. You cannot currently use an AppSheet webhook to retrieve data from an external web service.
You could do that by:
Using a AppSheet webhook to trigger a Zapier “Zap”.
Having the ZAP retrieve the data from the external web site.
Having the Zap invoke the AppSheet REST API to Add or Update a record in an AppSheet table. The data returned in step 2 would be included in the fields of the record you Add or Update.
Others in the community may be able to suggest other simpler alternatives.
1 Like
There is no way to populate an editable form field (dropdown or other field) from external data that you want to retrieve from some web service. I am not entirely sure what you are trying to do so if you could post a little more details about the intent, we can make better suggestions.
@Phil i have tried this technique which you suggested i am able to post and i am getting success message from in the audit history i am not able to retrieve data into app sheet from a 3rd party website into a form can you suggest that how to do it.
Thanks in advance.
Phil
November 11, 2019, 6:04pm
8
To the best of my knowledge, Jayaram is correct that you cannot post the data directly into an AppSheet form.
You could store the data into a row of an AppSheet table by invoking the AppSheet REST API.
Not sure if that meets your needs.
Hi @Phil i have tried doing this for my app
http://api.appsheet.com/api/v2/apps/6d6f6ea7-1710-446e-89f2-23213be53847/tables/Receiving%20form/Action?Sno=Type&Image=subtype?applicationAccessKey=y6Rhx-RsTZ0-atYAf-Ssrzq-9MTZk-byIdP-hvqHw-avINz
{
“Action”: “Add”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“UserSettings”: {
“Option 1”: “value1”,
“Option 2”: “value2”
}
},
“Rows”: [
{
“Name”: “Jan”,
“Image”: “http://images6.fanpop.com/image/photos/36300000/Emilia-Clarke-image-emilia-clarke-36399128-460-276.jpg ”
}
]
But it is not working i am getting the following error
{ “statusCode”: 404, “message”: “Resource not found” } .
Please let me know if there is any configuration has to be done.
Thanks in advance.
Phil
November 15, 2019, 6:11pm
10
The URL does not look correct. To invoke the REST API, you need an URL like the one described in this article https://help.appsheet.com/en/articles/1979979-invoking-the-api
Hi @Phil i was trying to post from appsheet using a webhook to post into zapier from a form into the 3d viewer http://someshwarasoftware.com/games/test/custom1moonbeam/index.html?Image=1&Product ID=1 into that
One more thing is the link in behavior is that static or can i change with parameters if i can change parameters please suggest me how to do it.
Phil
November 20, 2019, 6:31pm
12
When you refer to “link” I think you are referring to the URL value. Is that correct?
If so, you can customize the URL as described in topic “URL” in this article https://help.appsheet.com/en/articles/962008-invoking-webhooks-from-a-workflow-rule-or-scheduled-report