{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "1771594b-9a19-4143-8f43-59c9149f1a46",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -100,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "902da551-8eca-48b4-b470-30e56c97df9c",
      "name": "Wordpress",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        180,
        0
      ],
      "parameters": {
        "postId": "2151",
        "options": {},
        "operation": "get"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "02944dc1-3cc5-4ece-b394-c56756bf1c62",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        0
      ],
      "parameters": {
        "url": "https://ai-translate-pro.p.rapidapi.com/translate.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $json.content.rendered }}"
            },
            {
              "name": "language",
              "value": "Hindi"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "ai-translate-pro.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "530a7eec-b5b1-4275-b0c8-8c947a25f61c",
      "name": "Google Docs",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        760,
        0
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $json.data }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "be6ca2fd-e157-4aea-9374-17089d4ff440",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -320
      ],
      "parameters": {
        "width": 600,
        "height": 820,
        "content": "# \ud83c\udf10 Changing Your WordPress Blog Into Any Language\n\nThis n8n workflow automates the translation of WordPress blog posts into any language using an AI translation API, then inserts the translated content into a Google Doc.\n\n---\n\n## \u2699\ufe0f Workflow Overview\n\n**Steps:**\n\n1. Manually trigger the workflow.\n2. Fetch a blog post from WordPress.\n3. Translate the post content using an AI-powered translation API.\n4. Insert the translated text into a specified Google Docs document.\n\n---\n\n## \ud83d\udca1 Use Cases\n\n- \ud83c\udf0d **Multilingual Blogging**: Translate posts into Hindi, Spanish, French, etc., and publish for global readers.\n- \ud83e\uddfe **Content Localization**: Quickly prepare content for regional or international markets.\n- \ud83e\uddea **AI Translation Testing**: Run comparisons between human and AI translations.\n- \ud83e\udde0 **Knowledge Base Expansion**: Store translated content for reuse in help centers or documentation.\n\n---\n## \ud83d\udce6 Notes\n\n- You can modify the post ID to work dynamically.\n- You can switch the target language via input or additional nodes.\n- For better formatting, consider converting HTML to markdown before translation (optional).\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e61f82d4-0486-4d91-8560-dce89116441d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -220
      ],
      "parameters": {
        "height": 380,
        "content": "\n### 1. \u2705 Manual Trigger\nStarts the workflow manually when the user clicks \"Execute Workflow\" inside n8n."
      },
      "typeVersion": 1
    },
    {
      "id": "a17df79e-826b-4a91-9cda-1d7a15b5f888",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -220
      ],
      "parameters": {
        "height": 380,
        "content": "### 2. \ud83c\udf10 WordPress\nFetches the blog post with ID `2151` from a connected WordPress site using the REST API. It retrieves the content in raw HTML format.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8e4a54aa-942b-47a2-8116-70ee15e61bcb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -220
      ],
      "parameters": {
        "height": 380,
        "content": "### 3. \ud83c\udf0d HTTP Request (AI Translation)\nSends the WordPress blog content to the `ai-translate-pro` API via RapidAPI using `multipart/form-data`. The `text` field is filled with the blog post content, and the `language` is set to `Hindi`. The response contains the translated text.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "18a49e1d-cd8f-4277-b6bb-aff3651b75f0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -220
      ],
      "parameters": {
        "height": 380,
        "content": "### 4. \ud83d\udcdd Google Docs\nTakes the translated text from the API response and inserts it into a specified Google Docs document using the Google Docs API with service account credentials.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Wordpress": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Google Docs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Wordpress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}