Extraer metadatos de videos de YouTube y guardarlos en Google Docs usando RapidAPI
Este es unMiscellaneous, Multimodal AIflujo de automatización del dominio deautomatización que contiene 9 nodos.Utiliza principalmente nodos como Code, GoogleDocs, FormTrigger, HttpRequest. Usar RapidAPI para extraer metadatos de videos de YouTube y guardarlos en Google Docs
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (9)
Categoría
{
"meta": {
"instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752"
},
"nodes": [
{
"id": "2d304223-ef2d-4e03-814d-cac411106f6b",
"name": "Al enviar el formulario",
"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": "Reformatear",
"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": "Nota adhesiva",
"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": "Nota adhesiva1",
"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": "Nota adhesiva2",
"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": "Nota adhesiva3",
"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": "Nota adhesiva4",
"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": "Añadir datos en 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
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Varios, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Evoort Solutions
@evoortsolutionsCompartir este flujo de trabajo