コンテンツをGoogleシートとSlackに自動配信

中級

これはSocial Media分野の自動化ワークフローで、12個のノードを含みます。主にIf, Set, Slack, Twitter, LinkedInなどのノードを使用。 Google SheetsとSlackを使用してソーシャルメディアコンテンツの配信を自動化

前提条件
  • Slack Bot Token または Webhook URL
  • Twitter API認証情報
  • LinkedIn API認証情報
  • Google Sheets API認証情報
  • Facebook Graph API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "7nrbRUkisTTkK3e8",
  "meta": {
    "instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
    "templateCredsSetupCompleted": true
  },
  "name": "Automate Distribution Content Google Sheet & Slack",
  "tags": [],
  "nodes": [
    {
      "id": "409d8e05-ad6e-4b6f-ba9e-7e26fe070ec5",
      "name": "Google Sheets トリガー",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "event": "rowUpdate",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "[YOUR_SHEET_NAME]"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID_HERE/edit"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "y0YhoaKRGXeG1RfK",
          "name": "temp"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f04569fe-ffd0-4ae5-b284-c71ce26a3f43",
      "name": "コンテンツパラメータ",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f2c1b112-f4ae-40ec-a916-2a8d8af0cd76",
              "name": "social_media_text_core",
              "type": "string",
              "value": "={{ $json.Title }} - {{ $json.Short_Description }}\\nRead more: {{ $json.URL }}\\n{{ $json.Hashtags }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3ce6b53b-43ad-4b9f-8a97-5e551501f8d5",
      "name": "Facebook投稿を確認",
      "type": "n8n-nodes-base.if",
      "position": [
        448,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6b10eac9-d290-4250-a573-8f2b6e0969f5",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.Post_to_Facebook }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "97c1ef75-dcf9-4239-939a-947de498668c",
      "name": "メッセージを投稿",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        672,
        -96
      ],
      "parameters": {
        "edge": "={{ $json.social_media_text_core }}",
        "node": "[YOUR_FACEBOOK_PAGE_ID]",
        "options": {},
        "httpRequestMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "cd54bbdc-25b7-47b5-9e84-b9bc94b95e66",
      "name": "Twitter投稿を確認",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "097807a3-4bd8-4d58-b2d5-4d07691c8139",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.Post_to_Twitter }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4410a6ce-2687-4400-97fe-05903676325a",
      "name": "ツイートを作成",
      "type": "n8n-nodes-base.twitter",
      "position": [
        896,
        0
      ],
      "parameters": {
        "text": "={{ $json.social_media_text_core }}",
        "additionalFields": {}
      },
      "credentials": {
        "twitterOAuth2Api": {
          "id": "i9ltvI3IKFGSIxYt",
          "name": "temp"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d71eda0c-5b96-40ac-9e72-0a68c3dff971",
      "name": "LinkedIn投稿を確認",
      "type": "n8n-nodes-base.if",
      "position": [
        896,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "35e581d3-16a2-4e9b-88ff-cc8aba9816d2",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.Post_to_LinkedIn }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "930262d9-f0d2-44d1-b702-b95eb8baddcc",
      "name": "アップデートを共有",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1120,
        192
      ],
      "parameters": {
        "text": "={{ $json.social_media_text_core }}\n{{ $json.URL }}",
        "postAs": "organization",
        "organization": "[YOUR_LINKEDIN_ORG_ID]",
        "additionalFields": {},
        "binaryPropertyName": "=",
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "XDjElJwF7bJz0ilR",
          "name": "temp"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "699e0dcc-ca88-463e-8cb7-6ed2942c8677",
      "name": "公開ステータスを更新",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        192
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "[YOUR_SHEET_NAME]"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "[YOUR_GOOGLE_SHEET_CONTENT_ID]"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "MSnszF5oRAiSGHDo",
          "name": "temp"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "6218283b-1cbe-4e22-babe-334073a76ebc",
      "name": "Slack通知を送信",
      "type": "n8n-nodes-base.slack",
      "position": [
        1568,
        192
      ],
      "webhookId": "20b1f158-7da3-43f5-ab62-444db7abfca4",
      "parameters": {
        "text": "=New content \"{{ $json.Title }}\" successfully published to social media! 🎉 Check: {{ $json.URL }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "[YOUR_SLACK_CHANNEL_ID]"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "AFKF0YsguyhsagR0",
          "name": "temp"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "1e56067d-18c2-4c40-926c-69e07c78fd9b",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -176
      ],
      "parameters": {
        "color": 3,
        "width": 1840,
        "height": 608,
        "content": "# Flow"
      },
      "typeVersion": 1
    },
    {
      "id": "cb142585-3cfb-4475-95f8-82d4e7ca5742",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        496
      ],
      "parameters": {
        "color": 5,
        "width": 1840,
        "height": 3504,
        "content": "# \"Automated Social Media Content Distribution System,\"\n\n---\n\n### Automated Social Media Content Distribution System\n\n* **Problem Solved:** Many Small and Medium-sized Enterprises (SMEs) struggle with consistently promoting their new content (e.g., blog posts, news updates, announcements) across various social media platforms. The manual process of copying and pasting content to Facebook, Twitter, and LinkedIn every time there's an update is time-consuming, prone to errors, and often leads to delays, resulting in missed audience engagement.\n\n* **Solution Overview:** This n8n workflow automates the entire content distribution process to your social media channels. Simply add the details of your new content (title, URL, short description, image URL, and social media posting preferences) into a single row in a Google Sheet. The system will then automatically publish it to your selected social media platforms, update its publication status in the sheet, and notify your team of the successful distribution. This ensures efficiency, consistency, and frees up your valuable time.\n\n* **For Whom:** This workflow is ideal for:\n    * **Small and Medium-sized Enterprises (SMEs):** To automate their marketing efforts without needing dedicated social media managers.\n    * **Content Creators & Bloggers:** To effortlessly share new articles and updates across their online presence.\n    * **Marketing Teams:** To streamline content promotion and ensure consistent brand messaging.\n    * **Anyone looking for a free and efficient way to cross-post content.**\n\n### How It Works (Workflow Stages) ⚙️\n\nThis system transforms manual, repetitive tasks into a smooth, automated content distribution pipeline:\n\n1.  **Content Submission & Trigger:**\n    * You add a new row to your designated Google Sheet with all the content details (Title, URL, Description, Image URL, Hashtags, and boolean flags for which platforms to post to).\n    * The **Google Sheets Trigger** node immediately detects this new entry, initiating the workflow.\n\n2.  **Content Preparation:**\n    * The **Set** node takes the raw data from your Google Sheet and formats it into a cohesive text string (`social_media_text_core`) that is suitable for posting across different social media platforms.\n\n3.  **Conditional Social Media Posting:**\n    * A series of **If** nodes (`Check Facebook Post`, `Check Twitter Post`, `Check LinkedIn Post`) sequentially check your preferences (based on the `Post_to_Facebook`, `Post_to_Twitter`, `Post_to_LinkedIn` columns in your sheet).\n    * If a platform is marked `TRUE`, the corresponding social media node (`Facebook`, `Twitter`, `LinkedIn`) is activated to publish your content. If `FALSE`, that platform is skipped, and the workflow moves to the next check.\n\n4.  **Status Update & Notification:**\n    * After attempting to post to all selected platforms, the **Google Sheets (Update)** node updates the `Publication_Status` column of your original row to \"Published.\" This prevents re-posting and provides a clear record.\n    * Finally, the **Slack (Notification)** node sends an alert to your chosen Slack channel, confirming that the content has been successfully distributed.\n\n### Setup Steps 🛠️ (Build It Yourself!)\n\nFollow these detailed steps to build and implement this workflow in your n8n instance:\n\n1.  **Prepare Your Google Sheet:**\n    * Create a new Google Sheet (e.g., named \"Social Media Posts\").\n    * Set up the following **exact** column headers in the first row:\n        `Title`, `URL`, `Short_Description`, `Image_URL`, `Hashtags`, `Post_to_Facebook`, `Post_to_Twitter`, `Post_to_LinkedIn`, `Publication_Status`\n    * Fill in a test row with some sample data, ensuring `TRUE`/`FALSE` values for the posting flags.\n\n2.  **Gather Your API Keys & Credentials:**\n    * **Google Sheets Credential**: You'll need an OAuth2 credential for Google Sheets in n8n to allow read/write access to your sheet.\n    * **Facebook Credential**: An OAuth2 credential for Facebook with permissions to post to your selected Page.\n    * **Twitter Credential**: A Twitter API credential (API Key, API Secret, Access Token, Access Token Secret) from your Twitter Developer App.\n    * **LinkedIn Credential**: An OAuth2 credential for LinkedIn with permissions to share updates to your profile or organization page.\n    * **Slack Credential**: A Slack API token (Bot User OAuth Token) for sending messages to your channel.\n\n3.  **Build the n8n Workflow Manually (10 Nodes):**\n    * Start a new workflow in n8n.\n    * Drag and drop each of the following nodes onto the canvas and connect them as described below:\n\n    1.  **Google Sheets Trigger**\n        * **Name:** `Google Sheets Trigger`\n        * **Parameters:**\n            * **Authentication:** Select your Google Sheets credential.\n            * **Spreadsheet ID:** `[Copy the ID from your Google Sheet's URL]`\n            * **Sheet Name:** `[Your Sheet Name, e.g., 'Sheet1' or 'Content']`\n            * **Watch For:** `Rows`\n            * **Events:** `Added`\n        * **Connections:** Output to `Set Content Parameters`.\n\n    2.  **Set**\n        * **Name:** `Set Content Parameters`\n        * **Parameters:**\n            * **Values to Set:** Add a new value:\n                * **Type:** `String`\n                * **Name:** `social_media_text_core`\n                * **Value:** `={{ $json.Title }} - {{ $json.Short_Description }}\\nRead more: {{ $json.URL }}\\n{{ $json.Hashtags }}`\n        * **Connections:** Output to `Check Facebook Post`.\n\n    3.  **If**\n        * **Name:** `Check Facebook Post`\n        * **Parameters:**\n            * **Value 1:** `={{ $json.Post_to_Facebook }}`\n            * **Operation:** `is true`\n        * **Connections:** `True` output to `Post Facebook Message`. `False` output to `Check Twitter Post`.\n\n    4.  **Facebook**\n        * **Name:** `Post Facebook Message`\n        * **Parameters:**\n            * **Authentication:** Select your Facebook credential.\n            * **Page ID:** `[YOUR_FACEBOOK_PAGE_ID]`\n            * **Message:** `={{ $json.social_media_text_core }}`\n            * **Link:** `={{ $json.URL }}`\n            * **Picture:** `={{ $json.Image_URL }}`\n            * **Options:** `Published` (checked)\n        * **Connections:** Output to `Check Twitter Post`.\n\n    5.  **If**\n        * **Name:** `Check Twitter Post`\n        * **Parameters:**\n            * **Value 1:** `={{ $json.Post_to_Twitter }}`\n            * **Operation:** `is true`\n        * **Connections:** `True` output to `Create Tweet`. `False` output to `Check LinkedIn Post`.\n\n    6.  **Twitter**\n        * **Name:** `Create Tweet`\n        * **Parameters:**\n            * **Authentication:** Select your Twitter credential.\n            * **Tweet:** `={{ $json.social_media_text_core }}`\n            * **Image URL:** `={{ $json.Image_URL }}`\n        * **Connections:** Output to `Check LinkedIn Post`.\n\n    7.  **If**\n        * **Name:** `Check LinkedIn Post`\n        * **Parameters:**\n            * **Value 1:** `={{ $json.Post_to_LinkedIn }}`\n            * **Operation:** `is true`\n        * **Connections:** `True` output to `Share LinkedIn Update`. `False` output to `Update Publication Status`.\n\n    8.  **LinkedIn**\n        * **Name:** `Share LinkedIn Update`\n        * **Parameters:**\n            * **Authentication:** Select your LinkedIn credential.\n            * **Resource:** `Share Update`\n            * **Type:** `Organization` or `Personal` (Choose as appropriate)\n            * **Organization ID:** `[YOUR_LINKEDIN_ORG_ID]` (If `Organization` type selected)\n            * **Content:** `={{ $json.social_media_text_core }}`\n            * **Content URL:** `={{ $json.URL }}`\n            * **Image URL:** `={{ $json.Image_URL }}`\n        * **Connections:** Output to `Update Publication Status`.\n\n    9.  **Google Sheets**\n        * **Name:** `Update Publication Status`\n        * **Parameters:**\n            * **Authentication:** Select your Google Sheets credential.\n            * **Spreadsheet ID:** `[YOUR_GOOGLE_SHEET_CONTENT_ID]`\n            * **Sheet Name:** `[Your Sheet Name, e.g., 'Sheet1' or 'Content']`\n            * **Operation:** `Update Row`\n            * **Key Column:** `URL`\n            * **Key Value:** `={{ $json.URL }}`\n            * **Values:** Add a new value:\n                * **Column:** `Publication_Status`\n                * **Value:** `Published`\n        * **Connections:** Receives connections from both `Share LinkedIn Update` and the `False` branch of `Check LinkedIn Post`.\n\n    10. **Slack**\n        * **Name:** `Send Slack Notification`\n        * **Parameters:**\n            * **Authentication:** Select your Slack credential.\n            * **Chat ID:** `[YOUR_SLACK_CHANNEL_ID]`\n            * **Text:** `New content \"{{ $json.Title }}\" successfully published to social media! 🎉 Check: {{ $json.URL }}`\n        * **Connections:** Output to `Update Publication Status`.\n\n4.  **Final Steps & Activation:**\n    * **Test the Workflow:** Before activating, manually add a new row to your Google Sheet or use n8n's \"Execute Workflow\" button (if available for triggers). Observe the flow through each node to ensure it behaves as expected and posts to your social media accounts.\n    * **Activate Workflow:** Once you are confident it's working correctly, turn the workflow \"Active\" in the top right corner of your n8n canvas.\n\nYou now have a fully automated system for distributing your content across social media from a simple Google Sheet!"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3633890b-8499-45ab-ac18-321c35959730",
  "connections": {
    "930262d9-f0d2-44d1-b702-b95eb8baddcc": {
      "main": [
        [
          {
            "node": "699e0dcc-ca88-463e-8cb7-6ed2942c8677",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cd54bbdc-25b7-47b5-9e84-b9bc94b95e66": {
      "main": [
        [
          {
            "node": "4410a6ce-2687-4400-97fe-05903676325a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d71eda0c-5b96-40ac-9e72-0a68c3dff971",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f04569fe-ffd0-4ae5-b284-c71ce26a3f43": {
      "main": [
        [
          {
            "node": "3ce6b53b-43ad-4b9f-8a97-5e551501f8d5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3ce6b53b-43ad-4b9f-8a97-5e551501f8d5": {
      "main": [
        [
          {
            "node": "97c1ef75-dcf9-4239-939a-947de498668c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "cd54bbdc-25b7-47b5-9e84-b9bc94b95e66",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d71eda0c-5b96-40ac-9e72-0a68c3dff971": {
      "main": [
        [
          {
            "node": "930262d9-f0d2-44d1-b702-b95eb8baddcc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "409d8e05-ad6e-4b6f-ba9e-7e26fe070ec5": {
      "main": [
        [
          {
            "node": "f04569fe-ffd0-4ae5-b284-c71ce26a3f43",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "699e0dcc-ca88-463e-8cb7-6ed2942c8677": {
      "main": [
        [
          {
            "node": "6218283b-1cbe-4e22-babe-334073a76ebc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - ソーシャルメディア

有料ですか?

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

関連ワークフロー

インタラクティブなコンテンツ・マーケティングプラットフォーム(GPT-4を含む)
GPT-4 を使用してコンテンツ分析とマルチプラットフォーム展開を自動化
Code
Merge
Twitter
+
Code
Merge
Twitter
15 ノードMarth
ソーシャルメディア
ソーシャルメディアファクトリー
AIベースのソーシャルメディアコンテンツ作成ツール、マルチプラットフォーム公開と承認対応
If
Set
Gmail
+
If
Set
Gmail
48 ノードTaiki
ソーシャルメディア
従業員の表彰業務の自動化(Slack、Sheets、Gmailを使用)
Slack、Sheets、Gmailを使用し、必要に応じてGPT-4を活用した従業員賞賛業務の自動化
If
Code
Gmail
+
If
Code
Gmail
16 ノードMarth
人事
GPT-4 と Stripe 基于の自動スマートキャッシュフローと請求管理システム
GPT-4、Stripe、Google Workspaceを活用した自動入金業務フローとスマートアラート
If
Wait
Gmail
+
If
Wait
Gmail
16 ノードMarth
請求書処理
リード獲得の自動化、AI資格検証、そして ElevenLabs による個別化された音声フォローアップ
OpenAI および ElevenLabs を基にした自動化されたリードキャプチャと AI による個別化音声フォローアップ
If
Set
Code
+
If
Set
Code
22 ノードMarth
リードナーチャリング
ポストファクトリー
OpenAI、LinkedIn、TwitterによるSlack承認に基づくソーシャルメディアコンテンツ作成の自動化
If
Gmail
Slack
+
If
Gmail
Slack
22 ノードSaloni Malhotra
ソーシャルメディア
ワークフロー情報
難易度
中級
ノード数12
カテゴリー1
ノードタイプ9
難易度説明

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

作成者
Marth

Marth

@marth

Simplifying Business with Smart Automation. I create and share user-friendly, highly efficient n8n workflow templates for SMEs, focusing on digital marketing, sales, and operational excellence. Get ready to automate, innovate, and elevate your business. Connect me on Linkedin for custom solutions.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34