Connecting Vertex AI

I’ve built a prompt in Vertex AI that will summarize a contract clause. I’m trying to integrate that prompt into a google apps script. So, when a Google form is submitted, vertex will open the pdf, summarize the section and then an email summary will be sent.

It all works, but I can’t get the Vertex AI to connect. I need a step-by-step help to get it there. I think I’m missing the JSon Key, but not sure if there another step I need to take. Any help?