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)

Google AI Education track image

Work through these 3 parts to earn the exclusive Google AI Studio Builder badge!

This track will guide you through Google AI Studio's new "Build apps with Gemini" feature, where you can turn a simple text prompt into a fully functional, deployed web application in minutes.

Read more →

👋 Kindness is contagious

Appreciate this enlightening write-up and be part of the vibrant DEV Community. Developers of every background are invited to pitch in and enrich our collective expertise.

A simple “thanks” can make someone’s day. Share your gratitude in the comments.

On DEV, knowledge-sharing lights our journey and strengthens our ties. Enjoyed the article? A kind note to the author goes a long way.

Join the community