Introduction
Keelstone lets Salesforce admins configure actions that run inside Microsoft Office (Excel, Word, PowerPoint) or Google Workspace (Sheets, Docs, Slides). Developers build those actions as standard Salesforce Screen Flows — Keelstone handles launching them, authenticating the user, and relaying commands to the open document.
This guide is for developers building custom flows and LWC components on top of the Keelstone managed package.
Prerequisites
- Keelstone Actions managed package installed in your Salesforce org
- Keelstone Office add-in installed and connected to your org (and/or the Google Workspace add-on)
- Salesforce CLI (
sf) and a scratch org or sandbox for development
How it works in 60 seconds
- An admin creates a Keelstone Action record pointing at a Screen Flow API name and a document type (
Excel / Sheets,Word / Docs, orPowerPoint / Slides) - The taskpane reads those actions — filtered by the document's template key if one is embedded — and renders them as tiles
- When a user clicks a tile, Keelstone launches the flow (in a dialog for Office, inline for Google Workspace)
- The flow runs normally — it can include any invocable actions or LWC screen components
- When the flow calls a Keelstone invocable action (e.g.
KS_WriteData), Keelstone routes the command to the open document and returns the result to the flow as output variables
Create your first Action record
In your Salesforce org:
- Go to Keelstone Actions (custom object, installed by the managed package)
- Create a new record:
- Label:
Hello World - Action Type:
Flow - Action Target:
kstone__Keelstone_Hello_World - Document Type:
Excel / Sheets - Active: checked
- Label:
- Open the Excel taskpane or Google Sheets add-on — the action appears as a tile
Build a custom flow
Any Screen Flow can be a Keelstone action. The simplest approach:
- Create a Screen Flow in Salesforce
- Add the
KeelstoneSessionIdinput variable to the flow (required — see Developer Guide) - Add one or more Action elements using the Keelstone invocable actions (e.g.,
KS: Write to Excel,KS: Get Excel Range) - Point a Keelstone Action record at the flow's API name
For template-based document generation (merge Salesforce data into an Excel, Word, or PowerPoint template), use the keelstoneGenerateDocument LWC Flow Screen component — see keelstoneGenerateDocument.
Template management
The Keelstone_Template__c object gives you a stable, portable way to reference template files. Instead of embedding a ContentDocumentId in your flows (which changes across orgs), create a template record with a unique Template_Key__c slug and attach the file to it. Flows reference the template by key:
KS: Build Merge Context record → {!Get_Contact} → contextJson
KS: Generate Document
templateKey → "welcome-packet"
contextJson → {!contextJson}
The template key is also embedded in generated documents and used to show template-specific action tiles — see Admin Template Guide.
Google Workspace
Actions with Document Type = Excel / Sheets appear in both the Excel taskpane and the Google Sheets add-on. The same flow, the same action record, and the same invocable actions work for both — no changes needed. Keelstone handles the translation between Office JS and Google Sheets APIs transparently.
Next steps
- Developer Guide — Full invocable action reference, flow patterns, template management, and office event documentation
- Installation Guide — Step-by-step setup for admins
- Walkthrough: Salesforce Data Editor — End-to-end LWC example: query records into Excel, edit, save back to Salesforce
- keelstoneGenerateDocument — Template merge component reference
- Admin Template Guide — How to build Excel and Word templates, configure template fields and template-scoped actions