I have a Button with Cross Doc PushButton action in formula. If I click on the button manually then everything works well, if I run a test of Rule it also works well.
But if Rule tries to execute automatically then Coda Error shows in logs as showed on screenshot:
I also tried to switch Take Actions as Automation Bot to my own account, but the same error happened.
The same problem appears if I try to execute CrossDoc PushButton from the first doc to the button of the second doc that also executes CrossDoc PushButton - the result is a success, but nothing happens.
I replaced my CrossDoc PushButton calls with WebhookTriggerV2, however the problem is still the same, Automation Rule cannot perform the action.
Everything works if I myself press the button manually or run the Test of this Automation Rule.
I can assume that this is somehow related to the security of Coda itself when executing actions, but at the same time it is strange, since I can set up the execution of the Automation Rule from my account and get the same error.
Regarding your @Scott_Collier-Weir tutorial video, you can try to make the Trigger Webhook button run through an Automation Rule and you will see a Coda error.
Automation is an Automation Rule in an Automation Bot
The problem is simple - if you write a CrossDoc PushButton function or a function of your package WebhookTrigger in the Action section for an Automation Rule, then the Bot cannot execute it on its own.
It is important that when testing this Automation Rule, everything works well, but when the Bot tries to perform an action on its own, for example, on the row changed event, it happens in the logs as in the screenshot - Coda Error
Just curious — did you put your CrossDoc::PushButton into a webhook? Because that’d be the same as before, only with extra steps.
What I think Scott meant was that instead of pushing a remote button, you could implement a webhook automation on that other remote doc (i.e. that’d be your button) and then trigger the webhook into that other doc where the action should be taken, not the one where you wanted to place the cross-doc button. TL;DR: Replace the PushButton with a webhook, not complement it. There should be no single PushButton in your final solution.
as I already wrote in the message above, the webhook, that is, replacing the PushButton with the Webhook function did not solve the problem and the behavior is exactly the same. I need Automation Bot to execute PushButton , but it just throws an error.
Just test the behaviour
Perhaps you misunderstood what I meant. Here I recorded you a demo:
In general, you should now prefer webhooks over cross-doc actions pretty much always. It is more setup on the receiving side but you get full control over what happens when the webhook is triggered. E.g. if you need to add multiple rows within different parts of the receiving doc, you’d have to ModifyRow/PushButton for every single edit, whereas with webhooks you could just send all the data in a single call and then do whatever crazy formula in the webhook automation rule. It is also more secure because to make cross-doc actions, you need a write-access token that people usually set up too permissively. So in practice what happens is that people create non-restricted tokens to use with cross-doc actions, and thus open up a way to read and modify literally anything about that other doc or maybe even all user’s docs. With webhooks you get a restricted token that’s only good for triggering that particular webhook, and you can do further validation within the automation formula.