Buscar un perfil de Twitter por nombre, extraer publicaciones, analizar el contenido con AI y guardar en Google Sheets
Este es unAI, Marketingflujo de automatización del dominio deautomatización que contiene 22 nodos.Utiliza principalmente nodos como If, Set, Code, Form, Html, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Buscar, rastrear y analizar publicaciones de Twitter por nombre con Bright Data y Gemini
- •Credenciales de API de Google Sheets
- •Clave de API de Google Gemini
Nodos utilizados (22)
Categoría
{
"id": "AbtPK2RrW116HBH3",
"meta": {
"instanceId": "71eb5622cf8abac565805540c0900dbae437dddbda45bf1b87bf3bfeea26393c",
"templateCredsSetupCompleted": true
},
"name": "Find Twitter Profile by Name, Scrape Posts & Analyze Content with AI, save in Google Sheets.",
"tags": [],
"nodes": [
{
"id": "3f37efb9-0ba6-474a-b5df-d453bb79d8e6",
"name": "Extraer cuerpo y título del sitio web",
"type": "n8n-nodes-base.html",
"position": [
660,
0
],
"parameters": {
"options": {
"trimValues": true
},
"operation": "extractHtmlContent",
"dataPropertyName": "body",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": "title"
},
{
"key": "body",
"cssSelector": "body"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "89d9a5af-f79a-44ad-87c3-99a410fe52eb",
"name": "Cuando el usuario completa el formulario",
"type": "n8n-nodes-base.formTrigger",
"position": [
0,
0
],
"webhookId": "41d0bffa-f5ca-4df7-b757-ca5a1e472b8a",
"parameters": {
"options": {
"path": "search-user",
"ignoreBots": true,
"buttonLabel": "Get References"
},
"formTitle": "Twitter (X) posts analyzer",
"formFields": {
"values": [
{
"fieldLabel": "Person Fullname",
"placeholder": "Complete the fullname",
"requiredField": true
},
{
"fieldLabel": "Analyze Posts From Date",
"placeholder": "2025-05-01"
},
{
"fieldLabel": "Analyze Posts To Date",
"placeholder": "2025-05-20"
}
]
},
"responseMode": "lastNode",
"formDescription": "Complete the data of the person you want to analyze.\n\nA personalized follow-up email with insights and suggested outreach steps will be sent to you:"
},
"typeVersion": 2.2
},
{
"id": "9cc99302-3a97-471b-8260-b2d0dda37be5",
"name": "Editar URL Google Búsqueda",
"type": "n8n-nodes-base.set",
"position": [
220,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "6b95685b-3286-4643-bfa1-6335d3f8cb39",
"name": "google_search",
"type": "string",
"value": "=https://www.google.com/search?q=site%3Ax.com+{{ encodeURIComponent($json[\"Person Fullname\"].trim()) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ae25a27d-4631-4131-ac42-ab39ba423806",
"name": "Google Gemini Modelo de chat",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
900,
180
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"typeVersion": 1
},
{
"id": "dca04cd0-4519-41ae-9b0f-3c202a72cac3",
"name": "Analizador de salida estructurada",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1040,
180
],
"parameters": {
"jsonSchemaExample": "[{\n \"username\": \"string\",\n \"name\": \"string\",\n \"url\": \"string\",\n \"description\": \"string\"\n}]\n"
},
"typeVersion": 1.2
},
{
"id": "d26a1cf1-c131-4a78-b968-4d2280c7dd7d",
"name": "Formulario no encontrado",
"type": "n8n-nodes-base.form",
"position": [
1260,
160
],
"webhookId": "a509f577-231f-435f-b3c2-0fed718f0cc8",
"parameters": {
"operation": "completion",
"respondWith": "showText",
"responseText": "=We didn't found X Profile for \"{{ $('When User Completes Form').item.json[\"Person Fullname\"] }} \""
},
"typeVersion": 1
},
{
"id": "d05c6134-02ba-4e75-b062-0994c1802ba1",
"name": "X ¿Perfil encontrado?",
"type": "n8n-nodes-base.if",
"position": [
1260,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "645d85d3-c5cc-4e51-a989-075c0a851449",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.output[0]['url'] }}",
"rightValue": 1
},
{
"id": "b44e6a86-9a9b-4d3e-b9c8-cf75bba8ed03",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d2f963d7-4bb9-41d6-b698-028d76e08bd5",
"name": "Verificar errores",
"type": "n8n-nodes-base.if",
"position": [
1320,
440
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "645d85d3-c5cc-4e51-a989-075c0a851449",
"operator": {
"type": "string",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $json.error }}",
"rightValue": 1
},
{
"id": "b44e6a86-9a9b-4d3e-b9c8-cf75bba8ed03",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "34dfe012-f2b0-4921-aff7-2c97eafc206e",
"name": "Google Gemini Modelo de chat1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1780,
660
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"typeVersion": 1
},
{
"id": "223f4ef1-2ed0-48e3-a7b6-e2ecb762756f",
"name": "Error de formulario",
"type": "n8n-nodes-base.form",
"position": [
1320,
680
],
"webhookId": "a509f577-231f-435f-b3c2-0fed718f0cc8",
"parameters": {
"operation": "completion",
"respondWith": "showText",
"responseText": "=Bright Data error for \"{{ $('When User Completes Form').item.json[\"Person Fullname\"] }} \""
},
"typeVersion": 1
},
{
"id": "28c124cd-dd4b-4a8d-888e-d39709425920",
"name": "Google Sheets - Agregar publicaciones y resumen",
"type": "n8n-nodes-base.googleSheets",
"position": [
2140,
440
],
"parameters": {
"columns": {
"value": {
"name": "={{ $('When User Completes Form').item.json['Person Fullname'] }}",
"posts": "={{ $('Code').item.json.posts }}",
"x_url": "={{ $('Parse X Url').item.json.output[0]['url'] }}",
"end_date": "={{ $('When User Completes Form').item.json['Analyze Posts To Date'] }}",
"ai_summary": "={{ $json.text }}",
"start_date": "={{ $('When User Completes Form').item.json['Analyze Posts From Date'] }}"
},
"schema": [
{
"id": "name",
"type": "string",
"display": true,
"required": false,
"displayName": "name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "start_date",
"type": "string",
"display": true,
"required": false,
"displayName": "start_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "end_date",
"type": "string",
"display": true,
"required": false,
"displayName": "end_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "x_url",
"type": "string",
"display": true,
"required": false,
"displayName": "x_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "posts",
"type": "string",
"display": true,
"required": false,
"displayName": "posts",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ai_summary",
"type": "string",
"display": true,
"required": false,
"displayName": "ai_summary",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V1J7E5EKofN9Uhjg_kItpK0Wjh3Ga_To2k_QYj7hcPA/edit#gid=0",
"cachedResultName": "results"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1V1J7E5EKofN9Uhjg_kItpK0Wjh3Ga_To2k_QYj7hcPA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V1J7E5EKofN9Uhjg_kItpK0Wjh3Ga_To2k_QYj7hcPA/edit?usp=drivesdk",
"cachedResultName": "X parsed posts"
}
},
"typeVersion": 4.3,
"alwaysOutputData": true
},
{
"id": "abc5d30c-2d5c-4186-ac62-32129f33618e",
"name": "Analizar publicaciones",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1760,
440
],
"parameters": {
"text": "={{$json}}",
"messages": {
"messageValues": [
{
"message": "=Analyze these twitter posts - Detect interests, tone, sentiments, common topics, popularity and return summary"
}
]
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "daee9dbd-c65a-40cf-a84e-b8b9eec4e108",
"name": "Analizar URL X",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
880,
0
],
"parameters": {
"text": "={{$('Extract Body and Title from Website').item.json[\"body\"]}}",
"messages": {
"messageValues": [
{
"message": "=Extract x.com (Twitter) profile from google results. Return a result property with unique parsed result in JSON including a property \"match\" if user matches the data entry values \"{{ $('When User Completes Form').item.json[\"Person Fullname\"].trim() }}\""
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "b0ae5f34-dcd3-424e-b85b-6a339f701857",
"name": "Capturar contenido",
"type": "n8n-nodes-brightdata.brightData",
"position": [
880,
440
],
"parameters": {
"resource": "marketplaceDataset",
"operation": "getSnapshotContent",
"snapshot_id": "={{ $('Snapshot Request').item.json.snapshot_id }}"
},
"typeVersion": 1
},
{
"id": "d697b7b2-3c50-414e-a4d4-8f5f6f582cf9",
"name": "Código",
"type": "n8n-nodes-base.code",
"position": [
1540,
440
],
"parameters": {
"jsCode": "const input = items[0].json;\nconst posts = input.items || [];\n\nconst extracted = posts.map(post => {\n const quoted = post.quoted_post || {};\n const taggedUsers = post.tagged_users || [];\n\n return {\n date_posted: post.date_posted || null,\n description: post.description || null,\n hashtags: post.hashtags || [],\n likes: post.likes || null,\n\n quoted_date_posted: quoted.date_posted || null,\n quoted_description: quoted.description || null,\n\n quotes: post.quotes || 0,\n replies: post.replies || 0,\n reposts: post.reposts || 0,\n\n profile_names: taggedUsers.map(user => user.profile_name || null),\n\n views: post.views || 0,\n };\n});\n\nreturn [\n {\n json: {\n posts: extracted\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "ba5770f0-db44-4032-bd45-1939b5f2740b",
"name": "Esperar 30s - Sondeo Bright Data",
"type": "n8n-nodes-base.wait",
"position": [
220,
440
],
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
"parameters": {
"amount": 30
},
"executeOnce": false,
"typeVersion": 1.1
},
{
"id": "fe2adace-a369-44ef-b048-eb90f309ee92",
"name": "Si - Verificar estado de captura - si los datos están listos o no",
"type": "n8n-nodes-base.if",
"position": [
660,
440
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7932282b-71bb-4bbb-ab73-4978e554de7e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "ready"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "72326f8d-d381-4620-a3a7-1bed7389a146",
"name": "Solicitud de captura",
"type": "n8n-nodes-brightdata.brightData",
"position": [
0,
440
],
"parameters": {
"resource": "marketplaceDataset",
"operation": "filterDataset",
"dataset_id": {
"__rl": true,
"mode": "list",
"value": "gd_lwxkxvnf1cynvib9co",
"cachedResultName": "X (formerly Twitter) - Posts"
},
"filter_type": "filters_group",
"filters_group": "={\"operator\":\"and\",\"filters\":[{\"name\":\"url\",\"operator\":\"includes\",\"value\":\"{{ $json[\"output\"][0]['url'] }}\"},\n{\"name\":\"date_posted\",\"operator\":\">=\",\"value\":\"{{ $('When User Completes Form').item.json[\"Analyze Posts From Date\"] }}\"},\n{\"name\":\"date_posted\",\"operator\":\"<=\",\"value\":\"{{ $('When User Completes Form').item.json[\"Analyze Posts To Date\"] }}\"}]}"
},
"typeVersion": 1
},
{
"id": "665656d5-78e4-480c-a472-ade64f43609c",
"name": "Progreso de captura",
"type": "n8n-nodes-brightdata.brightData",
"position": [
440,
440
],
"parameters": {
"resource": "marketplaceDataset",
"operation": "getSnapshotMetadata",
"snapshot_id": "={{ $json.snapshot_id }}"
},
"typeVersion": 1
},
{
"id": "f346f9b0-f5f0-452e-932f-b27d956e3383",
"name": "BrightData",
"type": "n8n-nodes-brightdata.brightData",
"position": [
440,
0
],
"parameters": {
"url": "={{ $json.google_search }}",
"zone": {
"__rl": true,
"mode": "list",
"value": "web_unlocker1"
},
"format": "json",
"country": {
"__rl": true,
"mode": "list",
"value": "us"
}
},
"typeVersion": 1
},
{
"id": "3fe4b2e8-4cc6-4e23-a2da-c8c668537036",
"name": "Verificar errores1",
"type": "n8n-nodes-base.if",
"position": [
1100,
440
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "645d85d3-c5cc-4e51-a989-075c0a851449",
"operator": {
"type": "array",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $json.items}}",
"rightValue": "Snapshot is building."
},
{
"id": "b44e6a86-9a9b-4d3e-b9c8-cf75bba8ed03",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4b5aa6d7-9328-46fa-b333-6b068c5ffa79",
"name": "Esperar 30s - Verificar si la captura está lista",
"type": "n8n-nodes-base.wait",
"position": [
880,
680
],
"webhookId": "8005a2b3-2195-479e-badb-d90e4240e699",
"parameters": {
"amount": 30
},
"executeOnce": false,
"typeVersion": 1.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "a93d240e-59b4-49a9-84ce-60fdffc2b48f",
"connections": {
"d697b7b2-3c50-414e-a4d4-8f5f6f582cf9": {
"main": [
[
{
"node": "abc5d30c-2d5c-4186-ac62-32129f33618e",
"type": "main",
"index": 0
}
]
]
},
"f346f9b0-f5f0-452e-932f-b27d956e3383": {
"main": [
[
{
"node": "3f37efb9-0ba6-474a-b5df-d453bb79d8e6",
"type": "main",
"index": 0
}
]
]
},
"daee9dbd-c65a-40cf-a84e-b8b9eec4e108": {
"main": [
[
{
"node": "d05c6134-02ba-4e75-b062-0994c1802ba1",
"type": "main",
"index": 0
}
]
]
},
"abc5d30c-2d5c-4186-ac62-32129f33618e": {
"main": [
[
{
"node": "28c124cd-dd4b-4a8d-888e-d39709425920",
"type": "main",
"index": 0
}
]
]
},
"d26a1cf1-c131-4a78-b968-4d2280c7dd7d": {
"main": [
[]
]
},
"d2f963d7-4bb9-41d6-b698-028d76e08bd5": {
"main": [
[
{
"node": "d697b7b2-3c50-414e-a4d4-8f5f6f582cf9",
"type": "main",
"index": 0
}
],
[
{
"node": "223f4ef1-2ed0-48e3-a7b6-e2ecb762756f",
"type": "main",
"index": 0
}
]
]
},
"b0ae5f34-dcd3-424e-b85b-6a339f701857": {
"main": [
[
{
"node": "3fe4b2e8-4cc6-4e23-a2da-c8c668537036",
"type": "main",
"index": 0
}
]
]
},
"72326f8d-d381-4620-a3a7-1bed7389a146": {
"main": [
[
{
"node": "ba5770f0-db44-4032-bd45-1939b5f2740b",
"type": "main",
"index": 0
}
]
]
},
"3fe4b2e8-4cc6-4e23-a2da-c8c668537036": {
"main": [
[
{
"node": "4b5aa6d7-9328-46fa-b333-6b068c5ffa79",
"type": "main",
"index": 0
}
],
[
{
"node": "d2f963d7-4bb9-41d6-b698-028d76e08bd5",
"type": "main",
"index": 0
}
]
]
},
"665656d5-78e4-480c-a472-ade64f43609c": {
"main": [
[
{
"node": "fe2adace-a369-44ef-b048-eb90f309ee92",
"type": "main",
"index": 0
}
]
]
},
"d05c6134-02ba-4e75-b062-0994c1802ba1": {
"main": [
[
{
"node": "72326f8d-d381-4620-a3a7-1bed7389a146",
"type": "main",
"index": 0
}
],
[
{
"node": "d26a1cf1-c131-4a78-b968-4d2280c7dd7d",
"type": "main",
"index": 0
}
]
]
},
"9cc99302-3a97-471b-8260-b2d0dda37be5": {
"main": [
[
{
"node": "f346f9b0-f5f0-452e-932f-b27d956e3383",
"type": "main",
"index": 0
}
]
]
},
"ae25a27d-4631-4131-ac42-ab39ba423806": {
"ai_languageModel": [
[
{
"node": "daee9dbd-c65a-40cf-a84e-b8b9eec4e108",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"dca04cd0-4519-41ae-9b0f-3c202a72cac3": {
"ai_outputParser": [
[
{
"node": "daee9dbd-c65a-40cf-a84e-b8b9eec4e108",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"89d9a5af-f79a-44ad-87c3-99a410fe52eb": {
"main": [
[
{
"node": "9cc99302-3a97-471b-8260-b2d0dda37be5",
"type": "main",
"index": 0
}
]
]
},
"34dfe012-f2b0-4921-aff7-2c97eafc206e": {
"ai_languageModel": [
[
{
"node": "abc5d30c-2d5c-4186-ac62-32129f33618e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ba5770f0-db44-4032-bd45-1939b5f2740b": {
"main": [
[
{
"node": "665656d5-78e4-480c-a472-ade64f43609c",
"type": "main",
"index": 0
}
]
]
},
"3f37efb9-0ba6-474a-b5df-d453bb79d8e6": {
"main": [
[
{
"node": "daee9dbd-c65a-40cf-a84e-b8b9eec4e108",
"type": "main",
"index": 0
}
]
]
},
"4b5aa6d7-9328-46fa-b333-6b068c5ffa79": {
"main": [
[
{
"node": "b0ae5f34-dcd3-424e-b85b-6a339f701857",
"type": "main",
"index": 0
}
]
]
},
"fe2adace-a369-44ef-b048-eb90f309ee92": {
"main": [
[
{
"node": "b0ae5f34-dcd3-424e-b85b-6a339f701857",
"type": "main",
"index": 0
}
],
[
{
"node": "ba5770f0-db44-4032-bd45-1939b5f2740b",
"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?
Avanzado - Inteligencia Artificial, Marketing
¿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
Gleb D
@glebdCompartir este flujo de trabajo