Extraction de métadonnées de vidéos YouTube et enregistrement dans Google Docs avec RapidAPI
Ceci est unMiscellaneous, Multimodal AIworkflow d'automatisation du domainecontenant 9 nœuds.Utilise principalement des nœuds comme Code, GoogleDocs, FormTrigger, HttpRequest. Extraire les métadonnées de vidéos YouTube et les sauvegarder dans Google Docs avec RapidAPI
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
Nœuds utilisés (9)
Catégorie
{
"meta": {
"instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752"
},
"nodes": [
{
"id": "2d304223-ef2d-4e03-814d-cac411106f6b",
"name": "À la soumission du formulaire",
"type": "n8n-nodes-base.formTrigger",
"position": [
-160,
220
],
"webhookId": "2edc6cbb-9fb2-47c9-8387-8ff412c7838a",
"parameters": {
"options": {},
"formTitle": "YouTube Metadata ",
"formFields": {
"values": [
{
"fieldLabel": "url",
"requiredField": true
}
]
},
"formDescription": "YouTube Metadata"
},
"typeVersion": 2.2
},
{
"id": "3ddda565-879e-4685-bde6-e3f1dc62df2e",
"name": "YouTube Metadata",
"type": "n8n-nodes-base.httpRequest",
"position": [
60,
220
],
"parameters": {
"url": "https://youtube-metadata1.p.rapidapi.com/video_metadata.php",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "url",
"value": "={{ $json.url }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "youtube-metadata1.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "9ddd4dd3-3c23-471a-aac9-9222deb584a5",
"name": "Reformat",
"type": "n8n-nodes-base.code",
"position": [
300,
220
],
"parameters": {
"jsCode": "const itemsArray = $input.first().json.items;\n\n// Safely access the first video item\nconst video = itemsArray[0];\nconst {\n id: videoId,\n snippet,\n contentDetails,\n statistics,\n} = video;\n\n// Format tags as a comma-separated string\nconst tags = snippet.tags && snippet.tags.length > 0\n ? snippet.tags.join(', ')\n : 'No tags available';\n\n// Format published date\nconst publishedDate = new Date(snippet.publishedAt).toLocaleDateString();\n\n// Format duration (optional: still in ISO 8601 like PT4M16S)\nconst duration = contentDetails.duration;\n\n// Prepare formatted content\nconst formatted = `\n🎬 **${snippet.title}**\n\n🧾 **Description:**\n${snippet.description}\n\n📺 **Channel:** ${snippet.channelTitle}\n📅 **Published At:** ${publishedDate}\n\n📊 **Stats:**\n- Views: ${statistics.viewCount}\n- Likes: ${statistics.likeCount}\n- Comments: ${statistics.commentCount}\n\n🕒 **Duration:** ${duration}\n\n🏷️ **Tags:** ${tags}\n\n🔗 **Video URL:** https://www.youtube.com/watch?v=${videoId}\n🖼️ **Thumbnail:** ${snippet.thumbnails.high.url}\n`;\n\n// Return formatted string for use in Google Docs\nreturn [\n {\n json: {\n docContent: formatted.trim()\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "0589461b-0419-4798-9f69-851d7d9fffb3",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
-40
],
"parameters": {
"width": 520,
"height": 500,
"content": " \nAutomated YouTube Video Metadata Extraction and Documentation Workflow\n\n**Description:** \nEasily extract detailed YouTube video metadata from any URL and automatically format and save it to Google Docs for streamlined documentation and analysis.\n\n- **On form submission:** \n Triggers the workflow when a user submits a YouTube URL via the form.\n\n- **YouTube Metadata (HTTP Request):** \n Sends the submitted URL to the RapidAPI YouTube Metadata service to fetch detailed video data.\n\n- **Reformat (Code):** \n Extracts and formats key video details like title, description, stats, and thumbnails into a clean, readable string.\n\n- **Append Data in Google Docs:** \n Inserts the formatted video metadata into a specified Google Docs document for storage or further use.\n"
},
"typeVersion": 1
},
{
"id": "6d94b502-69ea-41a5-a4df-22fe20ee812b",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
120
],
"parameters": {
"height": 240,
"content": "**On form submission:** \n Triggers the workflow when a user submits a YouTube URL via the form."
},
"typeVersion": 1
},
{
"id": "656ff1b1-f872-48d8-80c8-dd8df82d1ebc",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
120
],
"parameters": {
"height": 240,
"content": " **YouTube Metadata (HTTP Request):** \n Sends the submitted URL to the RapidAPI YouTube Metadata service to fetch detailed video data.\n\n"
},
"typeVersion": 1
},
{
"id": "73b16e7c-f9ac-46e7-83dc-902ebbd74158",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
120
],
"parameters": {
"height": 240,
"content": "**Reformat (Code):** \n Extracts and formats key video details like title, description, stats, and thumbnails into a clean, readable string.\n"
},
"typeVersion": 1
},
{
"id": "bccb9237-7414-4976-9b60-5504c4d3cc7d",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
520,
120
],
"parameters": {
"height": 240,
"content": "**Append Data In Google Sheet:** \n Append Data in Google sheet for the future usages.\n"
},
"typeVersion": 1
},
{
"id": "ee750cf2-1839-469d-8a84-dff68f280535",
"name": "Ajouter des données dans Google Docs",
"type": "n8n-nodes-base.googleDocs",
"position": [
560,
220
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $json.docContent }}",
"action": "insert"
}
]
},
"operation": "update",
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "Rt0RWApx8PL9t0RF",
"name": "Google Docs account"
}
},
"typeVersion": 2
}
],
"pinData": {},
"connections": {
"9ddd4dd3-3c23-471a-aac9-9222deb584a5": {
"main": [
[
{
"node": "ee750cf2-1839-469d-8a84-dff68f280535",
"type": "main",
"index": 0
}
]
]
},
"3ddda565-879e-4685-bde6-e3f1dc62df2e": {
"main": [
[
{
"node": "9ddd4dd3-3c23-471a-aac9-9222deb584a5",
"type": "main",
"index": 0
}
]
]
},
"2d304223-ef2d-4e03-814d-cac411106f6b": {
"main": [
[
{
"node": "3ddda565-879e-4685-bde6-e3f1dc62df2e",
"type": "main",
"index": 0
}
]
]
}
}
}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.
Workflows recommandés
Evoort Solutions
@evoortsolutionsPartager ce workflow