Automatic Chinese Language Teaching Post Generator - n8n Workflow

Use this powerful n8n workflow to automate Facebook posts teaching Chinese, integrating Gemini via OpenRouter for culturally tailored content and Recraft.ai for consistent, branded images. This n8n workflow saves hours of manual creation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Language Tutors and Educators targeting Thai or Southeast Asian audiences.
Social Media Managers seeking a seamless content production pipeline.
Automation Specialists looking for advanced n8n templates utilizing multiple AI services (LLMs and image generation).
Content creators needing branded, scalable image generation integrated directly into an n8n workflow.

Overview

Manually creating high-quality, culturally relevant, and visually appealing educational social media posts is incredibly time-consuming. This specialized n8n workflow solves this by fully automating the process, requiring only a single input word to generate a complete Facebook post.

The core value of this n8n automation is its strategic integration of AI. It leverages the power of Gemini (via the OpenRouter n8n node) to generate localized, engaging teaching content written primarily in Thai, complete with dialogues and cultural tips. Immediately following, it uses Recraft.ai to generate a stylized, branded image based on the post's theme. Finally, the Facebook Graph API n8n node ensures the text and image are published together seamlessly.

This robust n8n workflow transforms a tedious content creation process into a single, scalable execution, making it an essential n8n template for education and social media professionals.

How it Works

This comprehensive n8n workflow follows a six-step process, starting from a simple input and culminating in a live social media post.


  1. Trigger & Input: The workflow is initiated by the When chat message received n8n trigger, which captures the Chinese word the user wishes to teach. A subsequent Code n8n node ensures this input word is correctly prepared for subsequent AI processing.

  2. Content Generation: The Create FB Post Content n8n node uses a powerful system prompt and the Gemini 2.5 Pro model (accessed via OpenRouter) to write a complete, highly structured Facebook post. The prompt dictates a specific persona, structure, Thai language usage, cultural insights, and includes a call to action and relevant hashtags.

  3. Image Prompt Creation: The generated text post is then fed into the Create Image Prompt n8n node. This agent, powered by Gemini Flash 1.5, acts as a concept artist, distilling the complex post into a single, brief descriptive sentence suitable for image generation AI. This step ensures clean, structured data for the next n8n node.

  4. Image Generation: The Generate Image (Recraft.ai) n8n node takes the structured image prompt. It calls the Recraft.ai API, enforcing a consistent visual style (digitalillustration, youngadultbook2) and resolution (1024x1024), ensuring all your content maintains a unified brand look.

  5. Publishing: The final step uses the Facebook Graph API n8n node. It executes a POST request to the Page's photos edge, passing both the generated post text (from Create FB Post Content) and the image URL (from the Recraft.ai result) to publish a rich media post instantly.

Installation Guide

To deploy this powerful n8n workflow, follow these setup instructions:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' button and selecting 'Import from JSON'.

  2. Recraft.ai Credentials: The Generate Image (Recraft.ai) n8n node requires an HTTP Header Auth credential. Configure this using your Recraft.ai API key.

  3. OpenRouter Credentials: The AI nodes (Create FB Post Content and Create Image Prompt) use OpenRouter for LLM access. You must create an 'OpenRouter API' credential in n8n and link your API key.

  4. Facebook Graph API Credentials: Set up a 'Facebook Graph API' credential in n8n, ensuring you have the necessary permissions to publish content to your target Facebook Page.

  5. Configure Facebook Page ID: In the Facebook Graph API n8n node, replace the placeholder node value with your specific Facebook Page ID where the posts should be published.

  6. Activate: Save and activate the n8n workflow to enable the When chat message received n8n trigger.

Node Details

When chat message received (n8n Trigger): This n8n trigger starts the workflow, usually by receiving a single word input. It allows immediate, ad-hoc execution based on a message.
Code (n8n node): A utility n8n node that formats the input (chatInput) into structured JSON variables (word and input) to prevent data loss across different routing paths in the n8n workflow.
Create FB Post Content (LangChain Agent n8n node): This core n8n node uses Gemini 2.5 Pro (via OpenRouter) and a detailed system prompt to generate the full, culturally targeted Facebook post content in Thai, ensuring high-quality output. It leverages the connected OpenRouter Chat Model.
Create Image Prompt (LangChain Agent n8n node): Utilizes Gemini Flash 1.5 to act as a concept artist, reducing the lengthy post content into a concise, functional image prompt for the subsequent n8n node.
Structured Output Parser2 (LangChain Output Parser n8n node): Essential for ensuring the image prompt from the AI is wrapped in a strict JSON structure ({"imagepromptbrief": "..."}), preventing the Recraft.ai API call from failing.
Generate Image (Recraft.ai) (HTTP Request n8n node): This n8n node is configured to call the Recraft.ai external API, generating an image using the precise style and prompt generated in the previous steps of the n8n workflow.


  • Facebook Graph API (n8n node): The final action n8n node. It publishes the content by simultaneously posting the text message generated by the AI and the image URL received from Recraft.ai to the specified Facebook Page, completing the entire automation.

Related n8n Workflows

Free

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

Featured*