Steadybase
Temporal Workflows

Content Generation Workflow

4-step workflow for AI-powered content creation with memory context.

Content Generation Workflow

A 4-step Temporal workflow that generates GTM content (QBR decks, proposals, call briefs, research reports) using context from the hierarchical memory system.

Workflow Definition

interface ContentGenerationInput {
  contentType: 'qbr' | 'proposal' | 'call-brief' | 'research' | 'outreach';
  accountId: string;
  parameters: Record<string, any>;
}
 
interface ContentGenerationOutput {
  content: string;
  metadata: {
    model: string;
    tokensUsed: number;
    memoryKeysUsed: string[];
  };
}

Steps

Gather Context Activity: gatherContentContext

Collects relevant data for the content type:

  • Account data from CRM
  • Recent Gong call summaries
  • Pipeline and health metrics
  • Previous content for this account

Read Memory Activity: readContentMemory

Loads contextual memory:

  • Org scope: Brand voice, messaging framework, ICP
  • Team scope: Territory context, campaign themes
  • Worker scope: Past content for this account, style preferences

Generate Content Activity: generateContent Model: GPT-4o (content) or Claude (research)

Generates the content using gathered context and memory. The model selection depends on content type:

Content TypeModelReason
QBR DeckGPT-4oStructured, creative output
ProposalGPT-4oPersuasive, formatted writing
Call BriefClaudeAnalytical, fact-focused
ResearchClaudeDeep reasoning, synthesis
OutreachGPT-4oCreative, personalized

Store in Memory Activity: storeContentInMemory

Saves the generated content and its context in the worker's memory for future reference. This allows the Content Writer to reference past deliverables and maintain consistency.

Queries

QueryReturns
statusCurrent step, content type, model used

Example Usage

POST /api/workers/content-writer/start
{
  "workflowType": "content-generation",
  "params": {
    "contentType": "qbr",
    "accountId": "notion",
    "parameters": {
      "quarter": "Q1 2026",
      "includeExpansion": true,
      "includeHealthScore": true
    }
  }
}

On this page