Automatisierte KI-Kommunikation mit LLMs via BrowserAI und E-Mail/Telegram

Fortgeschritten

Dies ist ein AI Summarization, Multimodal AI-Bereich Automatisierungsworkflow mit 13 Nodes. Hauptsächlich werden Code, Wait, Switch, Telegram, EmailSend und andere Nodes verwendet. Automatisierung der KI-Kommunikation mit LLMs via BrowserAI und E-Mail/Telegram

Voraussetzungen
  • Telegram Bot Token
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "meta": {
    "instanceId": "c52c57a23340de7df966f9e47d97a3fb8c52621d4c39f6342366d1114449002a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "a0db787b-16a5-493f-9027-7ece55fd8202",
      "name": "Gestrigen Datum abrufen",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        16
      ],
      "parameters": {
        "jsCode": "return $input.all().map(item => {\n    const timestamp = item.json.timestamp;\n\n    // Create a Date object using the timestamp\n    const triggerDate = new Date(timestamp);\n\n    // Subtract one day to find yesterday's date\n    const yesterday = new Date(triggerDate);\n    yesterday.setDate(triggerDate.getDate() - 1);\n\n    // Format the date as 'dd-MONTH-yyyy'\n    const day = String(yesterday.getDate()).padStart(2, '0');\n    const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n                        \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n    const month = monthNames[yesterday.getMonth()];\n    const year = yesterday.getFullYear();\n\n    const formattedYesterday = `${day}-${month}-${year}`;\n\n    // Return the result as an object\n    return {\n        json: {\n            formattedYesterday: formattedYesterday\n        }\n    };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "78689092-da85-4a8f-8e40-1c19a95b9a0e",
      "name": "Neue Aufgabe erstellen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        16
      ],
      "parameters": {
        "url": "https://browser.ai/api/v1/tasks",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"instructions\": [\n    {\n      \"action\": \"Please summarize me all the latest news, articles and updates regarding AI and LLMs up to {{ $json.formattedYesterday }}, including title, description and source\"\n    }\n  ],\n  \"geoLocation\": {\n    \"country\": \"us\"\n  },\n  \"project\": \"Project_1\",\n  \"type\": \"crawler_automation\",\n  \"inspect\": true\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "9863ukmMuy65jQPA",
          "name": "BrowserAI account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "872f6181-8fc5-4ff6-bd48-39459054c392",
      "name": "Aufgaben-Metadaten abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        16
      ],
      "parameters": {
        "url": "=https://browser.ai/api/v1/tasks/{{ $('Create a new task').item.json.executionId }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "9863ukmMuy65jQPA",
          "name": "BrowserAI account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "215cfa34-249f-434e-aebf-f2e1e8901dee",
      "name": "Zeitplan-Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -32,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9455a451-6ecd-4892-bf8f-2af2afcaf11e",
      "name": "Textnachricht senden",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1616,
        0
      ],
      "webhookId": "67fb53ea-3c6c-4a7a-8fbf-8d8d3208fbd0",
      "parameters": {
        "text": "={{ $json.cleanedText }}",
        "chatId": "DESTINATION_CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "EEoBwGOcQmjV0Dau",
          "name": "browserai_service_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fc810f85-dccf-41fb-8b3a-f123c143f473",
      "name": "Auf Fertigstellung prüfen",
      "type": "n8n-nodes-base.switch",
      "position": [
        1168,
        16
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Finalized",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1b4446d7-395e-4cfb-891c-ddbae56d261a",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Get task\\'s metadata').item.json.status }}",
                    "rightValue": "=finalized"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "4cf9780e-4443-43d7-b997-5175c28673cc",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -176
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 320,
        "content": "## Start the workflow at 8AM each day and get yesterday's date"
      },
      "typeVersion": 1
    },
    {
      "id": "635b9388-5f25-4ddb-a70a-593d861b4cda",
      "name": "Haftnotiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        -176
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 320,
        "content": "## Create a BrowserAI task\nThis lets you easily create a new task by using simple instructions. Make sure to include your API key for access.\n\nSee [more](https://docs.browser.ai/api-reference/endpoint/tasks) how"
      },
      "typeVersion": 1
    },
    {
      "id": "1ff8d5cf-59c5-49c6-99f4-6ed2c3fe157c",
      "name": "Haftnotiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -176
      ],
      "parameters": {
        "color": 6,
        "width": 656,
        "height": 320,
        "content": "## Wait for the task to be completed by checking its status\nThis allows you to retrieve data and status information for a specific task using its session ID. Authorization with an API token is required, and the session ID must be provided in the path parameters.\n\nSee [more](https://docs.browser.ai/api-reference/endpoint/taskMetadata) how"
      },
      "typeVersion": 1
    },
    {
      "id": "df2251e5-a31a-488c-9f2e-48bafdbf1683",
      "name": "Haftnotiz3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -176
      ],
      "parameters": {
        "width": 448,
        "height": 496,
        "content": "## Send it to your email/Telegram\nFill in your telegram chat ID, your email credentials to successfully send the newsletter."
      },
      "typeVersion": 1
    },
    {
      "id": "524cded4-1535-4b0d-95fd-4e0e889113c9",
      "name": "Auf BrowserAI-Statusänderung warten",
      "type": "n8n-nodes-base.wait",
      "position": [
        944,
        -64
      ],
      "webhookId": "9f60957e-ebf3-426e-941d-db5d2af1bcf1",
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "ad801781-736e-4b37-9716-b83caa5949ca",
      "name": "Ausgabe bereinigen",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        0
      ],
      "parameters": {
        "jsCode": "const inputText = $input.first().json.result\n\nconst cleanedText = inputText.replace(/\\*\\*Title:\\*\\*\\s*/g, '')\n    .replace(/\\*\\*Description:\\*\\*\\s*/g, '');\n\nreturn {\n    json: {\n        cleanedText: cleanedText\n    }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ef0259fb-26c9-4442-b8f5-9c540be030b7",
      "name": "E-Mail senden",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1616,
        176
      ],
      "webhookId": "f596fa00-538d-4046-9c89-263dbf211bf7",
      "parameters": {
        "text": "={{ $json.cleanedText }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "Your daily AI & LLM newsletter is here!",
        "toEmail": "to@example.com",
        "fromEmail": "from@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "id": "AIzq5LKIjc9gWeJh",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "pinData": {},
  "connections": {
    "ad801781-736e-4b37-9716-b83caa5949ca": {
      "main": [
        [
          {
            "node": "9455a451-6ecd-4892-bf8f-2af2afcaf11e",
            "type": "main",
            "index": 0
          },
          {
            "node": "ef0259fb-26c9-4442-b8f5-9c540be030b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "215cfa34-249f-434e-aebf-f2e1e8901dee": {
      "main": [
        [
          {
            "node": "a0db787b-16a5-493f-9027-7ece55fd8202",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc810f85-dccf-41fb-8b3a-f123c143f473": {
      "main": [
        [
          {
            "node": "ad801781-736e-4b37-9716-b83caa5949ca",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "872f6181-8fc5-4ff6-bd48-39459054c392",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "78689092-da85-4a8f-8e40-1c19a95b9a0e": {
      "main": [
        [
          {
            "node": "872f6181-8fc5-4ff6-bd48-39459054c392",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "872f6181-8fc5-4ff6-bd48-39459054c392": {
      "main": [
        [
          {
            "node": "524cded4-1535-4b0d-95fd-4e0e889113c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0db787b-16a5-493f-9027-7ece55fd8202": {
      "main": [
        [
          {
            "node": "78689092-da85-4a8f-8e40-1c19a95b9a0e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "524cded4-1535-4b0d-95fd-4e0e889113c9": {
      "main": [
        [
          {
            "node": "fc810f85-dccf-41fb-8b3a-f123c143f473",
            "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?

Fortgeschritten - KI-Zusammenfassung, Multimodales KI

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
Fortgeschritten
Anzahl der Nodes13
Kategorie2
Node-Typen8
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
Alex Gurinovich

Alex Gurinovich

@alexg

Project Manager with a Computer Science background and extensive experience in QA and NOC. Passionate about driving innovation, streamlining processes, and leading projects and ideas to success.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34