DEV Community

Justin Poehnelt for Google Workspace Developers

Posted on • Originally published at youtube.com

1

Explained ➡️ Apps Script code for AI powered Google Workspace Add on

Dive into the code used for the demo: “Name with Intelligence Google Workspace Add-on”. Learn how our Apps Script code calls the Vertex AI API to send prompts to Gemini 2.0 Flash.

0:00 Intro
0:43 Define location, model, and service key as well as the prompt
2:04 Assembling the request
4:01 Calling the Vertex AI API by using the UrlFetchApp service

Get the code: https://goo.gle/3BOy0LW

Learn more about the generateContent method of the Vertex AI API: https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/generateContent

#AppsScript #Gemini #VertexAI

Follow youtube.com/@googleworkspacedevs

Top comments (0)

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay