Generate Multi-Platform Content with OpenAI, Tavily Research & Supabase Storage

Go to Workflow
0 views
Built by Jameson Kanakulya Jameson Kanakulya
Created on June 09, 2026

Description

Automated Content Page Generator with AI, Tavily Research, and Supabase Storage



> ⚠️ Self-Hosted Disclaimer: This template requires self-hosted n8n installation and external service credentials (OpenAI, Tavily, Google Drive, NextCloud, Supabase). It cannot run on n8n Cloud due to dependency requirements.

Overview

Transform simple topic inputs into professional, multi-platform content automatically. This workflow combines AI-powered content generation with intelligent research and seamless storage integration to create website content, blog articles, and landing pages optimized for different audiences.

Key Features

Automated Research**: Uses Tavily's advanced search to gather relevant, up-to-date information
Multi-Platform Content**: Generates optimized content for websites, blogs, and landing pages
Image Management**: Downloads from Google Drive and uploads to NextCloud with public URL generation
Database Integration**: Stores all content in Supabase for easy retrieval
Error Handling**: Built-in error management workflow for reliability
Content Optimization**: AI-driven content strategy with trend analysis and SEO optimization

Required Services & APIs

Core Services
n8n**: Self-hosted instance (required)
OpenAI**: GPT-4 API access for content generation
Tavily**: Research API for content discovery
Google Drive**: Image storage and retrieval
Google Sheets**: Content input and workflow triggering
NextCloud**: Image hosting and public URL generation
Supabase**: Database storage for generated content

Setup Instructions

## Prerequisites
Before setting up this workflow, ensure you have:
Self-hosted n8n installation
API credentials for all required services
Database table created in Supabase

## Step 1: Service Account Configuration

OpenAI Setup
Create an OpenAI account at platform.openai.com
Generate API key from the API Keys section
In n8n, create new OpenAI credentials using your API key
Test connection to ensure GPT-4 access

Tavily Research Setup
Sign up at tavily.com
Get your API key from the dashboard
Add Tavily credentials in n8n
Configure search depth to "advanced" for best results

Google Services Setup
Create Google Cloud Project
Enable Google Drive API and Google Sheets API
Create OAuth2 credentials
Configure Google Drive and Google Sheets credentials in n8n
Share your input spreadsheet with the service account

NextCloud Setup
Install NextCloud or use hosted solution
Create application password for API access
Configure NextCloud credentials in n8n
Create /images/ folder for content storage

Supabase Setup
Create Supabase project at supabase.com
Create table with the following structure:
CREATE TABLE works (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
content TEXT NOT NULL,
image_url TEXT,
category TEXT,
created_at TIMESTAMP DEFAULT NOW()
);
Get project URL and service key from settings
Configure Supabase credentials in n8n

## Step 2: Google Sheets Input Setup

Create a Google Sheets document with the following columns:
TITLE**: Topic or title for content generation
IMAGE_URL**: Google Drive sharing URL for associated image

Example format:
TITLE | IMAGE_URL
AI Chatbot Implementation | https://drive.google.com/file/d/your-file-id/view
Digital Marketing Trends 2024 | https://drive.google.com/file/d/another-file-id/view

## Step 3: Workflow Import and Configuration

Import the workflow JSON into your n8n instance
Configure all credential connections:
Link OpenAI credentials to "OpenAI_GPT4_Model" node
Link Tavily credentials to "Tavily_Research_Agent" node
Link Google credentials to "Google_Sheets_Trigger" and "Google_Drive_Image_Downloader" nodes
Link NextCloud credentials to "NextCloud_Image_Uploader" and "NextCloud_Public_URL_Generator" nodes
Link Supabase credentials to "Supabase_Content_Storage" node

Update the Google Sheets Trigger node:
Set your spreadsheet ID in the documentId field
Configure polling frequency (default: every minute)

Test each node connection individually before activating

## Step 4: Error Handler Setup (Optional)

The workflow references an error handler workflow (GWQ4UI1i3Z0jp3GF). Either:
Create a simple error notification workflow with this ID
Remove the error handling references if not needed
Update the workflow ID to match your error handler

## Step 5: Workflow Activation

Save all node configurations
Test the workflow with a sample row in your Google Sheet
Verify content generation and storage in Supabase
Activate the workflow for continuous monitoring

How It Works

## Workflow Process

Trigger: Google Sheets monitors for new rows with content topics
Research: Tavily searches for 3 relevant articles about the topic
Content Generation: AI agent creates multi-platform content (website, blog, landing page)
Content Cleaning: Text processing removes formatting artifacts
Image Processing: Downloads image from Google Drive, uploads to NextCloud
URL Generation: Creates public sharing links for images
Storage: Saves final content package to Supabase database

## Content Output Structure

Each execution generates:
Optimized Title**: SEO-friendly, platform-appropriate headline
Multi-Platform Content**:
Website content (professional, authority-building)
Blog content (educational, SEO-optimized)
Landing page content (conversion-focused)
Category Classification**: Automated content categorization
Image Assets**: Processed and publicly accessible images

Customization Options

## Content Strategy Modification
Edit the AI agent's system message to change content style
Adjust character limits for different platform requirements
Modify category classifications for your industry

## Research Parameters
Change Tavily search depth (basic, advanced)
Adjust number of research sources (1-10)
Modify search topic focus

## Storage Configuration
Update Supabase table structure for additional fields
Change NextCloud folder organization
Modify image naming conventions

Troubleshooting

## Common Issues

Workflow not triggering:
Check Google Sheets permissions
Verify polling frequency settings
Ensure spreadsheet format matches requirements

Content generation errors:
Verify OpenAI API key and credits
Check GPT-4 model access
Review system message formatting

Image processing failures:
Confirm Google Drive sharing permissions
Check NextCloud storage space and permissions
Verify file formats are supported

Database storage issues:
Validate Supabase table structure
Check API key permissions
Review field mapping in storage node

## Performance Optimization
Adjust polling frequency based on your content volume
Monitor API usage to stay within limits
Consider batch processing for high-volume scenarios

Support and Updates

This template is designed for self-hosted n8n environments and requires technical setup. For issues:
Check n8n community forums
Review service-specific documentation
Test individual nodes in isolation
Monitor execution logs for detailed error information

Nodes Used (8)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Drive
n8n-nodes-base.googleDrive
Nextcloud
n8n-nodes-base.nextCloud
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
Supabase
n8n-nodes-base.supabase
Think Tool
@n8n/n8n-nodes-langchain.toolThink