AI Skill Report Card

Building Gemini Conversion Workflows

B+78·Sep 28, 2026·Source: Extension-page
14 / 15

Minimal pattern for any Gemini conversion workflow: prompt template + grounding data + system instructions + output schema.

Python
import google.generativeai as genai import os genai.configure(api_key=os.environ["GEMINI_API_KEY"]) model = genai.GenerativeModel( model_name="gemini-1.5-pro", system_instruction=( "You are a direct-response copywriter for {brand}. " "Voice: {tone}. Always output valid JSON matching the schema." ), ) prompt = f""" CONTEXT (grounding data): {customer_history_json} TASK: Write a 3-step abandoned cart recovery email sequence for this customer. Use chain-of-thought reasoning on their likely objection, then output final copy. OUTPUT SCHEMA: {{"emails": [{{"subject": "", "body": "", "send_delay_hours": 0}}]}} """ response = model.generate_content(prompt)

Every workflow in the repo follows this shape: Input data → Prompt (with CoT + few-shot + system instruction) → Structured output → Action (send/deploy/log) → Metric tracked.

Recommendation▾
Add more concrete examples (only 2 given, both e-commerce/lead-scoring flavored) — show a nurture, closing, or personalization workflow example too, ideally with a 'bad output' contrast
14 / 15

Building a full conversion-workflow repo (50 workflows across 16 categories) follows this sequence:

Progress:
- [ ] 1. Set up repo skeleton and environment (API keys, folder structure)
- [ ] 2. Build core prompt system (templates, CoT, few-shot, system instructions)
- [ ] 3. Wire context/memory integration (CRM, long context, real-time grounding)
- [ ] 4. Implement workflows category-by-category (capture → qualify → convert → retain)
- [ ] 5. Instrument analytics/testing on every workflow
- [ ] 6. Document, version control, and add CI
- [ ] 7. Deploy, monitor, and scale

1. Repo & Environment

  • Clone/init repo with folders: /prompts, /workflows, /data, /tests, /docs, /config
  • Store secrets in .env, never hardcode keys; load via os.environ
  • Verify setup with a smoke test: one call to Gemini, print response

2. Prompt System

  • Templates: parameterized strings with {brand}, {tone}, {customer_data} slots
  • Chain-of-thought: instruct model to reason about buyer psychology/objection before writing final copy — separate reasoning from output using a schema or ---FINAL--- delimiter
  • Few-shot: include 2-3 high-converting example outputs in-prompt to anchor style
  • System instructions: lock brand voice, compliance constraints, and output format at the model level, not per-call

3. Context & Memory

  • Pull CRM data (purchase history, engagement score, last touchpoint) into a JSON blob passed as grounding context
  • Use long-context window for full customer history on high-value workflows (sales closing, VSL scripts); use compressed summaries for high-volume workflows (cart recovery, SMS)
  • Ground time-sensitive prompts (pricing, inventory, live offers) with real-time data fetched right before the call — never cache pricing data in the prompt template

4. Workflow Implementation (by funnel stage)

Implement in this order, since later stages depend on data shapes from earlier ones:

  1. Capture: lead magnets, quizzes, forms, voice-to-lead, social comment import
  2. Qualify/Schedule: chatbot qualifier, lead scoring, appointment setting, call transcription
  3. Landing/Offer: dynamic copy, ad-to-page match, heatmap fixes, exit-intent, VSL scripts
  4. Checkout: cart recovery, one-click checkout, dynamic pricing, upsells, social proof
  5. Nurture: email sequences, SMS/WhatsApp, webinar funnels, case studies, demo personalization
  6. Closing: objection handling, proposals, contract sentiment, chat handover, voice closer
  7. Personalization: content recommender, real-time site personalization, SEO bridge, localization
  8. Community/Partnership: engagement-to-sale, influencer adaptation, affiliate/referral optimization
  9. Retention: loyalty nurture, churn prediction, renewal/upsell, win-back, LTV maximization
  10. Analytics: A/B test generation, dashboards, drop-off diagnosis, journey mapping, behavioral triggers

Each workflow = one file: input_schema → prompt → Gemini call → output_schema → action_hook → metric_logged.

5. Documentation & Version Control

  • README per workflow category: purpose, inputs, outputs, example call
  • Git: feature branch per workflow, PR with before/after conversion metric if available
  • CI: lint prompts (no unresolved {placeholders}), run schema validation tests on sample outputs

6. Deployment & Scaling

  • One-click deploy config (Cloud Run/Vercel/similar) with env-based secrets
  • Monitor: conversion rate per workflow, Gemini error rate, latency, token cost
  • Scale: batch low-priority workflows (nurture emails), keep real-time workflows (chat, checkout) on low-latency paths
  • Security: PII redaction before sending to model, data retention policy, compliance flags per region
Recommendation▾
Include a failure-mode example (e.g. what happens when output schema is skipped, or when system instructions leak between brands) to make pitfalls concrete rather than just listed
12 / 20

Example 1: Abandoned Cart Recovery Input: {customer: "Jane", cart_items: ["Yoga Mat"], abandoned_hours_ago: 2, past_purchases: 3} Output:

JSON
{"emails": [ {"subject": "Jane, your mat is waiting 🧘", "body": "...", "send_delay_hours": 1}, {"subject": "10% off if you complete today", "body": "...", "send_delay_hours": 24}, {"subject": "Last chance — cart expires soon", "body": "...", "send_delay_hours": 72} ]}

Example 2: Predictive Lead Scoring Input: {email_opens: 5, pricing_page_visits: 3, demo_requested: false, company_size: "50-200"} Output: {"score": 78, "tier": "hot", "next_action": "trigger AI appointment setter workflow"}

Recommendation▾
The '50 workflows across 16 categories' claim is asserted but never enumerated or linked — either list the 16 categories explicitly or scope the claim down to avoid appearing aspirational/incomplete
  • Always separate reasoning (CoT) from final output so downstream systems parse cleanly
  • Put brand voice/compliance rules in system instructions, not repeated in every prompt
  • Ground with live data, never bake pricing/inventory/offers into static templates
  • Log a conversion metric for every workflow from day one — retrofitting analytics is expensive
  • Use few-shot examples pulled from your actual top-performing copy, not generic samples
  • Keep high-volume workflows (SMS, cart recovery) cheap: shorter context, smaller model, cached prompts
  • Keep high-stakes workflows (closing, VSL, proposals) rich: long context, full CoT, human review gate
  • Don't hardcode API keys or commit .env files
  • Don't skip the output schema — free-text Gemini output breaks automation pipelines
  • Don't cache real-time grounding data (prices, stock, live offers) — always fetch fresh
  • Don't reuse one system instruction across unrelated brands/workflows — voice drift causes conversion drops
  • Don't deploy sales-closing or high-ticket voice AI workflows without a human escalation path
  • Don't skip PII redaction before sending customer data to the model — compliance risk
  • Don't treat all 50 workflows as equal priority — build capture → qualify → close first; retention/analytics layers depend on that data existing
0
Grade B+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
14/15
Workflow
14/15
Examples
12/20
Completeness
15/20
Format
14/15
Conciseness
13/15