How to insert text into a new page in a Google Docs using Zapier?
Hello, I am trying to insert text into a Google Doc on a new page. Tried all types of html code for page break, but doesn’t work… Saw this topic:
and wanted to know how can I set up the API request? My document is dynamic (I don’t know how long it will be), so splitting before the end wouldn’t work unless there is a tool/app that can split the text based on criteria, like some symbols or stuff that I can add to the end…
Any help would be great, thank you in advance!
Page 1 / 1
Hi @Visa Geeza
Good question.
Try using this Zap action: GDocs - App Extensions
There is an AI assistant to help configure the action.
Hello, Troy,
Thank you very much for your answer! I tried, but it doesn’t seem to work correctly… Let me elaborate:
I added a new Extension, I select the second one (circled in red)
Then this comes up:
After I save and go back to the editor, this is the step I get:
I put in the desired Document ID, but I have no idea what to put in index. I am guessing it is the page, but as I mentioned I have no idea how long the document is…
In the AI I tried to put “insert page break at the end of the document” and I get this created:
After saving and going to the editor, again I have to put the index in and again it doesn’t create it on the bottom of the document…
Any help is greatly appreciated!
Thanks in advance :)
@Visa Geeza
You may need to add another GDoc API step to find the length of the document to get the index #.
Hey Troy,
Thank you for answering! I created another step and with AI generated this:
This is the step in the editor:
When I test it I get this:
From what I understood, the doc has to be converted to JSON? Any help is greatly appreciated :)
Cheers!
@Visa Geeza
The 400 error code means an invalid API request.
The message indicates the received JSON was invalid.
You may have to try adjusting the app extension or using a different GDoc API endpoint.
Hey Troy,
I tried using EndOfSegmentIndex; findText, everything that it came up with and I still get the 400 error… The only thing that works is InsertPageBreak, but I need to find the index… Really need some help...