AI-Powered Educational Prediction and Publishing Engine using Perplexity Sonar - n8n Workflow

Use this n8n workflow template to automate GCE O-Level Math syllabus analysis, generate exam topic predictions using advanced AI (Perplexity), and auto-publish the results to WordPress and Slack.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Educational Content Providers needing rapid syllabus analysis.
• Tutors and academic specialists seeking data-driven exam predictions.
• Agencies looking for sophisticated n8n templates integrating LangChain agents.
• Users interested in combining PDF processing, AI reasoning, and automatic CMS publishing via an n8n node setup.

Overview

The challenge of manually comparing annual syllabus changes against historical exam data is time-consuming for educators. This specialized n8n workflow solves this by fully automating the process. It acts as an AI research assistant, downloading the official syllabus, extracting the text content, and feeding it—alongside manually curated historical context—to an advanced language model (Perplexity Sonar via OpenRouter). The core of this automation is the AI Analysis Agent n8n node, which produces a structured JSON report detailing topic weightage, challenging areas, and specific question predictions. Finally, this powerful n8n workflow handles the conversion, formatting, and immediate distribution, publishing a professional HTML report to WordPress and alerting stakeholders via a Slack n8n node notification, proving the versatility of n8n templates for academic analysis.

How it Works

This comprehensive n8n workflow begins with a Manual Trigger, designed for scheduled or on-demand execution.


  1. Syllabus Acquisition: The process starts by using an HTTP Request n8n node (Fetch O-Level Math Syllabus) to download the official syllabus PDF.

  2. Data Preparation: The Extract Syllabus Text n8n node processes the fetched PDF into usable text. This data, along with a specified analysis_year and pre-set historical context (using the Load Historical Context n8n node), is aggregated.

  3. AI Reasoning: The crucial step involves the AI Analysis Agent n8n node, which utilizes the OpenRouter Chat Model (specifically perplexity/sonar-reasoning). This agent receives a detailed prompt instructing it to act as an expert analyst and return a specific, highly structured JSON output based on the syllabus and historical trends.

  4. Formatting: The raw AI output is parsed, then sent to a Markdown n8n node (Format Report) to generate a readable report structure, which is subsequently converted to HTML.

  5. Publishing & Notification: The final n8n nodes publish the content. The Publish to WordPress n8n node uploads the HTML report automatically, using a dynamic title. Immediately afterward, the Send Slack Summary n8n node executes, sending a succinct summary—including dynamically extracted predicted topics—to a designated Slack channel, finalizing this robust n8n workflow.

Installation Guide

To deploy this specialized n8n workflow, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'New' > 'Import from JSON' option.

  2. OpenRouter/LLM Credentials: Configure the 'OpenRouter Chat Model' n8n node by creating or selecting an OpenRouter API key credential. This provides access to the powerful language model used by the AI Analysis Agent n8n node.

  3. WordPress Credentials: Set up credentials for the 'Publish to WordPress' n8n node, ensuring your n8n instance has the necessary permissions to create posts.

  4. Slack Setup: Configure the 'Send Slack Summary' n8n node with a Slack webhook or API credential, specifying the target channel for notifications.

  5. Review Static Data: Check the 'Load Historical Context' n8n node and update the historicaltopics and challengingareas fields as needed for the most accurate AI analysis.

  6. Activate: Save and activate the n8n workflow. You can test the n8n trigger manually.

Node Details

This complex n8n workflow leverages several specialized n8n nodes:

Manual Trigger (n8n trigger): Initiates the entire analysis and publishing process on demand.
Fetch O-Level Math Syllabus (HTTP Request n8n node): Downloads the syllabus PDF from the specified SEAB URL.
Extract Syllabus Text (Extract From File n8n node): Essential for converting the downloaded PDF file data into raw, usable text for the AI.
Prepare Analysis Data / Load Historical Context (Set n8n node): Used to inject specific variables (like the year) and historical context (recurring topics, challenging areas) into the workflow for the AI agent.
OpenRouter Chat Model (LLM n8n node): Configured to use the perplexity/sonar-reasoning model, providing the high-level reasoning capabilities required by the agent.
AI Analysis Agent (LangChain Agent n8n node): The core intelligence. It receives the system message and detailed user prompt (including required JSON output structure) and executes the analysis.
Format Report (Markdown n8n node): Takes the structured JSON output from the AI and converts it into a clean, presentation-ready Markdown format.
Convert to HTML (HTML n8n node): Prepares the formatted report for web publication.
Publish to WordPress (WordPress n8n node): Automatically posts the generated HTML content. It uses an expression to set the title dynamically: =GCE O-Level Math Predictions {{ $('Prepare Analysis Data').item.json.analysis_year }}.
Send Slack Summary (Slack n8n node): Provides immediate notification of the published report, including dynamic extraction of the top 3 predicted topics using JSONPath expressions from the AI's output, demonstrating the power of this automated n8n workflow.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

Dr. Cheng Siong CHIN serves as a Professor in Intelligent Systems Modelling and Simulation in Newcastle University, Singapore. His academic credentials include an M.Sc. in Advanced Control and Systems Engineering from The University of Manchester and a Ph.D. in Robotics from Nanyang Technological University.

Featured*