Still having trouble with some webhook workflow using Zapier. My rent received table columns are populated by Zapier from my table Property. I basically copied the attendance app. When I use action Rent Received I get a single row created as it should (with exception of ID and Amount Received column, which I will refer to soon), however if I then use action Rent Not Received, which sets it the column in Property table to false, it first repeats the โYโ followed by the โNโ rather than just โNโ as in the screenshot. Any ideas??
Regarding the ID and Amount Received columns, much like the attendance app my ID column uses UNIQUEID() in initial value, however it does not populate - is this because entrys are direct to spreadsheet and not via app? how does attendance app get around this or does it copy the uniqueid from the parent table? And my amount received expression is =IF([Rent Received]=โYโ,[_THISROW].[Rent Amount],โ0โ)
in the Appformula fieldโฆ However this does not work, again is this because the data is not created through the app but rather directly in the sheet and if so, how does the attendance app achieve it?
*refer to unit 3 & 2 in pciture. This was โRent Receivedโ x 1 and โRent Not Receivedโ x 1 for each unit, as you can see 1 x extra โYโ created when โRent Not Receivedโ action performed
Thank you.
I am not sure I follow, but I wonder if you could have the webhook call the API directly as described here help.appsheet.com - Example: Copying Newly Added Records
Having โone less moving partโ might make things easier.
Example: Copying Newly Added Records help.appsheet.com
Thanks @Philip_Garrett_Appsh, I will give this a go. I didnt realise it was an option, but yes agree, the less moving / external parts the better!
Would the whitespace in my webhook URL be causing the error โURL not well formedโ? This seems to be the only error now.
i.e Rent Received instead of RentReceived? My table name does have the space but I can change if need be, obviously I would rather avoid this as I would need to change all table references too.
We should probably handle a white space but that will take time. Can you remove the white space from the table name for now? Sorry for the hassle.
@Philip_Garrett_Appsh Removing the whitespace did result in success, however it did not result in the row being added in the table. Is this now because I am on a Free plan?
What does the Audit History say as described here help.appsheet.com - Troubleshooting API Calls
Troubleshooting API Calls help.appsheet.com
{
โOperationโ: โREST API invokeโ,
โAppIdโ: โf30c709c-224b-43f2-90ff-2fcd917618f2โ,
โTableNameโ: โRentReceivedโ,
โResultโ: โFailureโ,
โResultErrorโ: โREST API REST API invoke request failed: API data is missing.โ,
โRecordTypeโ: โStopโ }
Unsure which API data it is referring to.
I just published the article yesterday. Hope it helps!
@Philip_Garrett_Appsh actually - looking at the article this is only to copy newly added rows? I am using Zapier to copy certain columns when an already existing row is updated (i.e. when Date changes) Can the method you describe be trigged on updates? thanks
Yes, it is essentially the same.
@Philip_Garrett_Appsh Thanks. I canโt seem to get this working. Using template: {
โActionโ: โEditโ,
โPropertiesโ: {
โLocaleโ: โen-Australiaโ,
โTimezoneโ: โNew Zealand Standard Timeโ
},
โRowsโ: [
{
โProperty Nameโ: โ<<[Property Name]>>โ,
โDateโ: โ<<[Date]>>โ,
โRent Receivedโ: โ<<[Rent Received]>>โ
โRent Amountโ: โ<<[Rent Amount]>>โ
}
] }
I did made the template in Textedit and set to plain text to save as .JSON. Other details are correct from what I can tell. Nothing showing errors. Any where I should pay attention to?
Can you provide: 1. Account id 2. App name 3. Workflow rule name
I am seeing errors in Audit History for rule โRent RCVD Webhookโ. I assume that is the rule in question.
Go to Manage > Monitor > Audit History. Then look for entries for that rule.
Doesnโt seem to be triggering the webhook from what I can tell. Also, I have just seen that the time is not reflective of current time zone, seems to be 13 hours behind (daylight saving here). But the time zone is definitely set on NZ standard time. Should I be using UTC+12 instead?
I looked at your most recent invocation of the rule โRent RCVD Webhookโ.
It occurred at 10/5/2018 8:07:46 AM UTC in the Audit History as the result of an update that occurred at 10/5/2018 8:07:32 AM UTC.
UserId: 708906, EventTimeStamp: 10/5/2018 8:07:46 AM +00:00, TraceId: 74840360-f488-4475-a0b8-cf2893c3245c, AppTemplateName: โPropertyManagementApp-708906โ, TableName: โPropertyโ Properties
AppTemplateName: โPropertyManagementApp-708906โ
AppId: โf30c709c-224b-43f2-90ff-2fcd917618f2โ
AppTemplateVersion: โ1.001352โ Using version 1.001352 rather than current version 1.001382
RuleName: โRent RCVD Webhookโ
EventType: โChangeโ
Operation: โChange workflow ruleโ
RuleEvalMode: โProductionโ
TableName: โPropertyโ
RuleTableName: โPropertyโ
OperationUpdateMode: โUPDATES_ONLYโ
EventMatch: โWorkflow event successfully matchedโ
Condition: โโ
MatchesCondition: โTrueโ
Actions: โCreated 1 Actionsโ
Url: โhttps://api.appsheet.com/api/v1/apps/f30c709c-224b-43f2-90ff-2fcd917618f2/tables/Rent Received/Actionโ
Verb: โPostโ
Headers: โapplicationAccessKey:Vaโฆโ
Payload: โโ
Errors: 'Error: The webhook url โhttps://api.appsheet.com/api/v1/apps/f30c709c-224b-43f2-90ff-2fcd917618f2/tables/Rent Received/Action is not well formed Error: Workflow rule โRent RCVD Webhookโ โBodyโ template properties could not be obtained due to Accessing deleted file โRent RCVD Webhook_BodyTemplate_20181005_025112.jsonโโฆ Error: Workflow rule โRent RCVD Webhookโ โBodyโ template could not be read due to FileMimeType โโ is unexpectedโฆโ
Warnings: โWarning: App version 1.001352, which is the latest version, is not marked deployable so the web hook is not being invoked. This web hook would have been posted to โhttps://api.appsheet.com/api/v1/apps/f30c709c-224b-43f2-90ff-2fcd917618f2/tables/Rent Received/Actionโ.โ
Result: โFailureโ
It has a number of problems listed in the audit record.
I suspect that at some point you replaced the Body Template with a new one but you have not gone back to your workflow rule and updated it to refer to the latest Body Template file. Instead, it appears to be referring to an older version of the file that you have deleted. Be aware that Google refers to files by their Doc Id, not their name. If you replace a template file it will have a new Doc Id. You must go back to the AppSheet Editor and update the JSON Body Template to ensure it refers to the latest template file.
Do this by: 1. Opening the webhook workflow rule in the editor. 2. Clicking the icon at the far right of the โJSON Body Templateโ and selecting your current JSON body template file.
It appears that at some point you updated rule โRent RCVD Webhookโ to be triggered on โADD_ONLYโ. You have not added any records to table โPropertyโ recently, so the rule is not being triggered.
You app is not deployed, so the webhook will not be invoked.
I suggest you fix these problems and then try the rule again. When you do that, wait a minute or two for the rule to show up in Audit History. Then see what the Audit History tells you. Using the Audit History is the best way to diagnose problems. That is exactly what I do.
We do not adjust dates or times based on the Timezone in Properties. We simply use the Date and DateTime values you specify when we add or update the record.
In one of your JSON Bodies, you specified the expression UNIQUEID(). If you are adding a record with a key that specifies an InitialValue of UNIQUEID() , you should omit the field from JSON. We automatically initialize the key field based on its InitialValue. This is explained in this
paragraph which says:
Each individual Row value must normally include the key field values of the record to be added. However, if the key field contains an โInitial valueโ, you can omit the key field value. For example, you should omit the key field value when the key field has an โInitial valueโ of UNIQUEID() or RandBetween(). The system will initialize the key field to the โInitial valueโ.
See this article https://help.appsheet.com/integrations/api/adding-records-to-a-table
@Philip_Garrett_Appsh Thanks for the detailed response. I think you will have seen some old errors, as far as I can see it should be using a recent template. I had tried with on update workflow instead of added. Uniqueid was also removed in the new template. I assume this means that it is not working because it is not deployed. This said, how come my Zapier was working? - this invokes the same workflow, so why would it be working when my app is not deployed? Further, I hadnโt realised workflows were limited to paid plans - is this the case even if I am just using the app for myself? Thanks for all your time, I really appreciate your help.
User | Count |
---|---|
43 | |
29 | |
23 | |
20 | |
13 |