Script that deletes Automatically created YouTube videos in Performance Max campaigns

When you don’t provide your own video in an Asset Group (Performance Max campaign) Google automatically creates YouTube videos for you. Sometimes these videos are ugly and can work against your brand.
There are two ways to stop them serving:
1. To provide your own video
2. To delete them
There is no way neither via interface nor via Ads Editor to delete these ‘Automatically created’ videos. The only one way is via scripts or API.
Here is my elegant and brutal :) version of deleteing all automatically created videos in all active PMax campaigns and asset groups:

(Copy, paste, authorize and run. Enjoy.)

https://docs.google.com/document/d/11EnTsOHNlctimmD5HUPiFBr-2GOzlvBwiWD-5xVAtiM/

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store