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".
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
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, also compatible with Codex and OpenClaw
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
// Export is specified at generation time via `exportAs`// You cannot export an already-generated gamma via the API// Instead, generate with the desired export format// PDF export — best for sharing externallyconst pdfResult = await gamma.generate({
content: "Annual report for 2025",
outputFormat: "document",
exportAs: "pdf",
});
// PPTX export — for editing in PowerPoint/Google Slides// Note: PPTX exports may have layout shifts and font differencesconst pptxResult = await gamma.generate({
content: "Team kickoff presentation",
outputFormat: "presentation",
exportAs: "pptx",
});
// PNG export — for thumbnails or social sharingconst pngResult = await gamma.generate({
content: "Product announcement graphic",
outputFormat: "social_post",
exportAs: "png",
});
Step 4: Retrieve Export Files
// After generation completes, exportUrl is in the poll response// Download files promptly — URLs expire after a periodimport { writeFile } from"node:fs/promises";
asyncfunctiondownloadExport(generationId: string, outputPath: string) {
// Poll until completeconst result = awaitpollUntilDone(gamma, generationId);
if (!result.exportUrl) {
thrownewError("No export URL — did you specify exportAs?");
}
// Download the fileconst response = awaitfetch(result.exportUrl);
if (!response.ok) thrownewError(`Download failed: ${response.status}`);
const buffer = Buffer.from(await response.arrayBuffer());
awaitwriteFile(outputPath, buffer);
console.log(`Saved to ${outputPath} (${buffer.length} bytes)`);
}
// Usageconst { generationId } = await gamma.generate({
content: "Sales deck for Q1 review",
outputFormat: "presentation",
exportAs: "pdf",
});
awaitdownloadExport(generationId, "./output/q1-review.pdf");
Step 5: Sharing Configuration
// Configure who can access the generated gammaconst { generationId } = await gamma.generate({
content: "Internal strategy document",
outputFormat: "document",
sharingOptions: {
// Workspace membersworkspaceAccess: "comment", // noAccess | view | comment | edit | fullAccess// External (non-workspace) visitorsexternalAccess: "noAccess", // Lock down for internal docs// Share with specific people via emailemailOptions: {
emails: ["partner@example.com"],
accessLevel: "view",
},
},
});
Step 6: curl Reference
# Generate from template
curl -X POST "https://public-api.gamma.app/v1.0/generations/from-template" \
-H "X-API-KEY: ${GAMMA_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"gammaId": "your_template_gamma_id",
"prompt": "Create a proposal for Acme Corp focusing on cloud services",
"exportAs": "pdf",
"themeId": "theme_abc123",
"imageOptions": { "style": "photorealistic" },
"sharingOptions": {
"workspaceAccess": "edit",
"externalAccess": "view"
}
}'# Poll for result
curl "https://public-api.gamma.app/v1.0/generations/${GEN_ID}" \
-H "X-API-KEY: ${GAMMA_API_KEY}" | jq '{status, gammaUrl, exportUrl, creditsUsed}'