AI-Powered Daily Content Ideas with RAG and Webhook

AI-Powered Daily Content Ideas with RAG and Webhook

This workflow builds a Retrieval-Augmented Generation (RAG) system for generating and managing daily content ideas. It accepts new content via a webhook, chunks and embeds it into a Supabase vector store, and then allows an AI agent to retrieve relevant context and generate responses. The final output is logged to Google Sheets, and any errors are sent to a Slack channel. This is ideal for teams that need to curate, search, and augment a growing knowledge base of content ideas.

Node Breakdown

  1. Sticky Note (n8n-nodes-base.stickyNote) — A visual note with placeholder text. No authentication required. It does not affect execution.
  2. Webhook Trigger (n8n-nodes-base.webhook) — Listens for POST requests on /daily-content-ideas. No authentication (can be enabled manually). It triggers the workflow and passes incoming data (e.g., a new content idea text) to the next nodes.
  3. Text Splitter (@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter) — Splits the incoming content into chunks of 400 characters with an overlap of 40 characters. No authentication required.
  4. Embeddings (@n8n/n8n-nodes-langchain.embeddingsCohere) — Converts each text chunk into a vector embedding using Cohere's embed-english-v3.0 model. Authentication: Cohere API key required via n8n credentials.
  5. Supabase Insert (@n8n/n8n-nodes-langchain.vectorStoreSupabase) — Inserts the chunked and embedded data into a Supabase vector store index named daily_content_ideas. Authentication: Supabase credentials (URL and service role key).
  6. Supabase Query (@n8n/n8n-nodes-langchain.vectorStoreSupabase) — Queries the same Supabase vector store to retrieve relevant chunks based on similarity. Authentication: Same Supabase credentials.
  7. Vector Tool (@n8n/n8n-nodes-langchain.toolVectorStore) — Wraps the vector store query into a tool that an AI agent can call. No additional authentication.
  8. Window Memory (@n8n/n8n-nodes-langchain.memoryBufferWindow) — Keeps a short-term memory of the conversation (buffer window). No authentication.
  9. Chat Model (@n8n/n8n-nodes-langchain.lmChatOpenAi) — The large language model (e.g., GPT‑4) used by the agent. Authentication: OpenAI API key via n8n credentials.
  10. RAG Agent (@n8n/n8n-nodes-langchain.agent) — Orchestrates the RAG process: uses the system message "You are an assistant for Daily Content Ideas", calls the Vector Tool to retrieve relevant context, and generates a response. Authentication: None (uses the connected Chat Model and tools).
  11. Append Sheet (n8n-nodes-base.googleSheets) — Appends the agent's output to a Google Sheet (Sheet ID specified as SHEET_ID, tab Log). Authentication: Google OAuth2.
  12. Slack Alert (n8n-nodes-base.slack) — Sends an error message to the #alerts channel if the RAG Agent fails. Authentication: Slack OAuth2 or token.

Setup Instructions

To use this workflow, you will need accounts and API keys for the following services:

  • n8n — Self‑hosted or cloud instance.
  • Cohere — Create an account at cohere.com and obtain an API key.
  • Supabase — Create a project at supabase.com, enable the pgvector extension, and note your project URL and service role key.
  • OpenAI — Create an API key at platform.openai.com.
  • Google Sheets — A Google account and a spreadsheet where the SHEET_ID is replaced with your sheet's ID. The sheet must contain a tab named Log.
  • Slack — A Slack workspace where you have permission to send messages to the #alerts channel. Generate a bot token or use OAuth.
  1. Replace the placeholder SHEET_ID in the Google Sheets node with your actual sheet ID.
  2. Configure each credential in n8n (Settings > Credentials) for Cohere, Supabase, OpenAI, Google Sheets, and Slack.
  3. Set the webhook URL (generated by n8n) as the endpoint in your external system that posts new content ideas.
  4. Adjust the chunk size and overlap in the Text Splitter as needed.
  5. (Optional) Change the system message in the RAG Agent to match your use case.

Use Cases & Variations

  • Content Curation — Use this workflow to ingest blog posts, social media captions, or product descriptions and then query them with natural language.
  • Knowledge Base Chatbot — Replace the webhook with a chat trigger and memory to build a customer support Q&A bot.
  • Idea Brainstorming — Store past brainstorming sessions or meeting notes, then ask the agent for new ideas based on that context.
  • Error Handling — The Slack alert can be extended to log errors to a different channel or trigger another workflow for remediation.
  • Alternative Embeddings — Swap Cohere for OpenAI embeddings (@n8n/n8n-nodes-langchain.embeddingsOpenAi) or other providers.
  • Different Vector Stores — Replace Supabase with Pinecone, Qdrant, or Weaviate for production scaling.
