Google script


After generating a document in Google docs, I want to attach a Google script that deletes lines in the document containing a specific word. The script does not work in automation. The deployment of the Http request was as instructed:

The script works in a specific document if I load it from Google docs via extensions/apps script, but only with a specific document.
Follow-up question: How to set the script outside of automation only in google docs to work with multiple documents. As an add-on or in the library, which in my case can’t move to another document?

Best regards
blueprint (9).json (547.3 KB)