Editing rows from one app to another

Hi everyone,

Iโ€™m trying to get my workflow webhook to update a column for specific rows in another app table with an if statement. Iโ€™m not sure how to write the json for this.

0 20 604
20 REPLIES 20

@tingtingandrea

@tingtingandrea
You can also refer to this post as well

Hey @LeventK ,

Iโ€™ve looked over almost all the documents and I cant seem to get it to work. It keeps giving me error messages. Iโ€™m using webhook Present: Appsheet: Edit Row
Thanks

{
โ€œActionโ€: โ€œEditโ€,
โ€œPropertiesโ€: {
โ€œTimezoneโ€: โ€œPacific Standard Timeโ€
},
โ€œRowsโ€: [
<<Start: Filter(volunteer, [email]=[_thisrow].[email])>>
{
โ€œemailโ€:"<<[email]>>"
<<If: [General Onboarded timestamp]="">>
โ€œGeneral Onboarded timestampโ€: โ€œ<<[#ask-notion timestamp]>>โ€
<>
},
<>
]
}

@tingtingandrea
Here it is:

{
	"Action": "Edit",
	"Properties": {
	"Timezone": "Pacific Standard Time"
	},
	"Rows": [
	<<Start: Filter("volunteer", [email]=[_thisrow].[email])>>
		{
		"email":"<<[email]>>"
		"General Onboarded timestamp": "<<IFS(ISBLANK([General Onboarded timestamp]),[#ask-notion timestamp])>>"
		},
	<<End>>
	]
}
		

Thanks @LeventK,

I think I missed something. Iโ€™m getting an error message. Also Iโ€™m realizing I dont know how to use code blocks on here:

Failed: Action not performed because 3 errors are present. Error: Workflow rule โ€˜Add Notion 2โ€™ action โ€˜Edit Timestampโ€™ Body template. Expression โ€˜Filter(volunteer, [email]=[_thisrow].[email])โ€™ is invalid due to: Unable to find table โ€˜volunteerโ€™. Error: Workflow rule โ€˜Add Notion 2โ€™ action โ€˜Edit Timestampโ€™ Body template. Start expression โ€˜Filter(volunteer, [email]=[_thisrow].[email])โ€™ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โ€˜Keyโ€™ column of the referenced table. Error: The webhook body is empty.

@tingtingandrea
I believe itโ€™s my badโ€ฆInside the FILTER() expression, you need to wrap your tablename within quotes. So the payload shall be like this:

{
	"Action": "Edit",
	"Properties": {
	"Timezone": "Pacific Standard Time"
	},
	"Rows": [
	<<Start: Filter("volunteer", [email]=[_thisrow].[email])>>
		{
		"email":"<<[email]>>"
		"General Onboarded timestamp": "<<IFS(ISBLANK([General Onboarded timestamp]),[#ask-notion timestamp])>>"
		},
	<<End>>
	]
}	

@LeventK
dam, similar error. Do I need to fill in the body? It still says that it canโ€™t find the table:

@tingtingandrea
Wonโ€™t you be placing that JSON payload inside the Body parameter already??

@LeventK
I have it as a file on gdrive

@tingtingandrea
Are you using it as a JSON body template?

@LeventK
yes I am. I did actions, that worked but for some reason edit isnt working. I did all the same things while changing the payload obviously. Is it possibly an issue where the app Iโ€™m using the webhook in doesnt have the table, itโ€™s a table inside another app?

Hi @LeventK, dont mean to bug. But, Iโ€™m not sure if you saw my previous message. Thanks.

Yes @tingtingandrea I saw your post, but I havenโ€™t understood what you exactly mean with โ€œโ€ฆ Is it possibly an issue where the app Iโ€™m using the webhook in doesnt have the table, itโ€™s a table inside another app?..โ€

Hi @LeventK I have 2 apps. The 1st app has the table โ€œVolunteerโ€, the 2nd app which Iโ€™m using the webhook in, does not have the table โ€œVolunteerโ€. I want to trigger edit for โ€œVolunteerโ€ in 1st app from the 2nd app.

How is your webhook workflow setup? Ensure that you have selected:

@LeventK, What info do I need in my Body vs my Body template JSON file?

I think thatโ€™s my issue

@tingtingandrea
You either use the Body or Body Template, you canโ€™t use both. Try with Body only first and then re-try with using the template only. Also please ensure that both of the apps are under the exact same appsheet account.

@LeventK I tried both body and body template and neither worked. It still gave me the error, cannot find table โ€œVolunteerโ€. The rest of the webhook setup is as you have labeled in the previous image. Iโ€™m not sure what Iโ€™m doing wrong at this point. They are both the same account as well.

Can you check if your Volunteer table in the second app accepts EDIT?

Hi @LeventK, yes it is editable. Iโ€™m able to run actions on the same table. Itโ€™s only the edit action that doesnt work.

Top Labels in this Space