Generate Twitter Content in Personal Style with OpenAI & Supabase RAG

Go to Workflow
1 views
Built by Yusuke Yusuke
Created on June 05, 2026

Description

🎯 Self-Learning X Content Engine (Creator RAG Booster)

Learn your voice. Generate posts that sound like you β€” not AI.

🧩 Overview
This n8n workflow builds a personal RAG (Retrieval-Augmented Generation) system for creators.
It learns from your own past posts and generates new tweets, replies, and image prompts in your tone.

βš™οΈ How it works

Step 1 β€” Ingest
Use the β€œAdd to KB” Form to upload your past posts or notes.
Text + metadata (topic, style) are stored in Supabase as vectors.

Step 2 β€” Generate
Use the β€œGenerate Posts” Form to create new post ideas.
The Agent fetches the most relevant style snippets (via Supabase VectorStore)
Output includes:
πŸ“ post
πŸ’¬ quote
πŸ’­ reply
🎨 image_prompt

πŸ”§ Setup (3–5 min)
Connect Supabase (URL + Key)
Make sure the table name is documents
Enable vector extension (pgvector)
Connect OpenAI API Key
Activate both Forms and open the URLs to test.
Optionally replace Forms with Webhooks.

πŸ’‘ Tip: RLS enabled? Ensure your API key allows insert/select for documents.

🧠 Tech Stack
n8n (self-hosted)
Supabase (Vector Store)
OpenAI (gpt-4.1-mini)
HTML-based completion form

πŸͺ„ Credits
Built by Yusuke | @yskautomation
License: MITView on GitHub

Nodes Used (6)

AI Agent
@n8n/n8n-nodes-langchain.agent
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase