Prevent user-agent Googlebot from seeing my cookie consent

Hi folks, I need to find a way to exclude Googlebot (only) from seeing the cookie consent since cookie consent is loading from a third party javascript (OneTrust); is cloudflare of any help to be able to do that ?
Was this page helpful?