8
n8n 中文网amn8n.com

Groovenexus英语到印地语最终版

中级

这是一个AI领域的自动化工作流,包含 9 个节点。主要使用 Set, Code, Wordpress, HttpRequest, OpenAi 等节点,结合人工智能技术实现智能自动化。 使用OpenAI将RSS源内容翻译为印地语并发布到WordPress

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "HmlNHuYYzQAhoImx",
  "meta": {
    "instanceId": "ca7e4439d37f2d7ddaa363ea2b029357e1ee59824d58b9533ac05bf57f803d9d",
    "templateCredsSetupCompleted": true
  },
  "name": "Groovenexus 英语到印地语最终版",
  "tags": [],
  "nodes": [
    {
      "id": "8528c900-c5a9-417f-88b7-b881445b5807",
      "name": "RSS Feed触发器",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        40,
        0
      ],
      "parameters": {
        "feedUrl": "https://www.abc.com/uncategorized-hi/hindi-blog/feed/",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 10
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "96448786-b6eb-46ca-b3dc-7d8f1bec3594",
      "name": "Wordpress",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        1160,
        0
      ],
      "parameters": {
        "title": "={{ $json.output }}",
        "additionalFields": {
          "status": "draft",
          "content": "={{ $('Content English to Hindi').item.json.output }}",
          "authorId": 16,
          "categories": [
            130
          ],
          "postTemplate": {
            "values": {}
          }
        }
      },
      "credentials": {
        "wordpressApi": {
          "id": "",
          "name": "ABC Hindi Website"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "48763deb-8d7f-4e92-ac09-69d5fa54828f",
      "name": "上传图片到Wordpress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        260
      ],
      "parameters": {
        "url": "https://www.abc.com/hindi/wp-json/wp/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Disposition",
              "value": "=attachment; filename=\"cover-image-{{ $('Wordpress').item.json.id }}.jpeg\""
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "LTsdRUgRpnQTGZja",
          "name": "Abc Hindi Website"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7a684f71-c859-484a-b402-774c4a36c261",
      "name": "在Wordpress文章上设置图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        260
      ],
      "parameters": {
        "url": "=https://www.abc.com/hindi/wp-json/wp/v2/posts/{{ $('Wordpress').item.json.id }}",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "=featured_media",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "id": "",
          "name": "abc Hindi Website"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a2208042-6ff8-48e3-a829-6128bde0446e",
      "name": "获取图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        520,
        260
      ],
      "parameters": {
        "url": "={{ $json[\"image-url\"] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "1454e0bc-462e-4446-9f66-3cc3429e2f81",
      "name": "设置图片URL",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1f0541df-05ab-4e3d-a5d8-3904579fc8a9",
              "name": "image-url",
              "type": "string",
              "value": "={{ $('Code1').item.json.featuredImage }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f1720d6b-b344-4866-bcb1-36495fde6a06",
      "name": "内容英语到印地语",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        440,
        0
      ],
      "parameters": {
        "text": "={{ $json['content:encoded'] }}",
        "prompt": "define",
        "options": {},
        "resource": "assistant",
        "assistantId": {
          "__rl": true,
          "mode": "list",
          "value": "asst_ydjGgj8Sax8qJgRgLh6XfBHB",
          "cachedResultName": "English to Hindi"
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": "OpenAi account 3"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "3d45c40e-642d-4b3e-8a11-bc6c9a0c25ff",
      "name": "标题转换",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        800,
        0
      ],
      "parameters": {
        "text": "={{ $('RSS Feed Trigger').item.json.title }}",
        "prompt": "define",
        "options": {},
        "resource": "assistant",
        "assistantId": {
          "__rl": true,
          "mode": "list",
          "value": "asst_ydjGgj8Sax8qJgRgLh6XfBHB",
          "cachedResultName": "English to Hindi"
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "N9Rmx2XNuFHkb5uR",
          "name": "OpenAi account 3"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a551a234-c441-4248-a3b4-2d691b870c51",
      "name": "代码1",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        0
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst updatedItems = items.map((item) => {\n  const content = item?.json[\"content:encoded\"];\n  const match = content.match(/<featured-image>(.*?)<\\/featured-image>/);\n  item.json.featuredImage = match ? match[1] : null;\n  return item;\n});\nreturn updatedItems;\n"
      },
      "typeVersion": 2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5b9ae900-cad6-4b32-95f3-3a66650054d4",
  "connections": {
    "Code1": {
      "main": [
        [
          {
            "node": "Content English to Hindi",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET Image": {
      "main": [
        [
          {
            "node": "Upload Image to Wordpress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wordpress": {
      "main": [
        [
          {
            "node": "Set Image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Image URL": {
      "main": [
        [
          {
            "node": "GET Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Title convert": {
      "main": [
        [
          {
            "node": "Wordpress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Trigger": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content English to Hindi": {
      "main": [
        [
          {
            "node": "Title convert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to Wordpress": {
      "main": [
        [
          {
            "node": "Set Image on Wordpress Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 人工智能

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量9
分类1
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
The Higher Pitch

The Higher Pitch

@digvijay

Results-driven developer with expertise in automation, system integration, and CRM solutions. Skilled in building efficient workflows with n8n, integrating platforms like WordPress, Zoho CRM, and APIs to streamline business processes. Passionate about solving real-world problems with clean, scalable, and automated solutions.

外部链接
在 n8n.io 查看

分享此工作流