LinkedIn自動投稿(GPT-4oコンテンツと画像生成、Telegram通知機能付き)

中級

これはSocial Media, Multimodal AI分野の自動化ワークフローで、7個のノードを含みます。主にSet, Code, LinkedIn, Telegram, ManualTriggerなどのノードを使用。 LinkedIn:自動投稿、GPT-4oでコンテンツと画像を生成し、Telegram通知を送信

前提条件
  • LinkedIn API認証情報
  • Telegram Bot Token
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "559fe524ea9daad79a07a81fd3f64f8e3eeddd635511642951eaee3bf4d5ad7a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7",
      "name": "make Linkedin post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        432,
        -48
      ],
      "parameters": {
        "text": "={{ $('Generate Post Content').item.json.message.content.content }}",
        "person": "SKNqCfgpq4",
        "additionalFields": {
          "visibility": "PUBLIC"
        },
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "VHltapEwLBeLEZ0g",
          "name": "LinkedIn account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "276f682f-15cb-4ecb-93f2-fb07f92603e7",
      "name": "ステータス送信済み",
      "type": "n8n-nodes-base.telegram",
      "position": [
        688,
        -48
      ],
      "webhookId": "9373d46a-d5ad-40f4-93c0-7a44ff5fea37",
      "parameters": {
        "text": "=LinkedIn Post Sent Successfully  \n\nTag - {{ $('Get a random Tag').item.json.value }}\n\nURL - https://www.linkedin.com/feed/update/{{ $json.urn }}\n\nPosted At - {{ DateTime.now() }}",
        "chatId": "7281360444",
        "replyMarkup": "inlineKeyboard",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "snxgmnTv52eI8TSD",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "65b044fc-8595-4d00-9bbc-6f67a39a8d05",
      "name": "「ワークフロー実行」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -784,
        -48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125",
      "name": "画像生成",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        192,
        -48
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.message.content.prompt }}",
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "eXO8FZmhMVDhTRz9",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "1fbd87ae-52ac-48e0-95d1-833ffc885a8b",
      "name": "ランダムタグ取得",
      "type": "n8n-nodes-base.code",
      "position": [
        -560,
        -48
      ],
      "parameters": {
        "jsCode": "const devToTags = [\n  \"llm\",\n  \"ai\",\n  \"devops\",\n  \"cloudnative\",\n  \"observability\",\n  \"automation\",\n  \"opensource\",\n  \"cybersecurity\",\n  \"scalability\"\n];\n\nfunction getRandomValuesAsObjects(list, count) {\n  const randomValues = [];\n  for (let i = 0; i < count; i++) {\n    const randomIndex = Math.floor(Math.random() * list.length);\n    randomValues.push({ json: { value: list[randomIndex] } });\n  }\n  return randomValues;\n}\n\nreturn getRandomValuesAsObjects(devToTags, 1);\n"
      },
      "typeVersion": 2
    },
    {
      "id": "35d5303a-48a9-4b2b-945b-ca929e400553",
      "name": "サンプル追加による執筆スタイル設定",
      "type": "n8n-nodes-base.set",
      "position": [
        -352,
        -48
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"posts\": [\n  \"Redis is open source YET AGAIN! But does it matter anymore? Here's the story: • 2009: Redis launched as open-source (BSD license). • 2018: Redis Labs introduced RSAL for modules like Redis Search, Graph etc. • 2024: Redis switched to a commercial license, as cloud providers copied Redis code without contributing back. • 2025: Redis is open source again with AGPL v3. But why? Big players like AWS, Google, and Oracle backed the Valkey fork—a fully open-source Redis alternative now under the Linux Foundation. Check out Valkey—\",\n  \"10x Faster Typescript COMPILER!!! Still there is an ongoing debate on why Microsoft didn't choose Rust or their own C# for this rewrite. Although, according to the team, Go was a better choice as it provided a similar structure and seamless transition. Had it been a ground-up rewrite and not a migration, Rust or C# would have been a better choice.\",\n  \"I recently started working on a Teams to Signal messenger bot after realizing that so many people outright hate using MS Teams, but since it's an industry standard, they cannot directly ditch it. My current goal is to support forwarding incoming text messages on Teams to a messenger like Signal. The second will be to give support for the reply mechanism from Signal and sync it to Teams. Coming to the technical stuff, I am thinking of using automation tools like Cypress or Playwright to do this. But it all boils down to the availability of public APIs of both messengers. I will try to document my progress here, as I might fail trying, like a lot of other times 😅 Let's see how it pans out. How would you approach this kind of problem?\",\n    \"Do you know about the require cache in Node.js? Lets say you have a js module that you have imported in a js file using require statement. It is highly possible that after a few iterations to your module code, the changes wont reflect even after you have reloaded the api server/modules. This happens because there is a module cache that happens. You need to invalidate it in order for the new changes to reflect. More on this here -\",\n    \"How important is Out-of-Box experience for an open source contributor? Nowadays I have been working on creating a seamless out-of-box experience for the new contributors of Sparrow API Tool. A poor app setup experience or hard-to-understand README file can be a serious dealbreaker for the community. I am emphasizing on the following things to make the setup as smooth as possible: 1) Created and hosted Docker images for various microservices like api-service and auth-service on DockerHub. 2) Created an all-in-one docker-compose file to set up everything from database to queue service in one command. 3) Created a migration script that generates a test user on app start—bypassing auth flow for instant contribution. 4) Documented multiple setup methods (Docker and non-Docker). 5) Pre-filled example .env files with required variables for copy-paste convenience. Let me know if you have suggestions to improve this further—I’m open to feedback!\"\n]\n}\n",
        "includeOtherFields": true
      },
      "typeVersion": 3.4,
      "alwaysOutputData": false
    },
    {
      "id": "7eaf45b6-e58f-41f5-83e6-ed168f039301",
      "name": "投稿コンテンツ生成",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -160,
        -48
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=Role: You are my LinkedIn content assistant. Your job is to write perfectly formatted LinkedIn posts that align with my brand voice, tone, and style (based on provided examples). Each post must revolve around a single keyword/tag and avoid unsupported formatting.\n\nCritical Formatting Rules:\n\nDont use bold, italics or bullets.\n\nWhenever you want to add points, use emojis or simple \"- \" before the start of each pointer \n\nDont use big hyphens that AI usually uses while generating content. Instead use comma(,)\n\nStructure:\n\nAn Engaging Hook\n\nPersonal POV (first-person: \"I’ve seen…\")\n\nInsights (trends/tools/case studies)\n\nClear spacing + new line wherever needed\n\nCTA/question (\"What’s your take?\")\n\nRelavant 4-5 treding hashtags\n\nTrends: \nTie to recent news, tools, or debates (no generic advice).\n\nImage Prompt Rules:\nSuggest an AI image prompt related to the post. Based on the post context, it can be:\n- App interface or UX concept\n- Visual metaphor (e.g. “scaling servers as rocket engines”)\n- Stack or architecture illustration\n- Abstract concept visuals (e.g. speed, chaos, control, balance)\n- Tech-product mockups or feature highlights\n- Flowcharts, only suggest if explaining a process, framework, or system\n\nResponse Format (Strictly JSON):\n```json\n{\n  \"content\": \"<LinkedIn-ready post with proper formatting and no markdown symbols>\",\n  \"prompt\": \"<AI image generation prompt – relevant, visual, descriptive>\"\n}"
            },
            {
              "role": "system",
              "content": "=Examples of my past writings. Use them to align the new post with my brand voice, tone, and style,\n\n{{ $json.posts.join(\"\\n\\n\") }}"
            },
            {
              "content": "=Use this tag to write a new article for Linkedin that follows my brand voice, style of writing, and tone. \nTag: {{ $json.value }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "eXO8FZmhMVDhTRz9",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    }
  ],
  "pinData": {},
  "connections": {
    "1fbd87ae-52ac-48e0-95d1-833ffc885a8b": {
      "main": [
        [
          {
            "node": "35d5303a-48a9-4b2b-945b-ca929e400553",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125": {
      "main": [
        [
          {
            "node": "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a83a2f6-f6ab-4657-ab2a-c5594cc13aa7": {
      "main": [
        [
          {
            "node": "276f682f-15cb-4ecb-93f2-fb07f92603e7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7eaf45b6-e58f-41f5-83e6-ed168f039301": {
      "main": [
        [
          {
            "node": "1f6d49f5-4d49-4769-bd4a-2cdb5e28e125",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "35d5303a-48a9-4b2b-945b-ca929e400553": {
      "main": [
        [
          {
            "node": "7eaf45b6-e58f-41f5-83e6-ed168f039301",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "65b044fc-8595-4d00-9bbc-6f67a39a8d05": {
      "main": [
        [
          {
            "node": "1fbd87ae-52ac-48e0-95d1-833ffc885a8b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - ソーシャルメディア, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

動画と画像の投稿 - 新しい Blotato ノード
Blotato と Airtable を使って 9 つのソーシャルプラットフォームにコンテンツを自動投稿する
Set
Code
Wait
+
Set
Code
Wait
51 ノードMax aka Mosheh
ソーシャルメディア
X(旧Twitter)へのプロフェッショナルな返信を自動化するツイート
X プラットフォームのツイートクリーニングと返信を GPT とタイマーによるローテーションで自動化
Set
Code
Wait
+
Set
Code
Wait
19 ノードJorge Martínez
ソーシャルメディア
AIを使ってWordPress記事を書く(キーワードいくつかから始める)
GPT-4、DALL-E、Wikipediaを基にした自動ブログ記事生成ツール(WordPress向け)
If
Set
Code
+
If
Set
Code
37 ノードPunit
コンテンツ作成
Telegram自動複製ヘッドライナー
GPT-4o-miniを基にしたTelegramチャンネルコンテンツの自動コピーと翻译
If
Set
Code
+
If
Set
Code
19 ノードShohani
ソーシャルメディア
✨🩷ソーシャルメディアコンテンツ自動投稿工場 + システムプロンプト組み合わせ
GPT-4oを使用して6つのプラットフォーム向けにプラットフォーム最適化されたソーシャルメディアコンテンツを生成
If
Set
Code
+
If
Set
Code
100 ノードLuan Correia
ソーシャルメディア
Google DriveからInstagramカルーセル投稿(CloudinaryとTelegram通知経由)
Cloudinaryを用いてGoogle DriveからInstagramカルーセル投稿を作成し、Telegram通知を送信する
Set
Code
Wait
+
Set
Code
Wait
17 ノードRobert Schröder
ソーシャルメディア
ワークフロー情報
難易度
中級
ノード数7
カテゴリー2
ノードタイプ6
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者

Hi, I’m Punit a DevOps & Cloud Engineer with a strong focus on automation and workflow orchestration using n8n. I specialize in building robust, scalable workflows that connect APIs, services, and internal tools to automate business processes end-to-end. Whether you need help setting up complex logic, integrating third-party tools, or deploying n8n in production, I’m here to help. Let’s work together to bring your automation ideas to life.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34