Automation Rule cannot execute Cross Doc PushButton

Hi there!

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.

Cross-Doc can be finicky in my experience. Thats why I created the Coda Webhook Pack! It can easily trigger cross-document actions but can also do far more.

You can use it as a replacement to easily take cross-document actions. If you continue to have trouble getting the cross doc to work, give it a look!


1 Like

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.

Can you give more information on what the automation is then? Or share the document?

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

If you share more context (the actual document, screenshots of you automation configuration, the actual actions you are trying to perform, etc) I’m certain we can help you fix it!

It’s hard with the very limited context to get you help though

Here are two documents.

  1. In the first doc open Automation → Rule

  2. In the Table 1 check Need to Push and quickly run Test in the Automation Rule

    1. If successful → open second document and check column Name of Table 2, should be written Successfully
  3. Now, return to Table 1 → check Need to Push → and just wait for logs in Automation → Rule → Activity

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.


Thank you very much for such a detailed video, it helped me figure out the problem.

The TrigerWebhookV2 function that was called by me did it after the RefreshTable() function
My formula was this:

  [Coda Webhook]::TriggerWebhookV2(thisRow.Programmer.[Webhook (URL)], thisRow.Programmer.[Webhook Token], "Project Name", thisRow.[Project Name], "Notification", [Completed Graphics Added])

As far as I understand, the bot could not execute the RefreshTable() function, which is why the TriggerWebhook was not executed.
Now I removed RefreshTable and everything worked.

Ahhh one thing that hasn’t been mentioned. Automations CANNOT as of now utilize the RefreshTable() actions.

Neither through cross doc, webhooks, or any other methods. As long as you have a Refresh() action in your automation it will throw an error

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.