> ## Documentation Index
> Fetch the complete documentation index at: https://docs.highailabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Social Content Pipeline

> Automated Trigger.dev pipeline that generates Professor High social media content from strain and blog data across all major platforms.

## Overview

The Social Content Pipeline is a Trigger.dev background pipeline that generates **Professor High** social media content from your strain database, blog articles, and terpene data. It produces ready-to-review editorial drafts for TikTok, Instagram, X/Twitter, YouTube, and LinkedIn -- covering everything from strain breakdowns to myth-busting threads to carousel posts.

All generated content saves as **drafts for manual review**. Nothing is auto-posted. You control what goes live and when.

<Note>
  This pipeline generates the script, caption, metadata, and image package. Video-first drafts route through the [Video Production Pipeline](/social/video-pipeline) for OpenMontage renders. Actual posting to social platforms is always a manual approval step.
</Note>

## Content Strategy

The pipeline follows 6 content pillars with target distribution percentages to maintain a balanced social presence:

| Pillar            | Weight | Description                          | Example Formats                                           |
| ----------------- | ------ | ------------------------------------ | --------------------------------------------------------- |
| **Strain Intel**  | 30%    | Deep dives into specific strains     | Strain breakdowns, terpene spotlights, comparison posts   |
| **Science Drops** | 20%    | Cannabis science made accessible     | Terpene explainers, entourage effect, research highlights |
| **Myth Busting**  | 15%    | Correcting common misconceptions     | "Indica vs Sativa is outdated" threads, fact-check posts  |
| **Lifestyle**     | 15%    | Cannabis culture and experiences     | Activity pairings, consumption tips, vibe guides          |
| **App Features**  | 10%    | High IQ product highlights           | Label Scanner demos, stash tips, feature walkthroughs     |
| **Community**     | 10%    | Engagement and conversation starters | Polls, "what's in your stash" prompts, user stories       |

## Supported Platforms

<CardGroup cols={3}>
  <Card title="TikTok" icon="tiktok">
    Short-form video scripts with hooks, captions, and hashtag sets optimized for discovery.
  </Card>

  <Card title="Instagram" icon="instagram">
    Feed posts, carousels (up to 10 slides), Reels scripts, and Stories sequences with visual direction.
  </Card>

  <Card title="X / Twitter" icon="x-twitter">
    Single tweets, threads (up to 10 posts), and quote-tweet-ready takes with character-count awareness.
  </Card>

  <Card title="YouTube" icon="youtube">
    Shorts scripts and long-form video outlines with chapter markers and thumbnail concepts.
  </Card>

  <Card title="LinkedIn" icon="linkedin">
    Professional-tone posts covering cannabis industry trends, data insights, and platform updates.
  </Card>
</CardGroup>

## How It Works

The pipeline has 4 stages that transform source data into ready-to-review social media drafts:

<Steps>
  <Step title="Fetch Source Data">
    The pipeline pulls source material based on the content type. For strain breakdowns, it fetches the full strain profile (terpenes, effects, genetics, High Family). For science explainers, it pulls terpene data and research. For blog-based content, it fetches the full article text. All source data is assembled into a structured context package for the AI.
  </Step>

  <Step title="Generate Text">
    **Claude Sonnet** generates the post text using the source data, target platform, content type, and Professor High's brand voice. The output is platform-native -- threads for X, carousel slide text for Instagram, hook-first scripts for TikTok. Each generation includes the post body, hashtags, caption, and any platform-specific metadata (slide count, character counts, etc.).
  </Step>

  <Step title="Generate Images">
    **Google Gemini** generates visual assets with the Professor High reference image for character consistency. Instagram carousels get individual slide images. TikTok and YouTube get thumbnail concepts. X posts get optional companion images. Image prompts are derived from the text content to ensure visual-text alignment.
  </Step>

  <Step title="Save Draft">
    The complete draft -- text, images, metadata, and source references -- is saved to the `social_content_drafts` table in Supabase with status `draft`. Images are uploaded to the `social-content` Supabase Storage bucket. The draft is now ready for review in the [Draft Queue](/help/features/social-content-drafts).
  </Step>

  <Step title="Render Video When Needed">
    TikTok, Reels, Shorts, show pilots, and app demos use the [Video Production Pipeline](/social/video-pipeline). OpenMontage turns the approved brief into a draft render using the selected pipeline and runtime.
  </Step>
</Steps>

## Pipeline Architecture

### Location

```
packages/trigger/src/tasks/social-content/
├── 01-fetch-source.ts
├── 02-generate-text.ts
├── 03-generate-images.ts
├── 04-save-draft.ts
├── orchestrator.ts
├── batch.ts
└── scheduled.ts
```

### Task Summary

| Task ID                             | Stage | Model / Tool   | Purpose                                           |
| ----------------------------------- | ----- | -------------- | ------------------------------------------------- |
| `social-content-01-fetch-source`    | 1     | Supabase + API | Fetch strain, blog, or terpene source data        |
| `social-content-02-generate-text`   | 2     | Claude Sonnet  | Generate platform-native post text                |
| `social-content-03-generate-images` | 3     | Gemini         | Generate visuals with Professor High              |
| `social-content-04-save-draft`      | 4     | Supabase       | Save draft and upload images                      |
| `social-content-pipeline`           | --    | Orchestrator   | Coordinate all 4 stages for a single post         |
| `social-content-batch`              | --    | Batch          | Generate a full day or week of content            |
| `social-content-weekly-generation`  | --    | Cron           | Scheduled weekly generation (disabled by default) |

