Exporter les articles du centre d'aide Tawk.to en fichiers Markdown vers Google Drive

Avancé

Ceci est unDocument Extractionworkflow d'automatisation du domainecontenant 19 nœuds.Utilise principalement des nœuds comme If, Set, Code, Html, Markdown. Exporter les articles de centre d'aide Tawk.to en fichiers Markdown vers Google Drive

Prérequis
  • Informations d'identification Google Drive API
  • 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
{
  "id": "ke6yxwTcckewqPHu",
  "meta": {
    "instanceId": "2d89ce8991c0ec6742eb9df86770614f9d74eda20c7d005971149644fbc94c38",
    "templateCredsSetupCompleted": true
  },
  "name": "Export Tawk.to Help Center Articles to Google Drive as Markdown Files",
  "tags": [],
  "nodes": [
    {
      "id": "9770c9f4-d4f1-43fe-8387-f38139f31324",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -384,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "33a657d2-0a87-4d82-8fb0-1b6326442cd8",
      "name": "set-website",
      "type": "n8n-nodes-base.set",
      "position": [
        -96,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5e0dded0-fcec-43a6-a04a-a55b989916a1",
              "name": "website",
              "type": "string",
              "value": "https://meurastreio.tawk.help"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec165cd0-5314-4219-9578-2ede97ce0715",
      "name": "flat-categories",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.categories.map(category => ({category}))"
      },
      "typeVersion": 2
    },
    {
      "id": "182e4ae5-96ac-4131-9cc8-eb7088e9827b",
      "name": "website-category",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        784,
        0
      ],
      "parameters": {
        "url": "={{ $('set-website').item.json.website }}{{ $json.category }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "00d061cd-a7e2-4d4c-a3dd-c1933db66d06",
      "name": "find-categories",
      "type": "n8n-nodes-base.html",
      "position": [
        368,
        0
      ],
      "parameters": {
        "options": {
          "trimValues": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "categories",
              "attribute": "href",
              "cssSelector": ".category-block > a",
              "returnArray": true,
              "returnValue": "attribute"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "60dff3dc-3bd6-4b3a-ba75-1517c2d3c32f",
      "name": "find-category-articles",
      "type": "n8n-nodes-base.html",
      "position": [
        1040,
        0
      ],
      "parameters": {
        "options": {
          "trimValues": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "articles",
              "attribute": "href",
              "cssSelector": ".article-block > a",
              "returnArray": true,
              "returnValue": "attribute"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a4584b98-16fd-4e9a-a1f8-cbde40534c09",
      "name": "flat-articles",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        0
      ],
      "parameters": {
        "jsCode": "const articles = []\n\nfor (const item of $input.all()) {\n  for(const article of item.json.articles){\n    articles.push({\n      json: { \n        name: article.split('/').filter(Boolean).join('-'),\n        articleUri: $('set-website').first().json.website + article \n      }, \n      pairedItem: { item: item.binary }\n    })\n  }\n}\n\nreturn articles\n\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e50f7dd2-f49d-41a1-9417-23c3249de3c4",
      "name": "website-article",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2432,
        48
      ],
      "parameters": {
        "url": "={{ $('Loop Over Items').item.json.articleUri }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "13b9fce6-14b3-4cec-a422-bd39ae48b8c9",
      "name": "extract-article-content",
      "type": "n8n-nodes-base.html",
      "position": [
        2656,
        48
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "article",
              "cssSelector": "#article-wrapper",
              "returnValue": "html"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9b783e77-8acb-4464-8b9f-80fa12a2b030",
      "name": "Boucle sur les éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1616,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "dde825bd-056d-40d2-911b-95a08f47c495",
      "name": "Créer un fichier à partir du texte",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3136,
        48
      ],
      "parameters": {
        "name": "={{ $('Loop Over Items').item.json.name }}.md",
        "content": "={{ $json.data }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1VbQVYn33euu9WFDGTFUr965hmH208uJE",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1VbQVYn33euu9WFDGTFUr965hmH208uJE",
          "cachedResultName": "Meu Rastreio - Tutoriais"
        },
        "operation": "createFromText",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "8juKICQKar1NWUib",
          "name": "Google Service Account account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7218b9c2-1ed3-4fba-ab3c-32b2b7f82029",
      "name": "Rechercher des fichiers et dossiers",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1872,
        16
      ],
      "parameters": {
        "limit": 1,
        "filter": {
          "whatToSearch": "files"
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "={{ $json.name }}.md",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "8juKICQKar1NWUib",
          "name": "Google Service Account account"
        }
      },
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "8d1d59fe-cf7a-4ac3-8197-38eafdfcea22",
      "name": "is-duplicated",
      "type": "n8n-nodes-base.if",
      "position": [
        2112,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "29838975-b461-487b-9816-bbde1c8a7d20",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.name }}",
              "rightValue": ""
            },
            {
              "id": "d9123821-9426-49e7-b042-4adbc609e44f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.name }}",
              "rightValue": "={{ $('flat-articles').item.json.name }}.md"
            },
            {
              "id": "e7406be1-22a7-4ce1-a58d-ee1adcc86817",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": 1,
              "rightValue": 1
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a272f41d-2857-4a65-8377-5763020a81a2",
      "name": "Config",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -160
      ],
      "parameters": {
        "width": 288,
        "height": 480,
        "content": "# Config\nPut your website to extract here"
      },
      "typeVersion": 1
    },
    {
      "id": "b184ceb0-8987-4614-b5d5-b2e22df0e19c",
      "name": "Recherche",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -160
      ],
      "parameters": {
        "color": 5,
        "width": 1328,
        "height": 480,
        "content": "# Search Process\n1) Here we'll find all articles on your website\n2) Extract all urls"
      },
      "typeVersion": 1
    },
    {
      "id": "cb1ef077-b03e-4933-812d-b399b3d1c473",
      "name": "Extraction",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -160
      ],
      "parameters": {
        "color": 4,
        "width": 1984,
        "height": 480,
        "content": "# Extraction\n1) For this you have to configure your Google Drive Access\n2) We'll extract all HTMl content\n3) Conversion for Markdown\n4) Upload to Google Drive"
      },
      "typeVersion": 1
    },
    {
      "id": "b8830bcc-6cd8-4628-a1ee-3b876da291fb",
      "name": "Informations du workflow",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -208
      ],
      "parameters": {
        "color": 4,
        "width": 528,
        "height": 560,
        "content": "# ⚙️ How the Workflow Works\n\nThe Tawk Help Export workflow in n8n automates the export of all articles from the Tawk.to Help Center to Google Drive, converting each page into a Markdown (.md) file.\n\nStart: The process begins manually by clicking “Execute Workflow.”\n\nCollection: It accesses the Help Center, identifies all categories, and retrieves every article inside them.\n\nExtraction: Each article’s HTML content is fetched and converted into Markdown, preserving images.\n\nVerification: The system checks Google Drive to avoid creating duplicate files.\n\nExport: New articles are automatically saved to the “Meu Rastreio - Tutoriais” folder.\n\nThe result is a complete and organized backup of all Tawk.to Help Center articles — fully automated."
      },
      "typeVersion": 1
    },
    {
      "id": "ae2caf7b-64bc-41f1-8af7-045b6eac6759",
      "name": "get-website-home",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        0
      ],
      "parameters": {
        "url": "={{ $json.website }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "35a3545d-d8b9-41fe-8aa1-cca237e920a6",
      "name": "convert-to-markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        2896,
        48
      ],
      "parameters": {
        "html": "={{ $json.article }}",
        "options": {
          "keepDataImages": true
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "36c112e7-cea7-425f-a84f-1f21a3c068e2",
  "connections": {
    "33a657d2-0a87-4d82-8fb0-1b6326442cd8": {
      "main": [
        [
          {
            "node": "ae2caf7b-64bc-41f1-8af7-045b6eac6759",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a4584b98-16fd-4e9a-a1f8-cbde40534c09": {
      "main": [
        [
          {
            "node": "9b783e77-8acb-4464-8b9f-80fa12a2b030",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8d1d59fe-cf7a-4ac3-8197-38eafdfcea22": {
      "main": [
        [
          {
            "node": "9b783e77-8acb-4464-8b9f-80fa12a2b030",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e50f7dd2-f49d-41a1-9417-23c3249de3c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9b783e77-8acb-4464-8b9f-80fa12a2b030": {
      "main": [
        [],
        [
          {
            "node": "7218b9c2-1ed3-4fba-ab3c-32b2b7f82029",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "00d061cd-a7e2-4d4c-a3dd-c1933db66d06": {
      "main": [
        [
          {
            "node": "ec165cd0-5314-4219-9578-2ede97ce0715",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec165cd0-5314-4219-9578-2ede97ce0715": {
      "main": [
        [
          {
            "node": "182e4ae5-96ac-4131-9cc8-eb7088e9827b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e50f7dd2-f49d-41a1-9417-23c3249de3c4": {
      "main": [
        [
          {
            "node": "13b9fce6-14b3-4cec-a422-bd39ae48b8c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ae2caf7b-64bc-41f1-8af7-045b6eac6759": {
      "main": [
        [
          {
            "node": "00d061cd-a7e2-4d4c-a3dd-c1933db66d06",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "182e4ae5-96ac-4131-9cc8-eb7088e9827b": {
      "main": [
        [
          {
            "node": "60dff3dc-3bd6-4b3a-ba75-1517c2d3c32f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "35a3545d-d8b9-41fe-8aa1-cca237e920a6": {
      "main": [
        [
          {
            "node": "dde825bd-056d-40d2-911b-95a08f47c495",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dde825bd-056d-40d2-911b-95a08f47c495": {
      "main": [
        [
          {
            "node": "9b783e77-8acb-4464-8b9f-80fa12a2b030",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "60dff3dc-3bd6-4b3a-ba75-1517c2d3c32f": {
      "main": [
        [
          {
            "node": "a4584b98-16fd-4e9a-a1f8-cbde40534c09",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "13b9fce6-14b3-4cec-a422-bd39ae48b8c9": {
      "main": [
        [
          {
            "node": "35a3545d-d8b9-41fe-8aa1-cca237e920a6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7218b9c2-1ed3-4fba-ab3c-32b2b7f82029": {
      "main": [
        [
          {
            "node": "8d1d59fe-cf7a-4ac3-8197-38eafdfcea22",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9770c9f4-d4f1-43fe-8387-f38139f31324": {
      "main": [
        [
          {
            "node": "33a657d2-0a87-4d82-8fb0-1b6326442cd8",
            "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é ?

Avancé - Extraction de documents

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é
Avancé
Nombre de nœuds19
Catégorie1
Types de nœuds10
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34