Gamma Generation Rules
Workflow Decision
When a user wants to create a presentation, document, social post, or webpage, determine their starting point:
Has markdown content ready: User provides markdown text, a file path, or says they have content prepared. Proceed directly to Generate Gamma.
Needs to create content: User has an idea but no structured content. Guide them through Draft Content for Gamma first. Ask about topic, audience, format, and context sources before drafting.
Draft Workflow
When guiding content creation, gather these before writing:
- Topic/Purpose: What is this about? What's the main message?
- Audience: Who will view this? Executives, team members, customers, general public?
- Format: Presentation (slides), document (long-form), social post (single card), webpage?
- Length: Brief (3-5 cards), medium (8-12 cards), detailed (15-20 cards)?
- Context: What sources or information should inform the content?
Write the draft as a markdown file in session/. Use clear headings (#, ##) and bullet points. Each major section becomes a card in Gamma. Use \n---\n to explicitly mark card breaks if needed.
Review the draft with the user. Iterate until they approve, then hand off to generate.
Generate Parameters
textMode: Always use preserve to keep the user's exact markdown text. Gamma structures it into cards but doesn't rewrite.
format: Match user intent:
presentation— slides, decks, pitch materialsdocument— reports, proposals, one-pagerssocial— LinkedIn posts, Instagram carouselswebpage— landing pages, microsites
numCards: Suggest based on content length. Short content (500 words) → 5-8 cards. Medium (1000 words) → 10-15 cards. Long (2000+ words) → 15-25 cards. Maximum is 60 for Pro users.
imageOptions: Default to AI-generated images (aiGenerated). Gamma will create relevant visuals for each card.
Card Breaks
Gamma auto-splits content into cards based on numCards. For explicit control, add \n---\n in the markdown where card breaks should occur. When using explicit breaks, set cardSplit: "inputTextBreaks" instead of relying on numCards.
Polling
Generation takes 30-90 seconds typically. The code polls every 3 seconds. If status stays pending for over 3 minutes, something may be wrong — report to user.
After Generation
Once complete, provide the Gamma URL. The user can:
- View and present directly from Gamma
- Edit further in the Gamma app
- Export to PDF or PPTX later (via Gamma UI)
Offer to generate another version with different settings if the user wants to iterate.