Agentforce for Google Workspace
Bring your Salesforce Agentforce agent directly into Google Workspace. Once installed, an Agentforce menu appears inside your presentation: open a chat panel, ask a question in plain English (for example, "show my open opportunities"), and get a live answer straight from your Salesforce data. With one click you can drop that answer — as text or a formatted table — onto the current slide.
Think of it as a bridge: your Salesforce AI agent, available right inside Google Slides.
The full source is open on GitHub: newrishav-debug/AF-X-GoogleWS.
Setup at a glance
There are three parts, and each one exists for a reason:
- Part 1 — Set up Salesforce. Point the add-on at your existing agent and create a secure "login key" so it can talk to Salesforce on its own.
- Part 2 — Install the add-on into Slides. Copy the code into your own Google account in a single command.
- Part 3 — Connect and test. Paste your Salesforce keys into the add-on and confirm everything works.
By the end of Part 1 you'll have collected four values (two keys, a web address, and an ID) that you paste into the add-on in Part 3.
Part 1 — Set up Salesforce
Two one-time things in an org that already has Agentforce enabled:
- Agent ID — open your agent in Agent Builder and copy the 18-character ID (starts with
0Xx…) from the page URL. - Connected App / External Client App — in App Manager → New External Client App, enable the Client Credentials flow, set an API-only Run As user, and add the
api,chatbot_api, andsfap_apiscopes.
For the full walkthrough (exact scopes, IP settings, and screenshots), see the setup guide on GitHub.
Collect your four values
Grab these now while you're here — you'll paste them into the add-on in Part 3.
| Value | Where to find it |
|---|---|
| Consumer Key (Client ID) | External Client App → Settings → OAuth → Consumer Key |
| Consumer Secret (Client Secret) | Same screen → reveal Consumer Secret |
| My Domain URL | Setup → My Domain → Current My Domain URL (https://…my.salesforce.com) |
| Agent ID | An 18-character ID starting with 0Xx…, from the Agent Builder URL (or discoverAgents()) |
Part 2 — Install the add-on into Google Slides
- Turn on the Apps Script API once at script.google.com/home/usersettings (Google Apps Script API → On).
- Download and install:
git clone https://github.com/newrishav-debug/AF-X-GoogleWS.git
cd AF-X-GoogleWS
npm install
- Sign in and create the presentation (
npm run login, thennpm run create). To use an existing deck instead, copy its Script ID from Extensions → Apps Script → Project Settings into.clasp.json. - Upload the add-on with
npm run push, then reload your presentation — an Agentforce menu appears in the menu bar.
Part 3 — Connect your keys and test
- In your presentation, click Agentforce → Configure Agentforce.
- Paste in your four values (Consumer Key, Consumer Secret, My Domain URL, Agent ID) and click Save.
- Click Agentforce → Test Connection to confirm the keys work.
- Click Agentforce → Open Chat and ask a sample question.
- Click + Add to slide to place the formatted answer (text or table) onto the current slide.
Your keys are stored privately in the add-on's own settings and are not saved inside the slide deck.
About
This community experiment connects Google Slides to Salesforce Agentforce using the official Agentforce Agent API. Credentials are stored privately in the add-on's own Apps Script settings, are transmitted only over HTTPS, and are never saved inside the slide deck. Every request runs as your configured Salesforce integration user, so that user's permissions are the security boundary.