Invoking api

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=YXBwTmFtZT1CdWxic1Nob3BwaW5nLTgyODg0NiZUYWJsZU5hbWU9UmVjZXZpbmclMjBm... Colorโ€: โ€œGreenโ€,โ€œLengthโ€: โ€œ100โ€}]}โ€,
โ€œAppTemplateNameโ€: โ€œBulbsShopping-828846โ€,
โ€œOperationโ€: โ€œWorkflow actionโ€,
โ€œResultโ€: โ€œFailureโ€
}

Help me with this thanks in advance

0 11 1,451
11 REPLIES 11

When creating the endpoint URL, you need to URLENCODE values that contain special characters or spaces.

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.

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.

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.

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:

  1. Using a AppSheet webhook to trigger a Zapier โ€œZapโ€.
  2. Having the ZAP retrieve the data from the external web site.
  3. 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.

@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.

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/Act...

{
โ€œ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.j...โ€
}
]

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.

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.

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-rep...

Top Labels in this Space