12 nodeswebhook triggerAI
Sticky NoteWebhookText Splitter Character Text SplitterEmbeddings CohereVector Store SupabaseTool Vector StoreMemory Buffer WindowLm Chat Open AI

Workflow JSON

{
  "name": "Daily Content Ideas",
  "nodes": [
    {
      "parameters": {
        "content": "Placeholder for Daily Content Ideas",
        "height": 530,
        "width": 1100,
        "color": 5
      },
      "id": "ca5f06fc-6dec-4477-bce5-e79c88a25e7d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "daily-content-ideas"
      },
      "id": "07884fea-1b21-4c07-9cc1-0f8c9546154d",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -300,
        0
      ]
    },
    {
      "parameters": {
        "chunkSize": 400,
        "chunkOverlap": 40
      },
      "id": "cddbaad6-33bf-4933-8a99-018c63325ad8",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -130,
        0
      ]
    },
    {
      "parameters": {
        "model": "embed-english-v3.0",
// ... truncated (copy to see full JSON)

How to Import This Workflow

  1. 1Copy the workflow JSON above using the Copy Workflow JSON button.
  2. 2Open your n8n instance and go to Workflows.
  3. 3Click Import from JSON and paste the copied workflow.

Don't have an n8n instance? Start your free trial at n8nautomation.cloud

Related Templates

Automated Blog Post Creation from News with AI and Blogger

This workflow automates the entire process of creating a fully SEO-optimized blog post from a news article. It fetches a trending technology news headline from Mediastack, generates relevant images from Pexels, uses two AI agents (via OpenRouter) to produce a title, slug, meta description, and a complete WordPress-compatible HTML blog post, then posts it directly to Blogger and sends you a Telegram notification. It's perfect for content marketers, bloggers, or anyone who wants to consistently publish fresh, data-driven content without manual effort. Node Breakdown Schedule Trigger (No auth) — Runs the workflow at a set interval (configured every minute by default, but you should change it to daily or hourly). Mediastack News (API Key auth via query parameter) — Fetches the latest technology news article in English from the Mediastack API. Parameters: set to . Genarate image (API Key auth via header, ) — Searches Pexels for up to 2 images related to the news title. Parameters: = , = 2. Send a text message1 (Telegram bot token auth) — Sends a Telegram message with the generated image URLs to the chat ID stored in . AI Agent (Uses OpenRouter Chat Model — API Key auth) — This agent takes the news title and returns a JSON object with three fields: , , and (meta description). The prompt includes strict guidelines for SEO-friendly output. OpenRouter Chat Model (API Key auth) — The language model for the first AI agent, using . Parsing (No auth) — A Code node that cleans the raw AI output (removes markdown code fences) and parses the JSON into usable fields. Copywriter AI Agent (Uses OpenRouter Chat Model2 — API Key auth) — This agent writes a complete 1,000-word SEO blog post in HTML format. It uses the title, meta, and the two images from Pexels. The prompt is very detailed, specifying structure, keyword placement, and styling. OpenRouter Chat Model2 (API Key auth) — Same model as the first, but used for the second agent. Cleanup HTML (No auth) — A Set node that removes any leftover htmlurlhttps://www.googleapis.com/blogger/v3/blogs/$vars.bloggerid/postsPOSThttpQueryAuthAuthorization$vars.telegramchatid$vars.bloggeridbusinesssports`) to match your niche. Multi-language Support — Modify the Mediastack query to fetch news in other languages, and adjust the AI prompts to write in that language. Custom Image Sources — Replace the Pexels node with another image API (e.g., Unsplash) or use a local image generation model. Different CMS — Swap the Blogger HTTP Request node with WordPress or any other CMS API (just change the URL and body format). Human-in-the-Loop — Add a Slack or email approval step before publishing to review the AI-generated content. Newsletter Integration — Instead of posting to a blog, send the formatted content as an email newsletter via Gmail or SendGrid.

16 nodes

AI Chat Agent with OpenAI, Memory, and Web Search

Overview This workflow creates an intelligent AI chat agent that combines OpenAI's language model with conversational memory and real-time web search capabilities via SerpAPI. It is designed to power interactive chat applications where the AI can remember context across messages and fetch up-to-date information from the internet when needed. This is particularly useful for building customer support bots, research assistants, or any conversational interface that requires both knowledge retention and live data access. The workflow is triggered by incoming chat messages and processes them through an AI agent that coordinates between the language model, memory buffer, and search tool. The agent can decide when to use web search to answer questions that require current information, while maintaining conversation history for coherent multi-turn dialogues. Workflow Steps Manual Trigger (No auth) — This node allows you to manually start the workflow for testing purposes. It has no parameters configured and simply provides a button to execute the workflow on demand. When chat message received (No auth) — This is a webhook-based trigger that listens for incoming chat messages. It generates a unique webhook URL that you can integrate with your chat frontend or messaging platform. The parameter is empty, meaning default webhook behavior is used. AI Agent (No auth) — This is the core orchestrator node that manages the conversation flow. It coordinates between the OpenAI model, memory buffer, and SerpAPI tool. The agent decides which tool to use based on the user's query and maintains the conversation state. OpenAI Chat Model (API Key auth) — This node connects to OpenAI's GPT-4o-mini model to generate responses. It requires an OpenAI API key configured in n8n credentials. The parameter is set to , which is a cost-effective and fast model suitable for chat applications. The parameter is empty, using default model settings. Window Buffer Memory (No auth) — This node implements a sliding window memory that stores recent conversation history. It allows the AI to remember context from previous messages within a configurable window size. The parameters are empty, using default memory settings. SerpAPI (API Key auth) — This tool node enables web search functionality via SerpAPI (Google Search API). It requires a SerpAPI API key configured in n8n credentials. The parameter is empty, using default search settings. The agent calls this node when it determines that real-time web data is needed to answer a query. Setup Instructions To use this workflow, you need the following accounts and credentials: OpenAI Account: Sign up at platform.openai.com and create an API key. In n8n, create an "OpenAI" credential and paste your API key. SerpAPI Account: Register at serpapi.com and obtain an API key. In n8n, create a "SerpAPI" credential with your key. Webhook URL: After activating the workflow, copy the webhook URL from the "When chat message received" node. Integrate this URL into your chat application (e.g., a custom web chat widget, Slack app, or Telegram bot). Optional: Configure the memory window size in the "Window Buffer Memory" node if you want to limit or extend conversation context. Use Cases and Variations This workflow can be adapted for multiple scenarios: Customer Support Bot: Replace SerpAPI with a knowledge base tool (e.g., vector store or database lookup) to answer product-specific questions. Research Assistant: Keep SerpAPI for web search and add additional tools like Wikipedia or news APIs. Multi-Platform Chat: Connect the webhook to different messaging platforms (Slack, Discord, Telegram) by adding appropriate trigger nodes. Personal Assistant: Add calendar or email tools to let the AI manage schedules and send messages. Language Translation: Replace the OpenAI model with a translation-specific model or add a translation tool node. To extend the workflow, you can add more tool nodes (e.g., database queries, file operations) and connect them to the AI Agent. The agent will automatically learn to use new tools based on their descriptions.

6 nodes

AI Social Media Content Generator using Local Ollama

This workflow uses a local Ollama instance to automatically generate platform-specific social media content (Twitter, LinkedIn, Reddit, Instagram) for a given topic, brand voice, and target audience. It then reviews and polishes the content for consistency and quality. Perfect for content creators, marketers, or developers who want to quickly produce multi-platform posts with full control over AI model and data privacy. Workflow Steps Manual Trigger (No auth) — Manually start the workflow to generate content on demand. Content Parameters — A Set node that defines three input variables: , , and . These can be edited directly in the node to customize each generation. Generate All Platform Content (Ollama) — An HTTP Request node (No auth) that sends a prompt to the local Ollama API (). It requests the model () to output structured JSON containing posts for Twitter, LinkedIn, Reddit, and Instagram. Parse Content JSON — A Code node that extracts and parses the JSON response from Ollama, merging it with the original topic and a timestamp. Review & Polish (Ollama) — A second HTTP Request node (No auth) that sends the generated content to Ollama for quality review (grammar, tone, formatting) and returns corrected versions if needed. Final Content Output — A Code node that merges the reviewed output with the original and flags whether the content was reviewed. Setup Instructions Ollama: Download and install Ollama on your local machine. Pull the model by running . Ensure Ollama is running (default on ). n8n: The workflow uses only local connections—no external API keys or accounts required. Simply import the JSON into your n8n instance and execute it manually. Customization: Modify the node to change the topic, brand voice, or target audience. Adjust the prompt in the first HTTP Request node to add or remove platforms. Use Cases & Variations Scheduled content generation: Replace the Manual Trigger with a Cron trigger to generate posts daily or weekly. Multi-model support: Change the parameter in Ollama calls to use other models like , , or . Platform expansion: Edit the prompt to include additional platforms (e.g., Facebook, TikTok) or output formats. Integration with publishing tools: After the final output, add nodes to post directly to Twitter via API, save to a Google Sheet, or send to a CMS. Language/tonality: Adjust the and prompt instructions to generate content in different languages or styles.

6 nodes

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.