Search code examples
google-apps-scriptgoogle-drive-apigoogle-docs-api

Google Drive Find and Replace api


I need to do something very simple with Google Docs/ Google drive : I need to replace certain words within a Google docs document with another word on a large scale.

Currently I download the files as html, make the changes locally and upload the updated files again. Seems like a huge process for something rather simple.

Is there a way I can do this an HTTP request? Will this be supported by the API in the future?

Thanks,


Solution

  • You can use the Document services in Apps Script to easily replace text in your documents:

    https://developers.google.com/apps-script/class_document#replaceText