## Running the Pipeline

### Single Post (Dashboard)

Go to the [Trigger.dev dashboard](https://cloud.trigger.dev/projects/v3/proj_kmfmmftspsichqetwiom) and run the `social-content-pipeline` task:

```json theme={null}
{
  "platform": "instagram",
  "contentType": "strain-breakdown",
  "sourceSlug": "blue-dream"
}
```

### Batch Generation

Run `social-content-batch` to generate a full day or week of content across all platforms:

```json theme={null}
{
  "mode": "day",
  "date": "2026-04-12"
}
```

```json theme={null}
{
  "mode": "week",
  "startDate": "2026-04-14"
}
```

Batch mode uses the content pillar distribution to select the right mix of content types and platforms for the time period.

### Scheduled Generation

The `social-content-weekly-generation` task is a cron-triggered job that runs **every Sunday at 6 PM Central** to generate the following week's content. It is **disabled by default** -- activate it from the Trigger.dev dashboard when you are ready for automated weekly generation.

## Content Types

| Content Type        | Platforms            | Description                                                                        |
| ------------------- | -------------------- | ---------------------------------------------------------------------------------- |
| `strain-breakdown`  | All                  | Deep dive into a single strain's profile, effects, and terpenes                    |
| `science-explainer` | All                  | Educational post about cannabis science (terpenes, cannabinoids, entourage effect) |
| `myth-bust`         | X, Instagram, TikTok | Debunking a common cannabis misconception                                          |
| `carousel`          | Instagram            | Multi-slide visual story (up to 10 slides)                                         |
| `thread`            | X                    | Multi-post thread (up to 10 tweets)                                                |
| `tweet`             | X                    | Single tweet with optional image                                                   |
| `terpene-spotlight` | All                  | Focus on a single terpene and its effects                                          |
| `strain-comparison` | Instagram, X         | Side-by-side comparison of two strains                                             |
| `activity-pairing`  | TikTok, Instagram    | Strain recommendation for a specific activity                                      |
| `app-feature`       | All                  | Highlight of a High IQ feature with Professor High                                 |

## Professor High Brand Voice

All generated content uses Professor High's established voice:

* **Knowledgeable but approachable** -- explains complex science in plain language
* **Playful and witty** -- uses humor without being unprofessional
* **Data-driven** -- always cites specific terpene percentages, effects, and strain data
* **Community-focused** -- speaks to the cannabis community, not at them
* **Education-first** -- every post teaches something, even entertainment content

## Draft-First Workflow

The pipeline is designed around a review-before-publish model:

<Steps>
  <Step title="Pipeline Generates">
    Content is generated and saved with status `draft` in the queue.
  </Step>

  <Step title="Review">
    Review drafts via the API. Check text, images, hashtags, and platform formatting.
  </Step>

  <Step title="Render video drafts">
    For video-first content, review the OpenMontage render, captions, thumbnail, duration, and platform fit before approving the post.
  </Step>

  <Step title="Approve or Reject">
    Approve drafts that are ready. Reject or edit those that need changes. Add review notes.
  </Step>

  <Step title="Schedule">
    Set a `scheduled_at` timestamp for approved content to organize your posting calendar.
  </Step>

  <Step title="Publish Manually">
    Copy the approved content to your social media management tool or post directly. Mark as `posted` when live.
  </Step>
</Steps>

See the [Draft Queue Management](/help/features/social-content-drafts) article for full details on the review workflow and API endpoints.

## Storage

### Supabase Storage

Bucket: `social-content`

| Path Pattern                            | Content                          |
| --------------------------------------- | -------------------------------- |
| `{draft_id}/image_{index}.png`          | Generated images for a draft     |
| `{draft_id}/thumbnail.png`              | Video thumbnail concepts         |
| `{draft_id}/carousel/slide_{index}.png` | Individual carousel slide images |

### Database

Table: `social_content_drafts` in Supabase. See [Draft Queue Management](/help/features/social-content-drafts) for the full schema and lifecycle.

## Cost Model

Content generation costs vary by type and platform:

| Component                        | Model          | Cost per Post     |
| -------------------------------- | -------------- | ----------------- |
| Source fetch                     | Supabase + API | \~\$0.00          |
| Text generation                  | Claude Sonnet  | \~\$0.02-0.05     |
| Image generation                 | Gemini         | \~\$0.04-0.12     |
| Storage                          | Supabase       | \~\$0.001         |
| **Single post total**            |                | **\~\$0.06-0.17** |
| **Full week batch (\~35 posts)** |                | **\~\$2.00-6.00** |

<Note>
  Carousel posts cost more due to multiple image generations (up to 10 slides). Single-image posts are at the low end of the range.
</Note>

## Related Features

* [Draft Queue Management](/help/features/social-content-drafts) -- Review, approve, and schedule generated content
* [Video Production Pipeline](/social/video-pipeline) -- OpenMontage path for TikToks, Reels, Shorts, demos, and show pilots
* [Ask AI (Professor High)](/help/features/professor-high) -- The AI persona behind all generated content
* [Strain Music Videos](/help/features/strain-music-videos) -- AI-generated music videos that can be cross-promoted via social content
* [Strain Discovery](/help/features/strain-discovery/searching) -- The strain database that powers strain-based content

<Snippet file="contact-support.mdx" />
