| name | gamma-migration-deep-dive |
| description | Deep dive into migrating to Gamma from other presentation platforms.
Use when migrating from PowerPoint, Google Slides, Canva,
or other presentation tools to Gamma.
Trigger with phrases like "gamma migration", "migrate to gamma",
"gamma import", "gamma from powerpoint", "gamma from google slides".
|
| allowed-tools | Read, Write, Edit, Bash(node:*) |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Gamma Migration Deep Dive
Overview
Comprehensive guide for migrating presentations and workflows from other platforms to Gamma.
Prerequisites
- Gamma API access
- Source platform export capabilities
- Node.js 18+ for migration scripts
- Sufficient Gamma storage quota
Supported Migration Paths
| Source | Format | Fidelity | Notes |
|---|
| PowerPoint | .pptx | High | Native import |
| Google Slides | .pptx export | High | Export first |
| Canva | .pdf/.pptx | Medium | Limited animations |
| Keynote | .pptx export | High | Export first |
| PDF | .pdf | Medium | Static only |
| Markdown | .md | High | Structure preserved |
Instructions
Step 1: Inventory Source Presentations
interface SourcePresentation {
id: string;
title: string;
source: 'powerpoint' | 'google' | 'canva' | 'other';
path: string;
size: number;
lastModified: Date;
slideCount?: number;
}
async function inventoryPresentations(sourceDir: string): Promise<SourcePresentation[]> {
const files = await glob('**/*.{pptx,pdf,key}', { cwd: sourceDir });
const inventory: SourcePresentation[] = [];
for (const file of files) {
const stats = await fs.stat(path.join(sourceDir, file));
const ext = path.extname(file).toLowerCase();
inventory.push({
id: crypto.randomUUID(),
title: path.basename(file, ext),
: (file),
: file,
: stats.,
: stats.,
});
}
fs.(
,
.(inventory, , )
);
.();
inventory;
}
Step 2: Migration Engine
import { GammaClient } from '@gamma/sdk';
interface MigrationResult {
sourceId: string;
gammaId?: string;
success: boolean;
error?: string;
duration: number;
}
class MigrationEngine {
private gamma: GammaClient;
private results: MigrationResult[] = [];
constructor() {
this.gamma = new GammaClient({
apiKey: process.env.GAMMA_API_KEY,
timeout: 120000,
});
}
async migrateFile(source: SourcePresentation): Promise<MigrationResult> {
const start = Date.now();
try {
const fileBuffer = await fs.readFile(source.);
presentation = ...({
: fileBuffer,
: path.(source.),
: source.,
: ,
: ,
});
: = {
: source.,
: presentation.,
: ,
: .() - start,
};
..(result);
result;
} (error) {
: = {
: source.,
: ,
: error.,
: .() - start,
};
..(result);
result;
}
}
() {
queue = ({ : options. });
tasks = sources.(
queue.( () => {
( attempt = ; attempt < options.; attempt++) {
result = .(source);
(result.) result;
.();
( * (attempt + ));
}
})
);
.(tasks);
.();
}
() {
successful = ..( r.);
failed = ..( !r.);
{
: ..,
: successful.,
: failed.,
: (successful. / .. * ).(),
: successful.( a + b., ) / successful.,
: failed.( ({ : f., : f. })),
};
}
}
Step 3: Platform-Specific Handlers
Google Slides Migration
import { google } from 'googleapis';
async function migrateFromGoogleSlides(
driveFileId: string,
gamma: GammaClient
) {
const drive = google.drive('v3');
const exportResponse = await drive.files.export({
fileId: driveFileId,
mimeType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
}, { responseType: 'arraybuffer' });
const presentation = await gamma.presentations.import({
file: Buffer.from(exportResponse.data as ArrayBuffer),
filename: 'exported.pptx',
source: 'google_slides',
});
return presentation;
}
PowerPoint Migration with Metadata
import JSZip from 'jszip';
import { parseStringPromise } from 'xml2js';
async function extractPowerPointMetadata(filePath: string) {
const fileBuffer = await fs.readFile(filePath);
const zip = await JSZip.loadAsync(fileBuffer);
const coreXml = await zip.file('docProps/core.xml')?.async('string');
if (!coreXml) return {};
const core = await parseStringPromise(coreXml);
return {
title: core['cp:coreProperties']?.['dc:title']?.[0],
creator: core['cp:coreProperties']?.['dc:creator']?.[0],
created: core['cp:coreProperties']?.['dcterms:created']?.[0],
modified: core['cp:coreProperties']?.['dcterms:modified']?.[0],
};
}
async () {
metadata = (source.);
fileBuffer = fs.(source.);
presentation = gamma..({
: fileBuffer,
: path.(source.),
: metadata. || source.,
: {
: metadata.,
: metadata.,
: ().(),
},
});
presentation;
}
Step 4: Post-Migration Validation
async function validateMigration(sourceId: string, gammaId: string) {
const gamma = new GammaClient({ apiKey: process.env.GAMMA_API_KEY });
const presentation = await gamma.presentations.get(gammaId, {
include: ['slides', 'assets'],
});
const validations = {
exists: !!presentation,
hasSlides: presentation.slides?.length > 0,
allAssetsLoaded: presentation.assets?.every(a => a.status === 'loaded'),
canExport: false,
};
try {
const exportTest = await gamma.exports.create(gammaId, {
format: 'pdf',
dryRun: true,
});
validations.canExport = exportTest.valid;
} catch {
validations.canExport = ;
}
{
sourceId,
gammaId,
validations,
: .(validations).( v),
};
}
Step 5: Rollback Plan
interface MigrationSnapshot {
timestamp: Date;
mappings: Array<{ sourceId: string; gammaId: string }>;
}
async function createSnapshot(results: MigrationResult[]): Promise<string> {
const snapshot: MigrationSnapshot = {
timestamp: new Date(),
mappings: results
.filter(r => r.success && r.gammaId)
.map(r => ({ sourceId: r.sourceId, gammaId: r.gammaId! })),
};
const snapshotPath = `migration-snapshot-${Date.now()}.json`;
await fs.writeFile(snapshotPath, JSON.stringify(snapshot, null, 2));
return snapshotPath;
}
async function rollbackMigration() {
: = .(
fs.(snapshotPath, )
);
gamma = ({ : process.. });
.();
( mapping snapshot.) {
{
gamma..(mapping.);
.();
} (error) {
.();
}
}
.();
}
Migration Checklist
Pre-Migration
During Migration
Post-Migration
Resources
Summary
This skill pack provides comprehensive coverage for Gamma integration from initial setup through enterprise deployment and migration. Start with gamma-install-auth and progress through the skills as needed for your integration complexity.