AutomationFlowsGeneral › Generate Images from Poetry via Webhook

Generate Images from Poetry via Webhook

Original n8n title: 诗词图像生成

诗词图像生成. Uses respondToWebhook. Webhook trigger; 3 nodes.

Webhook trigger★★★★☆ complexity3 nodes
General Trigger: Webhook Nodes: 3 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "\u8bd7\u8bcd\u56fe\u50cf\u751f\u6210",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "generate-image",
        "responseMode": "responseNode"
      },
      "id": "image-webhook",
      "name": "\u56fe\u50cf\u63a5\u53e3",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const requestData = $input.first().json;\nconst { poemTitle = '', poemContent = '', style = 'traditional' } = requestData;\n\nconst imageResponse = {\n  success: true,\n  imageUrl: `https://picsum.photos/400/300?random=${Date.now()}`,\n  poemTitle: poemTitle,\n  style: style,\n  description: `\u4e3a\u300a${poemTitle}\u300b\u751f\u6210\u7684${style === 'traditional' ? '\u4f20\u7edf' : '\u73b0\u4ee3'}\u98ce\u683c\u914d\u56fe`,\n  timestamp: new Date().toISOString(),\n  fallback: true,\n  message: '\u56fe\u50cf\u751f\u6210\u529f\u80fd\u6b63\u5728\u5f00\u53d1\u4e2d\uff0c\u5f53\u524d\u663e\u793a\u793a\u4f8b\u56fe\u7247'\n};\n\nreturn imageResponse;"
      },
      "id": "image-generation",
      "name": "\u56fe\u50cf\u751f\u6210",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        400,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}"
      },
      "id": "image-response",
      "name": "\u8fd4\u56de\u56fe\u50cf",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        600,
        300
      ]
    }
  ],
  "connections": {
    "\u56fe\u50cf\u63a5\u53e3": {
      "main": [
        [
          {
            "node": "\u56fe\u50cf\u751f\u6210",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u56fe\u50cf\u751f\u6210": {
      "main": [
        [
          {
            "node": "\u8fd4\u56de\u56fe\u50cf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "1"
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

诗词图像生成. Uses respondToWebhook. Webhook trigger; 3 nodes.

Source: https://github.com/OmagariHare258/classical-poetry-learning/blob/7ce1335124e2943167578bf58815deefdff9d3dc/n8n-workflows/06-image-generation.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

A production-ready authentication workflow implementing secure user registration, login, token verification, and refresh token mechanisms. Perfect for adding authentication to any application without

Crypto, Data Table, Execute Workflow Trigger
General

Portfolio Orchestrator. Uses httpRequest. Webhook trigger; 59 nodes.

HTTP Request
General

This n8n template demonstrates how a simple Multi-Layer Perceptron (MLP) neural network can predict housing prices. The prediction is based on four key features, processed through a three-layer model.

General

github code Try yourself

Google Calendar
General

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

N8N Nodes 1Shot