| name | gamma-core-workflow-b |
| description | Generate from templates, retrieve exports, and manage sharing via Gamma API.
Use when creating content from template gammas, downloading PDF/PPTX/PNG exports,
or configuring sharing and folder organization.
Trigger: "gamma template", "gamma export", "gamma download PDF",
"gamma PPTX", "gamma sharing", "gamma from template".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(node:*) |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","gamma","workflow","export","templates"] |
| compatibility | Designed for Claude Code |
Gamma Core Workflow B: Templates & Export
Overview
Use Gamma's template-based generation (POST /v1.0/generations/from-template) and export retrieval (GET /v1.0/generations/{id}/files) endpoints. Template generation lets you replicate a single-page gamma template across multiple variations. Export retrieval gives you downloadable PDF, PPTX, and PNG files.
Prerequisites
- Completed
gamma-core-workflow-a
- A template gamma with exactly one page (created in the Gamma app)
- Understanding of the generate-poll-retrieve pattern
Key Concepts
- Template gamma: A regular gamma with exactly one page, used as a repeatable template
- gammaId: Found in the gamma URL or copied from the app
- Export URLs: Temporary download links returned after generation — download promptly as they expire
Instructions
Step 1: Create from Template
import { createGammaClient, pollUntilDone } from "./lib/gamma";
const gamma = createGammaClient({ apiKey: process.env.GAMMA_API_KEY! });
async function generateFromTemplate(
templateGammaId: string,
prompt: string,
options: {
themeId?: string;
exportAs?: "pdf" | "pptx" | "png";
imageStyle?: string;
} = {}
) {
const { generationId } = await gamma.generateFromTemplate({
gammaId: templateGammaId,
prompt,
: options.,
: options.,
: options.
? { : options. }
: ,
});
(gamma, generationId);
}
result = (
,
,
{ : , : }
);
.();
.();