Automatisation de la communication IA/LLM via BrowserAI et envoi par e-mail/Telegram

Intermédiaire

Ceci est unAI Summarization, Multimodal AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme Code, Wait, Switch, Telegram, EmailSend. Automatisation de la communication IA/LLM, envoi via BrowserAI et email/Telegram

Prérequis
  • Token Bot Telegram
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "c52c57a23340de7df966f9e47d97a3fb8c52621d4c39f6342366d1114449002a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "a0db787b-16a5-493f-9027-7ece55fd8202",
      "name": "Obtenir la date d'hier",
      "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": "Créer une nouvelle tâche",
      "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": "Obtenir les métadonnées de la tâche",
      "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": "Déclencheur planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -32,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9455a451-6ecd-4892-bf8f-2af2afcaf11e",
      "name": "Envoyer un message texte",
      "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": "Vérifier si terminé",
      "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": "Note adhésive",
      "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": "Note adhésive 1",
      "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": "Note adhésive 2",
      "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": "Note adhésive 3",
      "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": "Attendre le changement d'état de BrowserAI",
      "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": "Nettoyer la sortie",
      "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": "Envoyer un email",
      "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
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Résumé IA, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34