Skip to main content

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

  1. An admin creates a Keelstone Action record pointing at a Screen Flow API name and a document type (Excel / Sheets, Word / Docs, or PowerPoint / Slides)
  2. The taskpane reads those actions — filtered by the document's template key if one is embedded — and renders them as tiles
  3. When a user clicks a tile, Keelstone launches the flow (in a dialog for Office, inline for Google Workspace)
  4. The flow runs normally — it can include any invocable actions or LWC screen components
  5. 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:

  1. Go to Keelstone Actions (custom object, installed by the managed package)
  2. Create a new record:
    • Label: Hello World
    • Action Type: Flow
    • Action Target: kstone__Keelstone_Hello_World
    • Document Type: Excel / Sheets
    • Active: checked
  3. 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:

  1. Create a Screen Flow in Salesforce
  2. Add the KeelstoneSessionId input variable to the flow (required — see Developer Guide)
  3. Add one or more Action elements using the Keelstone invocable actions (e.g., KS: Write to Excel, KS: Get Excel Range)
  4. 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