Replacing Several Words - Google Docs Node

Describe the issue/error/question

Currently, Google Docs node on n8n find and replace allows you to do specific actions one by one (via Add Action):

Which is good for small tasks. But for large tasks with many fields to replace, it would be very nice to handle this with an array (as suggested here) on the Google Docs API reference:

This is particularly necessary since Google API limits are finite and one action (rather than several) is more efficient.

Not sure where to go to set up a custom HTTP API Call to handle (Google only offers templates in Java, Node.js and Python), but I think that could resolve this. Alternatively, is it possible to bypass the n8n action field and just inject json there?

Please share the workflow

Closest I can get (replace ID with an actual id):

But it gives an error (which is hard to understand)

Hello @pb84,

A solution I am thinking for this case is to create a function which contains the words you want to add to the sheets file. Then if you want to replace multiple fields you add a action which contains the text you want to replace and you can drag&drop from the output of the function the new text to be added.

I am sharing an example with you.

Hope this helps!

1 Like

A good solution, thank you!

The problem is that we must use the Google Docs node many times (with a lot of replacements) which can exceed the API limit.

Would be awesome to have a way to implement via the HTTP node


Just needed :batchUpdate at the end of the URL :man_facepalming:


Wonderful, when thinking of the whole process I figured it would be easier to just use the Sheets node so therefore my case included the node and not the HTTP request, but did not take into account API limit.

Awesome to see that you managed to get the solution and get back at us.