Animated data flow diagram

AI Research & Content Agent: Perplexity to HTML Web Page

Version: 1.0.0 | Last Updated: 2025-07-11

Integrates with:

n8n OpenAI Perplexity Telegram
Core AI Power
7/10
Automation Level
8/10
Integration Reach
3 systems
Setup Simplicity
6/10
Adaptability
7/10

Overview

Unlock Automated Content Creation with this AI Agent

This powerful n8n workflow functions as a complete content creation pipeline. Triggered by a simple webhook with a topic, it initiates a sophisticated, multi-step AI process. First, it uses an OpenAI model to refine the initial topic into a detailed research prompt. Then, it leverages Perplexity AI for up-to-date, comprehensive research. The unstructured results are intelligently parsed and structured into a clean JSON format by another AI call. Finally, the agent performs a two-stage generation process to create a semantic HTML structure and then applies modern Tailwind CSS styling, outputting a complete, single-line HTML web page ready for publishing.

Key Features & Benefits

  • AI-Driven Research: Utilizes Perplexity AI for accurate and current information on any subject.
  • Automated Prompt Engineering: Intelligently refines your initial topic to ensure higher quality research results.
  • Multi-Stage Content Generation: A robust pipeline that structures raw data, writes content, formats it in HTML, and applies responsive styling with Tailwind CSS.
  • Structured Data Output: Converts unstructured research into a well-defined JSON object, perfect for other automations.
  • Webhook Trigger: Easily integrate this agent into your existing CMS, marketing tools, or internal dashboards.
  • Optional Notifications: Includes an optional step to send a summary of the research to a Telegram chat for progress monitoring.

Use Cases

  • Rapidly generate SEO-optimized blog posts on any topic for an e-commerce store.
  • Create detailed feature-comparison pages for a B2B SaaS product to attract informed buyers.
  • Automate the creation of internal knowledge base articles from technical queries.
  • Build a scalable content engine that can be triggered by your CMS or other marketing tools.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • Perplexity AI API Key.
  • OpenAI API Key with access to a suitable model (e.g., gpt-4o-mini).
  • (Optional) Telegram Bot API Key and a Chat ID for notifications.

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Configure all OpenAI nodes (nodes named 'gpt-4o-mini...') by selecting your OpenAI API credential.
  4. Configure the 'Perplexity' HTTP Request node: in the 'Authentication' section, create a new Header Auth credential. Set the 'Name' to 'Authorization' and the 'Value' to 'Bearer YOUR_PERPLEXITY_API_KEY'.
  5. (Optional) Configure the 'Telegram' node with your bot's API key credential and update the 'Chat ID' field with your target chat ID.
  6. Activate the workflow.
  7. Trigger the agent by sending a GET request to the webhook URL with a topic query parameter (e.g., https://your-n8n-url/webhook/pblog?topic=The+Future+of+AI+in+Automation). The final, styled HTML will be in the response body.

Tags:

AI AgentContent CreationOpenAIn8nResearch AutomationTailwind CSS

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Request a Consultation