Bot de vocabulaire anglais pour Telegram basé sur Gemini et une API de mots aléatoires

Intermédiaire

Ceci est unMiscellaneous, Multimodal AIworkflow d'automatisation du domainecontenant 6 nœuds.Utilise principalement des nœuds comme Set, Telegram, Aggregate, HttpRequest, ScheduleTrigger. Création d'un bot de vocabulaire anglais pour Telegram avec Gemini et une API de mots aléatoires

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": "783d2046f405cc6ecb20ef185376ed1023323a3da628b9d8156b1fb75c75e037",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4e12712b-5541-41e4-9cf5-181aed2682ed",
      "name": "Déclencheur Planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 3
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a025bc9-489d-4448-944d-652bfc2baf77",
      "name": "Requête HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        0
      ],
      "parameters": {
        "url": "https://random-word-api.vercel.app/api?words=3",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "fb88b57f-7c18-431e-8d4b-429253803433",
      "name": "Agrégation",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        624,
        0
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "word"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e7b00fe8-0a71-4e00-af8f-703887170dde",
      "name": "Modifier les Champs",
      "type": "n8n-nodes-base.set",
      "position": [
        416,
        0
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"word\": \"{{ $json }}\"\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "eae51ae4-cfd4-4d5a-b522-1c55bcce4863",
      "name": "Interroger un Modèle",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        832,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-1.5-flash",
          "cachedResultName": "models/gemini-1.5-flash"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a vocabulary-summarizing AI. Please write a vocabulary digest message using the provided English words, including: the English word, the Vietnamese meaning, and one example sentence that contains that English word.\nToday's vocabulary list:\n{{ $json.word }}"
            }
          ]
        }
      },
      "credentials": {
        "googlePalmApi": {
          "id": "Atcc45Iqep6u15qs",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "97be971a-7304-4f6d-9b68-f2c1c8b90363",
      "name": "Envoyer un Message Texte",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1184,
        0
      ],
      "webhookId": "947f3fe3-d410-41f5-8340-247dbfeee897",
      "parameters": {
        "text": "={{ $json.content.parts[0].text }}",
        "chatId": "xxxxx",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "Pq1cc0nSnbtjpiPv",
          "name": "learn_english_bot"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "fb88b57f-7c18-431e-8d4b-429253803433": {
      "main": [
        [
          {
            "node": "eae51ae4-cfd4-4d5a-b522-1c55bcce4863",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e7b00fe8-0a71-4e00-af8f-703887170dde": {
      "main": [
        [
          {
            "node": "fb88b57f-7c18-431e-8d4b-429253803433",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8a025bc9-489d-4448-944d-652bfc2baf77": {
      "main": [
        [
          {
            "node": "e7b00fe8-0a71-4e00-af8f-703887170dde",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "eae51ae4-cfd4-4d5a-b522-1c55bcce4863": {
      "main": [
        [
          {
            "node": "97be971a-7304-4f6d-9b68-f2c1c8b90363",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4e12712b-5541-41e4-9cf5-181aed2682ed": {
      "main": [
        [
          {
            "node": "8a025bc9-489d-4448-944d-652bfc2baf77",
            "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 - Divers, 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œuds6
Catégorie2
Types de nœuds6
Description de la difficulté

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

Auteur
Cong Nguyen

Cong Nguyen

@cong-nguyen

I’m a developer specialized in building web and mobile applications with AI integration and intelligent automation. With a solid background in data science, I help businesses build smarter digital solutions using cutting-edge technologies.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34