Manueller Eingriff

Experte

Dies ist ein Automatisierungsworkflow mit 16 Nodes. Hauptsächlich werden Set, Telegram, GoogleSheets, Agent, TelegramTrigger und andere Nodes verwendet. KI-generierte LinkedIn-Posts mit menschlicher Freigabe durch Telegram und GPT erstellen

Voraussetzungen
  • Telegram Bot Token
  • Google Sheets API-Anmeldedaten
  • OpenAI API Key

Kategorie

-
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "oXYAKSV0dFJb8Ms8",
  "meta": {
    "instanceId": "6f81894254c2852bfe28b07fc1f6652b03481706dd714d6609cc88e8521956d2",
    "templateCredsSetupCompleted": true
  },
  "name": "Human In The Loop",
  "tags": [],
  "nodes": [
    {
      "id": "f5f19acd-b1cc-4a0d-ad57-c8c15d0153af",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -896,
        16
      ],
      "webhookId": "6ab6d9c3-588a-4ccc-8ab1-25c853646551",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "R8MxydxKB0c8ESf3",
          "name": "n8nyasser_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cbefc8a8-7cdd-4b9b-91e3-cc658cd29a1e",
      "name": "KI-Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -688,
        16
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "=# Overview\nYou are a linkedin post generator. You will be given a topic to write about and your role is to search the web using the tavily tool and write the final post ready for launch.\n\n## Instructions\n-the post must be valuable and not only talknig about some general information\n-the post must contain atleast 5 hashtags at the bottom related to the topic the post is about."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "9147f506-9c74-4cea-b544-f50e7c4f9e23",
      "name": "Tavily Tool",
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "position": [
        -576,
        208
      ],
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {
          "topic": "general",
          "max_results": 3,
          "search_depth": "advanced"
        },
        "descriptionType": "manual",
        "toolDescription": "use this tool to search the web"
      },
      "credentials": {
        "tavilyApi": {
          "id": "BksvcI6kZKRqXvZS",
          "name": "Tavily cred"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b08e2dae-dc5c-4551-a1b8-389420451d30",
      "name": "Felder bearbeiten",
      "type": "n8n-nodes-base.set",
      "position": [
        -336,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5b135ea8-7c59-4042-b266-c34fdac1130e",
              "name": "post",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "824ac422-255c-4e19-871b-d14c74a5da48",
      "name": "Textnachricht senden",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -128,
        16
      ],
      "webhookId": "54f47618-2173-4b1d-8d57-439e86fbb4ab",
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "message": "=Good to go?\n\n\n{{ $json.post }}",
        "options": {
          "appendAttribution": false
        },
        "operation": "sendAndWait",
        "responseType": "freeText"
      },
      "credentials": {
        "telegramApi": {
          "id": "R8MxydxKB0c8ESf3",
          "name": "n8nyasser_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "95749da9-5818-4bb0-977f-10aeb189d83c",
      "name": "Textklassifikator",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        80,
        16
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.data.text }}",
        "categories": {
          "categories": [
            {
              "category": "Approved",
              "description": "=the post has been reviewed and got approval by the user and no feedback given. The approval from user maybe something like: Good to go, Send it, OK, etc."
            },
            {
              "category": "Denied",
              "description": "=The post got reviewed and the user gave feedback to edit the post or didn't like the post. It maybe something like: Make it shorter, delete part, add something, etc."
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "207c61cc-ab91-494f-b32c-d8183bd2cc9f",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        528,
        208
      ],
      "parameters": {
        "text": "=the post to revise:{{ $('Edit Fields').item.json.post }}\n\nthe human feedback:{{ $('Send a text message').item.json.data.text }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=# Overview\nYou are a linkedin expert writer. Your job is to take the incoming post and revise it based on the human feedback.\n\n## Instructions\nOnly output the body of the post"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "b80c6614-23a2-45ad-9e70-00790f03faff",
      "name": "Felder bearbeiten1",
      "type": "n8n-nodes-base.set",
      "position": [
        848,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3241fcbd-2947-48d2-b847-288d2165a151",
              "name": "output",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d09834f0-b194-4666-8890-d99f5f334789",
      "name": "Zeile in Tabelle anhängen",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        464,
        -96
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/148yOBNcRTo7-xTwlz_KnCiJRiVh7dVyo7CN3THPi0sU/edit#gid=0",
          "cachedResultName": "الورقة1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "148yOBNcRTo7-xTwlz_KnCiJRiVh7dVyo7CN3THPi0sU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/148yOBNcRTo7-xTwlz_KnCiJRiVh7dVyo7CN3THPi0sU/edit?usp=drivesdk",
          "cachedResultName": "contacts demo"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "Yvqvis1tnFBurcXp",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "853db2f9-1922-439d-8396-444cbed8b988",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -112,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "6ljetIXS9Oig1w9v",
          "name": "OpenAi cred"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b2b933b3-04e5-487b-a98c-0e227853726a",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        224
      ],
      "parameters": {
        "width": 176,
        "height": 128,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4ce70328-6156-4d4b-ba5d-67ba3d93d279",
      "name": "Notizzettel1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        -224
      ],
      "parameters": {
        "color": 5,
        "height": 208,
        "content": "## This template creates LinkedIn posts with AI + human feedback directly in Telegram."
      },
      "typeVersion": 1
    },
    {
      "id": "db2fa945-a5dc-4119-9133-f9c23f5d671d",
      "name": "Notizzettel2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        192
      ],
      "parameters": {
        "height": 112,
        "content": "## Trigger \nStart by sending a message to your Telegram bot (e.g. “Write a LinkedIn post about AI”)."
      },
      "typeVersion": 1
    },
    {
      "id": "6cbc0ceb-b0b1-4b31-8df2-4ef2b7cb0da3",
      "name": "Notizzettel3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -176
      ],
      "parameters": {
        "content": "## AI Agent \nSearches the web for fresh insights to enrich the post and Drafts a professional LinkedIn post using OpenAI or any LLM model you want"
      },
      "typeVersion": 1
    },
    {
      "id": "1719237b-81bf-4749-a1cb-2f3920e65a89",
      "name": "Notizzettel4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -128
      ],
      "parameters": {
        "width": 432,
        "height": 112,
        "content": "## Approved?\nThe bot asks “Good to go?” — you can approve or give feedback. Once you approve, the post is appended to a Google Sheet — ready to publish."
      },
      "typeVersion": 1
    },
    {
      "id": "4dd0977f-1323-4862-8539-453c79fcda58",
      "name": "Notizzettel5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        80
      ],
      "parameters": {
        "height": 112,
        "content": "## Revision Agent \nIf not approved, another AI refines the post based on your feedback."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c44df566-4f51-4efb-a8b3-617708212359",
  "connections": {
    "cbefc8a8-7cdd-4b9b-91e3-cc658cd29a1e": {
      "main": [
        [
          {
            "node": "b08e2dae-dc5c-4551-a1b8-389420451d30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b08e2dae-dc5c-4551-a1b8-389420451d30": {
      "main": [
        [
          {
            "node": "824ac422-255c-4e19-871b-d14c74a5da48",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9147f506-9c74-4cea-b544-f50e7c4f9e23": {
      "ai_tool": [
        [
          {
            "node": "cbefc8a8-7cdd-4b9b-91e3-cc658cd29a1e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b80c6614-23a2-45ad-9e70-00790f03faff": {
      "main": [
        [
          {
            "node": "b08e2dae-dc5c-4551-a1b8-389420451d30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "207c61cc-ab91-494f-b32c-d8183bd2cc9f": {
      "main": [
        [
          {
            "node": "b80c6614-23a2-45ad-9e70-00790f03faff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "95749da9-5818-4bb0-977f-10aeb189d83c": {
      "main": [
        [
          {
            "node": "d09834f0-b194-4666-8890-d99f5f334789",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "207c61cc-ab91-494f-b32c-d8183bd2cc9f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f5f19acd-b1cc-4a0d-ad57-c8c15d0153af": {
      "main": [
        [
          {
            "node": "cbefc8a8-7cdd-4b9b-91e3-cc658cd29a1e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "853db2f9-1922-439d-8396-444cbed8b988": {
      "ai_languageModel": [
        [
          {
            "node": "207c61cc-ab91-494f-b32c-d8183bd2cc9f",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "95749da9-5818-4bb0-977f-10aeb189d83c",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "cbefc8a8-7cdd-4b9b-91e3-cc658cd29a1e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "824ac422-255c-4e19-871b-d14c74a5da48": {
      "main": [
        [
          {
            "node": "95749da9-5818-4bb0-977f-10aeb189d83c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes16
Kategorie-
Node-Typen10
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Autor
Yasser Sami

Yasser Sami

@yassersami

AI Automation Architect building smart workflows with n8n. I help businesses save time by automating processes, connecting apps, and integrating AI. My focus is on creating efficient, reliable systems that streamline operations and reduce manual work.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34