Create a list of the Google IP ranges from the info they publish: googlebot_ip_lists
Create a rule that blocks any google IPs that are not in the expected list and are not verified bots:
(ip.geoip.asnum in {15169 396982} and not ip.src in $googlebot_ip_lists and not cf.client.bot) then block
For BingBot:
Bing is more difficult as AS8075 is a major source of attacks on our sites so we use:
(ip.geoip.asnum eq 8075 and cf.client.bot and http.user_agent contains "bingbot.htm)
and then not in a long list of blocked Bing IP ranges, not using a long list of blocked paths, etc. as Bing ignores sitemaps and robots.txt, then allow
If you are getting the error "Country, IP address, or ASN not recognized” make sure you enter it as the full ASN: AS32934 and click on the value in the popup