I am able to access my google docs for content, for a use case I need to access a document get it's content and paste this content multiple times in another google doc. But I am unable to create a google doc with initialized content
Document response = service.documents().get(DOCUMENT_ID).execute();
This is what I am using to retrieve the document that I need to copy.
response.getBody();
Gives me the content that I now want to replicate and paste in the new Document created by
Document doc = new Document()
.setTitle("Not Working!").setBody(response.getBody());
doc = service.documents().create(doc)
.execute();
setBody reference : Link Is there anything that I am doing wrong would want to know, been stuck at this for hours now.