I'm tring to use Custom code module in workflow, when the new deal is created then create the new event to google calendar, so I try to use the Custom code to get deal details and I saw that we can use googleapis inside the Custom code module, but I can't figure out to use the api without the refrech_token and the consent screen. What i want is when the new deal is create the workflow create the new google event in the deal owner google calendar. I want to konw if this is possible to do inside the workflow and the Custom code module ?
You can do anything with the Google APIs, altough I'm unclear why the HubSpot team chose to include the googleapi NPM files since secrets have a 100 character limit and Google's certificates for service accounts are 1500chars+ and API keys are deprecated on most googleapis, so you are stuck with oAuth as your only option. You could probably come up with some insecure and crummy way of storing oauth tokens in hubdb or some other shenanigans, but ultimately the answer is no, there is no simple or reasonable way to do it.
Your best bet is to make a google apps script hosted endpoint where you can code on Google for Google and then just send the necessary data to the api endpoint with some kind of "key" that only you and the endpoint know.