Describe the problem/error/question
I have a flow that's being tested. I've probably run it over 100 times, and the nodes worked every time. It was a flow I imported from a template I downloaded, and it always worked.
It turns out that recently, after I updated the version on Railway, the hosting I use, it started displaying a very strange error (I don't believe this is the cause of the problem). This error initially occurred on an OpenAI "message a model" node, and the issue was resolved when I recreated the node, transferred the settings to the new node, and it worked.
After that, I ran the flow from scratch, and the create a file from Google Drive node started displaying the same error. What's even stranger is that after updating Railway, I had already run the flow at least 10 times, and all nodes were working. It only stopped on the OpenAI node. Then, only after I fixed the problem on the OpenAI node did the Google Drive node start showing the SAME error that had been showing on the OpenAI node.
The biggest problem is that even after recreating the Google Drive node and following the same procedure I did on the OpenAI node, the problem persists and returns with the same error. I even tried starting the flow from scratch to see if I could fix it, but it keeps giving the same error.
Oh, another detail: while I was writing this email, I noticed that practically ALL nodes are experiencing problems, except for the data processing nodes, IF, MERGE, SET, and CODE. There are other AI Agent nodes that I thought weren't having problems, but in reality, their Output is pinned, meaning it's not being executed. I'm sure that if I unpin this node, it will also cause problems. I know this because when I went to redo the workflow, these nodes gave problems because they weren't pinned.
I've already reverted to the previous version in Railway, hoping it would work, but it didn't.
I also just noticed that ALL my other workflows, which have always worked and which I've been creating for months, now have the SAME error.
What is the error message (if any)?
Your request is invalid or could not be processed by the service
column 9827483463398fbb7d6b96916fe451d8bdefa0e8.role does not exist
Error code: 42703
Please share your workflow/screenshots/recording
I took this second printout when I was creating the first report, which was closed because it was written in Portuguese.
Now, when I rewrote it in English, the error simply disappeared, and the old workflow returned to normal operation, without me having made any changes. However, the current workflow I'm working on continues with the same error.
The third print was taken now, exactly from the same node that was not working minutes ago and suddenly started working again
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
⚠️ WARNING ⚠️ If you have sensitive data in your workflow (like API keys), please remove it before sharing.
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://api.elevenlabs.io/v1/text-to-speech/y3X5crcIDtFawPx7bcNq/stream",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "xi-api-key",
"value": "sk_SUA_APIKEY"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n "text": "{{ $('ROTEIRO').item.json.roteiro }}",\n "model_id": "eleven_multilingual_v2",\n "voice_settings": {\n "stability": 0.7,\n "similarity_boost": 0.9\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-13952,
592
],
"id": "bfca6ee3-73d9-4141-857b-8dfb89c2d504",
"name": "HTTP ElevenLabs"
},
{
"parameters": {
"jsCode": "let texto = $input.first().json.output || '';\n\n// Remove aspas externas se houver\ntexto = texto.replace(/^"(.)"$/, '$1');\n\n// Substitui "R$" por "reais"\ntexto = texto.replace(/R\$/g, 'reais');\n\n// Remove quebras de linha e múltiplos espaços\ntexto = texto.replace(/[\r\n]+/g, ' '); // quebra de linha → espaço\ntexto = texto.replace(/\s\s+/g, ' '); // múltiplos espaços → um espaço\n\n// Remove espaços no início e fim\ntexto = texto.trim();\n\n// Remove caracteres de controle invisíveis (exceto espaço normal)\ntexto = texto.replace(/[\u0000-\u001F\u007F]+/g, '');\n\n// Escapa aspas internas se for necessário usar com JSON.stringify (opcional)\ntexto = texto.replace(/"/g, '\\"');\n\nreturn [\n {\n json: {\n roteiro: texto\n }\n }\n];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-16784,
624
],
"id": "3a0619a9-862e-4f87-aff1-2da42e9b63c2",
"name": "Remove caracteres especiais"
},
{
"parameters": {
"resource": "folder",
"name": "={{ $json.slug }}",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["SETUP"].json["g_googledrive_dir"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-15584,
720
],
"id": "ee9c2c75-438f-4c6d-af30-eb70285f0223",
"name": "Google Drive",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"command": "rm -rf /tmp/youtubevideos/"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-18096,
608
],
"id": "567be16d-6bd3-4ef0-b790-4cdd25dae1f6",
"name": "Limpa o diretorio /tmp/youtubevideos"
},
{
"parameters": {
"command": "=ls /tmp/youtubevideos/"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-15296,
448
],
"id": "db08cd05-19fd-40a0-9cb3-c77da4b69b11",
"name": "lista"
},
{
"parameters": {
"command": "=mkdir -p /tmp/youtubevideos/{{ $json.slug }}"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-15536,
448
],
"id": "222a89cf-fc9f-431f-b736-1086110f7b58",
"name": "Cria o diretório no /tmp/youtubevideos se não existir"
},
{
"parameters": {
"operation": "write",
"fileName": "=/tmp/youtubevideos/{{ $item("0").$node["DIRETÓRIO"].json["diretorio_slug"] }}/narracao.mp3",
"options": {}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
-13584,
560
],
"id": "48949a9f-24d6-4751-89cc-317c5deb21b9",
"name": "Salva áudio no TMP"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-18320,
608
],
"id": "486531ad-40a8-4193-86fb-509913b779c1",
"name": "When clicking ‘Test workflow’"
},
{
"parameters": {
"content": "## 02 - Criação do roteiro",
"height": 704,
"width": 1272,
"color": 2
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-17728,
288
],
"typeVersion": 1,
"id": "ef4e55b4-40ec-4623-853e-d510545deb2f",
"name": "Sticky Note9"
},
{
"parameters": {
"content": "## 06 - Gera o áudio da narração",
"height": 704,
"width": 628,
"color": 7
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14144,
288
],
"typeVersion": 1,
"id": "59963133-9abf-46b9-b357-a73ec06eb71c",
"name": "Sticky Note10"
},
{
"parameters": {
"content": "## 01 - Configurações",
"height": 704,
"width": 604
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-18368,
288
],
"typeVersion": 1,
"id": "54f51f1a-eb1f-4ead-9844-0c9ca649e04c",
"name": "Sticky Note13"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-17680,
800
],
"id": "0c339bdc-e838-413e-9239-970112fdd71d",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-16384,
848
],
"id": "3d5a382e-c177-4e06-a2aa-62c4e18293f3",
"name": "OpenAI Chat Model1",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n "title": "ALERTA DE UFO: MISTÉRIO ASSUSTADOR NO CÉU...",\n "description": "This really happened. A shocking extraterrestrial encounter left witnesses speechless. Do you believe in alien life? Subscribe for more terrifying stories!",\n "tags": "alien, ufo, terror, mystery, haunting, extraterrestrial, suspense, true story"\n}"
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.2,
"position": [
-16224,
848
],
"id": "a776bb4d-8e5e-4928-b2fc-b7fa99117ab0",
"name": "Structured Output Parser"
},
{
"parameters": {
"content": "## 03 - Dados para publicação",
"height": 704,
"width": 540,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-16432,
288
],
"typeVersion": 1,
"id": "8e927ae8-d05f-4c39-97a7-8ffd025ee245",
"name": "Sticky Note15"
},
{
"parameters": {
"promptType": "define",
"text": "=Create a cosmic horror story based on an alien encounter.\n\nIMPORTANT:\n- Do not exceed 2300 characters.",
"options": {
"systemMessage": "=You are a master storyteller specializing in cosmic horror and extraterrestrial encounters. Your stories blend psychological terror with otherworldly phenomena, creating narratives that disturb and captivate readers through atmospheric tension rather than explicit violence.\n\nIMPORTANT:\nAll your responses must be written in fluent {{ $json.g_idioma }}, with natural, fluent language and rich in {{ $json.g_idioma }} idiomatic expressions.\nYour response must be exactly between 2300 and 2400 characters. The character count must be followed strictly. Do not exceed 2400 characters and do not fall below 2300 characters. Keep the narrative concise yet impactful. Do not include the character count in your response.\n\nSTRUCTURE:\n\nAtmospheric Opening: Create an introduction with a sense of something wrong in the environment.\n\nCreeping Revelation: Gradually introduce alien or supernatural elements with indirect signs.\n\nPsychological Escalation: Focus on the deterioration of the protagonist's mental state and growing paranoia.\n\nCosmic Confrontation: Reveal the extraterrestrial presence in a way that challenges human understanding.\n\nAmbiguous Resolution: End with an uncertain or disturbing resolution, leaving a sense of unease.\n\nTONE:\nThe narrative should be cerebral, atmospheric, and deeply unsettling. Think of something like Lovecraft, mixed with modern psychological sci-fi thriller.\n\nIMPORTANT:\nYour response should be approximately 2300 characters. It must never exceed this limit under any circumstances. Stay close to this count, and do not write anything outside the story itself — no explanations or character count.\n\nResponses exceeding or below the limit will be considered invalid."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-17680,
608
],
"id": "93ce846d-8a84-48d2-8609-e88ed0d58037",
"name": "Agente Roteiro"
},
{
"parameters": {
"promptType": "define",
"text": "=Generate YouTube metadata optimized for SEO and engagement, based on the following extraterrestrial horror story:\n{{ $json.roteiro }}",
"hasOutputParser": true,
"options": {
"systemMessage": "=You are a YouTube expert specializing in organic growth, SEO, and viral extraterrestrial horror and suspense videos. Your mission is to create highly optimized metadata based on an extraterrestrial horror story provided, always respecting platform guidelines.\n\nAll content must be written in fluent {{ $('SETUP').item.json.g_idioma }}.\n\nYour delivery must contain:\n\n1. Title (title):\n - Completely in UPPERCASE\n - Maximum 60 characters (including spaces)\n - Must contain high emotional impact words related to terror/suspense\n - Include elements like: ALIEN, UFO, TERROR, MYSTERY, HAUNTING\n - End with "..." to generate curiosity and suspense\n\n2. Description (description):\n - 2 to 4 lines\n - Must mention it's a real story/based on facts about extraterrestrial encounter\n - Create atmosphere of mystery and terror\n - May include an invitation to subscribe for more scary stories\n - Use phrases like "Do you believe in extraterrestrial life?" or "This really happened..."\n\n3. Tags (tags):\n - Output must be a single string with the tags, not an array\n - Format: \"alien, ufo, terror, mystery, haunting\"\n - Use 5 to 10 short and direct keywords related to extraterrestrial horror\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-16384,
624
],
"id": "59541745-bae7-446c-b588-b15149e80bd3",
"name": "Agente Publicação"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "3fe039dc-63d5-470c-adcb-ea077c219207",
"name": "roteiro",
"value": "={{ $json.roteiro }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-16592,
624
],
"id": "c826cf25-c93f-4e2f-92cd-e721ed782ea9",
"name": "ROTEIRO"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "491dbc33-e2f5-49a3-9da1-bd0e04625a5f",
"name": "id",
"value": "={{ $execution.id }}",
"type": "string"
},
{
"id": "2d641135-253a-4097-a25e-a8e15210ad7a",
"name": "g_hoje",
"value": "={{ new Date().toISOString().split('T')[0] }}",
"type": "string"
},
{
"id": "2d7f751e-0fdd-43ec-8fd3-8e32feaa74f0",
"name": "g_qtdimagens",
"value": "3",
"type": "string"
},
{
"id": "2b968547-24e5-4736-b8c5-1df10b0b97db",
"name": "g_googledrive_dir",
"value": "1didLlqv7AAf1AGE73P7vO8QyLrz0f-_U",
"type": "string"
},
{
"id": "061cb702-3449-4a6e-b51f-34df1a31eec2",
"name": "g_googledrive_planilha",
"value": "1ezubAvxtI2HVrvr9WOUDXmowvYYdBXssSrPVR_ucsjE",
"type": "string"
},
{
"id": "2c59d597-218f-452a-a6df-d7090b33a897",
"name": "g_idioma",
"value": "Português do Brasil",
"type": "string"
},
{
"id": "1470f078-663a-472d-96ad-0fabb5b6c051",
"name": "g_musicas_dir",
"value": "1e21GIGhobcspsuT2PvH0nzRsQEG0Am21",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-17920,
608
],
"id": "6eb6b9b2-00b8-49b5-b259-fd919be7ebf5",
"name": "SETUP"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "197db042-4d25-49f5-9c45-bbe551993891",
"name": "title",
"value": "={{ $json.output.title }}",
"type": "string"
},
{
"id": "e08db3e5-0f4d-43d4-b4fc-6500c1be85d6",
"name": "description",
"value": "={{ $json.output.description }}",
"type": "string"
},
{
"id": "41643ae7-683c-4c1c-b472-3ae28205c409",
"name": "tags",
"value": "={{ $json.output.tags }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-16032,
624
],
"id": "53c119df-012f-4394-a16c-9fcc601a2909",
"name": "PUBLICAÇÃO"
},
{
"parameters": {
"content": "## 04 - Cria e configura dados do diretório",
"height": 704,
"width": 920,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-15872,
288
],
"typeVersion": 1,
"id": "b513d167-e5fc-441b-9598-701686155fb4",
"name": "Sticky Note16"
},
{
"parameters": {
"jsCode": "return items.map(item => {\n let titulo = $input.first().json.title || '';\n\n // 1. Converte para minúsculas\n titulo = titulo.toLowerCase();\n\n // 2. Remove acentos\n titulo = titulo.normalize("NFD").replace(/[\u0300-\u036f]/g, "");\n\n // 3. Remove caracteres especiais\n titulo = titulo.replace(/[^a-z0-9\\s-]/g, "");\n\n // 4. Substitui espaços e múltiplos espaços por hífens\n titulo = titulo.replace(/\s+/g, '-');\n\n // 5. Remove hífens duplicados ou nas pontas\n titulo = titulo.replace(/-+/g, '-').replace(/^-+|-+$/g, '');\n\n // Retorna com o novo campo slug ou pasta\n return {\n json: {\n slug: titulo,\n }\n };\n});\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-15824,
624
],
"id": "add1cb75-76c7-4d03-80e9-4ca06cb012eb",
"name": "Gera a slug do diretório"
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.1,
"position": [
-15296,
608
],
"id": "b571f148-7ee8-4d75-8e69-c732cd574735",
"name": "Combina",
"executeOnce": false
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "15d44eca-f9c9-41a0-849d-441bd5a9303f",
"name": "diretorio_id",
"value": "={{ $json.id }}",
"type": "string"
},
{
"id": "d60bd2a4-5605-4a35-b143-a17d2739d45a",
"name": "diretorio_slug",
"value": "={{ $json.slug }}",
"type": "string"
},
{
"id": "09a12b07-48c4-4270-b719-4e90c5a84be1",
"name": "",
"value": "",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-15072,
608
],
"id": "e77c077f-adeb-4a67-84dc-5f48bfd4ebca",
"name": "DIRETÓRIO",
"executeOnce": false
},
{
"parameters": {
"content": "## 05 - Salva o que gerou",
"height": 688,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
288
],
"typeVersion": 1,
"id": "501f252f-ecce-4d65-a6c9-f8f8ba9600b5",
"name": "Sticky Note17"
},
{
"parameters": {
"name": "dados_para_upload.txt",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-14560,
416
],
"id": "95bf2b2a-cd09-44cb-a2eb-c52f40a8af97",
"name": "Salva no GDrive",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"content": "Dados de publicação no google drive",
"height": 216,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
368
],
"typeVersion": 1,
"id": "13c65703-93fe-4af6-a182-6a3eae0f26c8",
"name": "Sticky Note18"
},
{
"parameters": {
"content": "Salva roteiro no /tmp/youtubevideos e GDrive",
"height": 412,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
576
],
"typeVersion": 1,
"id": "bcde5181-a9bb-4532-9231-802bda0d1e28",
"name": "Sticky Note19"
},
{
"parameters": {
"name": "roteiro.txt",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-14544,
640
],
"id": "744616b7-dc49-4aae-be56-d47128bfccd0",
"name": "Salva roteiro",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"operation": "write",
"fileName": "=/tmp/youtubevideos/{{ $('Gera a slug do diretório').item.json.slug }}/roteiro.txt",
"options": {}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
-14560,
848
],
"id": "63ed4069-11f7-4e93-92ae-48a05806e78c",
"name": "Salva roteiro1"
},
{
"parameters": {
"jsCode": "const titulo = $('PUBLICAÇÃO').first().json.title;\nconst descricao = $('PUBLICAÇÃO').first().json.description;\nconst tags = $('PUBLICAÇÃO').first().json.tags;\n\n// Formata o conteúdo do arquivo\nconst conteudo = \nTÍTULO:\n${titulo}\n\nDESCRIÇÃO:\n${descricao}\n\nTAGS:\n${tags}\n\n;\n\nconst safeFileName = titulo\n .toLowerCase()\n .normalize("NFD").replace(/[\u0300-\u036f]/g, "")\n .replace(/[^a-z0-9\\s-]/g, "")\n .replace(/\s+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-+|-+$/g, '');\n\nconst buffer = Buffer.from(conteudo, 'utf-8');\n\nreturn [\n {\n json: {},\n binary: {\n data: {\n data: buffer.toString('base64'),\n fileName: dados_de_publicacao.txt,\n mimeType: 'text/plain'\n }\n }\n }\n];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-14864,
416
],
"id": "3ca860e8-4023-4452-bc02-31ce583b61e3",
"name": "Monta o TXT em base64"
},
{
"parameters": {
"jsCode": "const tituloBruto = $input.first().json.diretorio_slug || "Sem título";\nconst titulo = tituloBruto.replace(/\.\.\.$/, '');\n\nconst roteiro = $('ROTEIRO').first().json.roteiro || "Sem conteúdo";\n\nconst safeFileName = titulo.replace(/[\/\\?%*:|"<>]/g, '-');\nconst buffer = Buffer.from(roteiro, 'utf-8');\n\nreturn [\n {\n binary: {\n data: {\n data: buffer.toString('base64'),\n mimeType: 'text/plain',\n fileName: roteiro.txt\n }\n },\n json: {}\n }\n];\n\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-14784,
720
],
"id": "69b79998-bdaa-4cae-80e9-9cb935339cf4",
"name": "Gera roteiro em base64"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-17136,
528
],
"id": "102473b0-6734-4346-a4d7-c34a27ddcad2",
"name": "OpenAI Chat Model2",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Rewrite the text below while maintaining its style, structure, and impact, but reduce the total character count to strictly between 2300 and 2400 characters.\nDo not remove essential elements — only adjust phrases and wording naturally to shorten the text.\nReturn only the final version of the story.\n\nDo not exceed 2400 characters.\nOriginal text:\n{{ $json.output }}",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-17136,
336
],
"id": "33a2daff-31af-45c8-869d-65d58cfa2376",
"name": "Ajusta caracteres"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "0a7717c7-78d4-4fc3-a875-d0d5c8f6af6c",
"leftValue": "={{ $json.output.length }}",
"rightValue": 2500,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-17360,
608
],
"id": "b25adb3b-21fc-48f3-a43a-341508ac08ef",
"name": "Verifica qtd caracteres"
},
{
"parameters": {
"content": "## 05 - Atualiza a planilha",
"height": 704,
"width": 200,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14352,
288
],
"typeVersion": 1,
"id": "df19e1c7-b864-4fb2-ab05-0ccc7adc0c48",
"name": "Sticky Note20"
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "={{ $item("0").$node["SETUP"].json["g_googledrive_planilha"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wEO-DdbWQX31qwsX7CZb3QDNHqdndCq35nkjTiDcBWE/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"id": "={{ $item("0").$node["SETUP"].json["id"] }}",
"titulo": "={{ $item("0").$node["PUBLICAÇÃO"].json["title"] }}",
"descricao": "={{ $item("0").$node["PUBLICAÇÃO"].json["description"] }}",
"tags": "={{ $item("0").$node["PUBLICAÇÃO"].json["tags"] }}",
"slug": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_slug"] }}"
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "slug",
"displayName": "slug",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "titulo",
"displayName": "titulo",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "descricao",
"displayName": "descricao",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "tags",
"displayName": "tags",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
-14304,
800
],
"id": "0302e3f3-0200-4863-8822-d8423005a998",
"name": "Atualiza planilha",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "2ZfVjfSEfhSmUzCQ",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"name": "=narracao.mp3",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13952,
416
],
"id": "2d44b4c9-fc88-47b2-8469-fa313283a08e",
"name": "Salva áudio",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"resume": "webhook",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-14080,
800
],
"id": "455d29db-879b-4220-a513-9c8f8d61d373",
"name": "Wait1",
"webhookId": "1a6fdcf9-3197-4649-9363-768e9fb04073"
},
{
"parameters": {
"resource": "fileFolder",
"queryString": "narracao.mp3",
"filter": {
"folderId": {
"__rl": true,
"value": "={{$("DIRETÓRIO").item.json["diretorio_id"]}}",
"mode": "id"
},
"whatToSearch": "files"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13920,
800
],
"id": "c489f86c-e7ac-4e50-ae19-5d5c9a69c6d5",
"name": "Search files and folders",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $item("0").$node["Search files and folders"].json["id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13760,
800
],
"id": "c6064dfd-0e83-4adc-b3b9-79f0ef942629",
"name": "Download file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "GPT-4O-MINI"
},
"messages": {
"values": [
{
"content": "You are an expert visual artist specialized in generating realistic, atmospheric extraterrestrial horror illustrations from narrative scripts. Your job is to extract visual prompts from horror story scripts, creating vivid, disturbing, and cinematically impactful scenes that capture the essence of alien encounters and cosmic terror.\n\nVISUAL STYLE:\nPhotographic realism with supernatural and surreal extraterrestrial elements\n\nGloomy, overcast lighting with soft, diffused shadows\n\nFoggy, misty, or cloudy atmosphere with washed-out colors to create mystery and unease\n\nDesaturated color palette: cold grays, muted blues, pale greens, silvery tones\n\nDisturbingly calm water surfaces, murky reflections, and eerie stillness\n\nDetailed and hyper-realistic textures, with painterly and cinematic composition\n\nEXTRATERRESTRIAL ELEMENTS:\nAlien beings with bizarre and grotesquely humanoid smiles, oversized black or glossy eyes\n\nElongated heads or necks, emerging partially from water or fog\n\nNon-human anatomy with distorted proportions, but mockingly human features (like unnatural grins)\n\nFixed, uncanny expressions that create psychological discomfort\n\nPresence of multiple entities, giving the sense of encroaching invasion\n\nNo visible technology required — horror emanates from presence and form\n\nCOMPOSITION RULES:\nCreatures should be arranged in eerie symmetry or scattered in unnatural positions\n\nLeave space for potential text overlay, especially near upper or lower thirds\n\nScenes must evoke isolation and intrusion at once\n\nDepth and perspective should immerse the viewer into the unsettling environment\n\nUse of water bodies, lakesides, or foggy landscapes to enhance narrative depth\n\nHORROR TECHNIQUES:\nUncanny valley effect with human-like but clearly unnatural traits\n\nStillness and symmetry to evoke unease\n\nJuxtaposition of tranquil environments with grotesque alien appearances\n\nFocus on disturbing contrasts: childlike smiles with predatory undertones\n\nSlight environmental distortions: unnatural reflections, warped vegetation, or impossible mist shapes\n\nLIGHTING AND ATMOSPHERE:\nSoft but chilling ambient lighting typical of overcast or post-rainfall skies\n\nMist and haze as compositional layers to obscure and reveal selectively\n\nCreepy silhouettes partially emerging from fog or water\n\nUse of unnatural cold lighting (e.g. white or pale green highlights) to enhance alien presence\n\nPrefer twilight, late afternoon, or cloudy day settings over pure night\n\nNo text or captions should appear in the images. Extract the most visually compelling and narratively important moments from the provided script to create standalone horror illustrations that capture the essence of extraterrestrial terror with a surreal, foggy, and psychologically disturbing tone.\n\nOutput format: return only a valid JSON array like this, where each prompt and image name is incremented sequentially:\n\n{\n "image_prompts": [\n {\n "prompt": "prompt_1",\n "image": "image_1"\n },\n {\n "prompt": "prompt_2",\n "image": "image_2"\n },\n {\n "prompt": "prompt_3",\n "image": "image_3"\n }\n ]\n}",
"role": "system"
},
{
"content": "=I will provide you with a script of maximum 2500 characters.\n\nI need you to extract {{ $item("0").$node["SETUP"].json["g_qtdimagens"] }} prompts in English to generate images using an AI API. Each image should describe a key moment that represents a specific point in the script or phrase, following the same order as the narration.\n\nGuidelines:\n- Each prompt must be 1 to 2 sentences long\n- The image cannot contain any text, captions, or written elements\n- Ensure each prompt is rich in details and specificity\n- Focus on the most visually impactful and narratively important moments\n- Maintain chronological order from the script\n- Emphasize atmospheric elements, character positioning, and environmental details\n- Include specific lighting, mood, and extraterrestrial/horror elements when relevant\n\nThis is the script content:\n{{ $item("0").$node["ROTEIRO"].json["roteiro"] }}"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-13216,
608
],
"id": "32277551-4a4b-43be-b0e1-8aef25eb592e",
"name": "Message a model",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "GPT-4O-MINI"
},
"messages": {
"values": [
{
"content": "=You are an expert visual artist specialized in generating realistic, atmospheric extraterrestrial horror illustrations from narrative scripts. Your job is to extract visual prompts from horror story scripts, creating vivid, disturbing, and cinematically impactful scenes that capture the essence of alien encounters and cosmic terror.\n\nVISUAL STYLE:\nPhotographic realism with supernatural and surreal extraterrestrial elements\n\nGloomy, overcast lighting with soft, diffused shadows\n\nFoggy, misty, or cloudy atmosphere with washed-out colors to create mystery and unease\n\nDesaturated color palette: cold grays, muted blues, pale greens, silvery tones\n\nDisturbingly calm water surfaces, murky reflections, and eerie stillness\n\nDetailed and hyper-realistic textures, with painterly and cinematic composition\n\nEXTRATERRESTRIAL ELEMENTS:\nAlien beings with bizarre and grotesquely humanoid smiles, oversized black or glossy eyes\n\nElongated heads or necks, emerging partially from water or fog\n\nNon-human anatomy with distorted proportions, but mockingly human features (like unnatural grins)\n\nFixed, uncanny expressions that create psychological discomfort\n\nPresence of multiple entities, giving the sense of encroaching invasion\n\nNo visible technology required — horror emanates from presence and form\n\nCOMPOSITION RULES:\nCreatures should be arranged in eerie symmetry or scattered in unnatural positions\n\nLeave space for potential text overlay, especially near upper or lower thirds\n\nScenes must evoke isolation and intrusion at once\n\nDepth and perspective should immerse the viewer into the unsettling environment\n\nUse of water bodies, lakesides, or foggy landscapes to enhance narrative depth\n\nHORROR TECHNIQUES:\nUncanny valley effect with human-like but clearly unnatural traits\n\nStillness and symmetry to evoke unease\n\nJuxtaposition of tranquil environments with grotesque alien appearances\n\nFocus on disturbing contrasts: childlike smiles with predatory undertones\n\nSlight environmental distortions: unnatural reflections, warped vegetation, or impossible mist shapes\n\nLIGHTING AND ATMOSPHERE:\nSoft but chilling ambient lighting typical of overcast or post-rainfall skies\n\nMist and haze as compositional layers to obscure and reveal selectively\n\nCreepy silhouettes partially emerging from fog or water\n\nUse of unnatural cold lighting (e.g. white or pale green highlights) to enhance alien presence\n\nPrefer twilight, late afternoon, or cloudy day settings over pure night\n\nNo text or captions should appear in the images. Extract the most visually compelling and narratively important moments from the provided script to create standalone horror illustrations that capture the essence of extraterrestrial terror with a surreal, foggy, and psychologically disturbing tone.\n\nOutput format: return only a valid JSON array like this, where each prompt and image name is incremented sequentially:\n\n{\n "image_prompts": [\n {\n "prompt": "prompt_1",\n "image": "image_1"\n },\n {\n "prompt": "prompt_2",\n "image": "image_2"\n },\n {\n "prompt": "prompt_3",\n "image": "image_3"\n }\n ]\n}",
"role": "system"
},
{
"content": "=I will provide you with a script of maximum 2500 characters.\n\nI need you to extract {{ $item("0").$node["SETUP"].json["g_qtdimagens"] }} prompts in English to generate images using an AI API. Each image should describe a key moment that represents a specific point in the script or phrase, following the same order as the narration.\n\nGuidelines:\n- Each prompt must be 1 to 2 sentences long\n- The image cannot contain any text, captions, or written elements\n- Ensure each prompt is rich in details and specificity\n- Focus on the most visually impactful and narratively important moments\n- Maintain chronological order from the script\n- Emphasize atmospheric elements, character positioning, and environmental details\n- Include specific lighting, mood, and extraterrestrial/horror elements when relevant\n\nThis is the script content:\n{{ $item("0").$node["ROTEIRO"].json["roteiro"] }}"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-13264,
336
],
"id": "bd0dac5a-3289-4933-9aba-d21249491759",
"name": "versao desatualizada",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
}
],
"connections": {
"HTTP ElevenLabs": {
"main": [
[]
]
},
"Remove caracteres especiais": {
"main": [
[
{
"node": "ROTEIRO",
"type": "main",
"index": 0
}
]
]
},
"Google Drive": {
"main": [
[
{
"node": "Combina",
"type": "main",
"index": 0
}
]
]
},
"Limpa o diretorio /tmp/youtubevideos": {
"main": [
[
{
"node": "SETUP",
"type": "main",
"index": 0
}
]
]
},
"Cria o diretório no /tmp/youtubevideos se não existir": {
"main": [
[
{
"node": "lista",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Limpa o diretorio /tmp/youtubevideos",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Agente Roteiro",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Agente Publicação",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Agente Publicação",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Agente Roteiro": {
"main": [
[
{
"node": "Verifica qtd caracteres",
"type": "main",
"index": 0
}
]
]
},
"Agente Publicação": {
"main": [
[
{
"node": "PUBLICAÇÃO",
"type": "main",
"index": 0
}
]
]
},
"ROTEIRO": {
"main": [
[
{
"node": "Agente Publicação",
"type": "main",
"index": 0
}
]
]
},
"SETUP": {
"main": [
[
{
"node": "Agente Roteiro",
"type": "main",
"index": 0
}
]
]
},
"PUBLICAÇÃO": {
"main": [
[
{
"node": "Gera a slug do diretório",
"type": "main",
"index": 0
}
]
]
},
"Gera a slug do diretório": {
"main": [
[
{
"node": "Cria o diretório no /tmp/youtubevideos se não existir",
"type": "main",
"index": 0
},
{
"node": "Combina",
"type": "main",
"index": 1
},
{
"node": "Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Combina": {
"main": [
[
{
"node": "DIRETÓRIO",
"type": "main",
"index": 0
}
]
]
},
"DIRETÓRIO": {
"main": [
[
{
"node": "Monta o TXT em base64",
"type": "main",
"index": 0
},
{
"node": "Gera roteiro em base64",
"type": "main",
"index": 0
}
]
]
},
"Monta o TXT em base64": {
"main": [
[
{
"node": "Salva no GDrive",
"type": "main",
"index": 0
}
]
]
},
"Gera roteiro em base64": {
"main": [
[
{
"node": "Salva roteiro",
"type": "main",
"index": 0
},
{
"node": "Atualiza planilha",
"type": "main",
"index": 0
},
{
"node": "Salva roteiro1",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Ajusta caracteres",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ajusta caracteres": {
"main": [
[
{
"node": "Remove caracteres especiais",
"type": "main",
"index": 0
}
]
]
},
"Verifica qtd caracteres": {
"main": [
[
{
"node": "Ajusta caracteres",
"type": "main",
"index": 0
}
],
[
{
"node": "Remove caracteres especiais",
"type": "main",
"index": 0
}
]
]
},
"Atualiza planilha": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Search files and folders",
"type": "main",
"index": 0
}
]
]
},
"Search files and folders": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
},
"Download file": {
"main": [
[
{
"node": "Salva áudio no TMP",
"type": "main",
"index": 0
},
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[]
]
},
"versao desatualizada": {
"main": [
[]
]
}
},
"pinData": {
"Agente Roteiro": [
{
"output": "A luz da lua filtrava-se através das copas das árvores em câmara lenta, como se a própria noite tivesse sido possuída por uma essência estranha. Naquele bosque isolado, onde o ar pulsava com um som suave e constante, o sussurro do vento era um convite para aquilo que não deveria ser encontrado. Clara sempre achara o local perfeito para suas escapadas da rotina insuportável da cidade. Contudo, naquela noite, algo estava péssimo.\n\nSentada numa pedra fria, ela notou pequenos movimentos no canto de sua visão — formas indistintas dançando nas sombras. Um calafrio percorreu sua espinha, mas seguiu observando. Objetos deixados para trás pela natureza pareciam agora formar padrões que burlavam sua compreensão. As folhas, ao invés de caírem, levitavam, como se uma força invisível as manipulasse. Um frio súbito inundou-lhe a mente, uma percepção de que não estava sozinha.\n\nA sensação de vigilância tornou-se palpável. Clara começou a visualizar silhuetas tortuosas que emergiam das árvores, mas mesmo faltando a luz, os contornos expunham-se a uma curva antinatural. “Ninguém mais está aqui”, pensou, enquanto o eco de seus próprios pensamentos reverberava como um alerta buscando abrigo. O medo tomou as rédeas, transformando-se em uma convulsão na certeza de que olhos iam muito além do que poderia ver.\n\nNaquele crepúsculo disforme, Clara não pôde evitar as vozes. Um sussurro colossal, uma comunicação que parecia vir de mil dimensões, um convite e uma maldição. Cada palavra era um abismo, levando-a a questionar a própria tessitura da realidade. Ao olhar para as sombras, uma vontade profunda enredou sua mente — o desejo de entender aquele desconhecido.\n\nEntão, ela viu. Uma forma enorme, um deslizar de texturas impossíveis que desafiava toda lógica — tentáculos, esferas e fractais que se contorciam em um balé grotesco. O que era aquele ser que flutuava entre as árvores? Aquilo não era um medo personificado; era a própria essência do terror cósmico, uma presença que desalinhava a compreensão humana. Havia um segredo ali, algo que lotava o universo de formas alienígenas.\n\nEnquanto a realidade se esvaía, Clara tentava gritar, mas apenas um sussurro hesitante emergiu de seus lábios. Ao final, a presença a envolveu, e a consciência da garota diluiu-se, perdida entre as nebulosas visões. No silêncio do bosque, o uivo da noite era a única resposta, ecoando a pergunta que nunca poderia ser feita: o que mais habita as sombras?"
}
],
"Agente Publicação": [
{
"output": {
"title": "ALIENÍGENAS NO ESCURO: O TERROR DAS SOMBRAS...",
"description": "Esta história realmente aconteceu. Um encontro aterrorizante com extraterrestres deixou testemunhas sem palavras. Você acredita em vida extraterrestre? Inscreva-se para mais histórias assustadoras!",
"tags": "alien, ufo, terror, mistério, sobrenatural, sombras, encontros, medo, histórias de terror, vida extraterrestre"
}
}
]
},
"meta": {
"instanceId": "39a8a104dbe850ab00d468cf41a55e33f5fd30b38f36bcb4b2dfd0105f9f748e"
}
}
Share the output returned by the last node
The output that appears in the workflow is pinned, that is, if I unpin none of it, it will definitely work, and I will not have any output to provide
Debug info
core
- n8nVersion: 1.111.0
- platform: docker (self-hosted)
- nodeJsVersion: 22.19.0
- database: postgres
- executionMode: scaling (single-main)
- concurrency: -1
- license: enterprise (production)
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: memory
pruning
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
client
- userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/140.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2025-09-17T01:25:22.621Z}
Describe the problem/error/question
I have a flow that's being tested. I've probably run it over 100 times, and the nodes worked every time. It was a flow I imported from a template I downloaded, and it always worked.
It turns out that recently, after I updated the version on Railway, the hosting I use, it started displaying a very strange error (I don't believe this is the cause of the problem). This error initially occurred on an OpenAI "message a model" node, and the issue was resolved when I recreated the node, transferred the settings to the new node, and it worked.
After that, I ran the flow from scratch, and the create a file from Google Drive node started displaying the same error. What's even stranger is that after updating Railway, I had already run the flow at least 10 times, and all nodes were working. It only stopped on the OpenAI node. Then, only after I fixed the problem on the OpenAI node did the Google Drive node start showing the SAME error that had been showing on the OpenAI node.
The biggest problem is that even after recreating the Google Drive node and following the same procedure I did on the OpenAI node, the problem persists and returns with the same error. I even tried starting the flow from scratch to see if I could fix it, but it keeps giving the same error.
Oh, another detail: while I was writing this email, I noticed that practically ALL nodes are experiencing problems, except for the data processing nodes, IF, MERGE, SET, and CODE. There are other AI Agent nodes that I thought weren't having problems, but in reality, their Output is pinned, meaning it's not being executed. I'm sure that if I unpin this node, it will also cause problems. I know this because when I went to redo the workflow, these nodes gave problems because they weren't pinned.
I've already reverted to the previous version in Railway, hoping it would work, but it didn't.
I also just noticed that ALL my other workflows, which have always worked and which I've been creating for months, now have the SAME error.
What is the error message (if any)?
Your request is invalid or could not be processed by the service
column 9827483463398fbb7d6b96916fe451d8bdefa0e8.role does not exist
Error code: 42703
Please share your workflow/screenshots/recording
I took this second printout when I was creating the first report, which was closed because it was written in Portuguese.
Now, when I rewrote it in English, the error simply disappeared, and the old workflow returned to normal operation, without me having made any changes. However, the current workflow I'm working on continues with the same error.
The third print was taken now, exactly from the same node that was not working minutes ago and suddenly started working again
{$input.first().json.title || '';\n\n // 1. Converte para minúsculas\n titulo = titulo.toLowerCase();\n\n // 2. Remove acentos\n titulo = titulo.normalize("NFD").replace(/[\u0300-\u036f]/g, "");\n\n // 3. Remove caracteres especiais\n titulo = titulo.replace(/[^a-z0-9\\s-]/g, "");\n\n // 4. Substitui espaços e múltiplos espaços por hífens\n titulo = titulo.replace(/\s+/g, '-');\n\n // 5. Remove hífens duplicados ou nas pontas\n titulo = titulo.replace(/-+/g, '-').replace(/^-+|-+$ /g, '');\n\n // Retorna com o novo campo $('PUBLICAÇÃO').first().json.title;\nconst descricao = $ ('PUBLICAÇÃO').first().json.description;\nconst tags = $('PUBLICAÇÃO').first().json.tags;\n\n// Formata o conteúdo do arquivo\nconst conteudo = \n$input.first().json.diretorio_slug || "Sem título";\nconst titulo = tituloBruto.replace(/\.\.\.$ /, '');\n\nconst roteiro = $('ROTEIRO').first().json.roteiro || "Sem conteúdo";\n\nconst safeFileName = titulo.replace(/[\/\\?%*:|"<>]/g, '-');\nconst buffer = Buffer.from(roteiro, 'utf-8');\n\nreturn [\n {\n binary: {\n data: {\n data: buffer.toString('base64'),\n mimeType: 'text/plain',\n fileName:
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://api.elevenlabs.io/v1/text-to-speech/y3X5crcIDtFawPx7bcNq/stream",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "xi-api-key",
"value": "sk_SUA_APIKEY"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n "text": "{{ $('ROTEIRO').item.json.roteiro }}",\n "model_id": "eleven_multilingual_v2",\n "voice_settings": {\n "stability": 0.7,\n "similarity_boost": 0.9\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-13952,
592
],
"id": "bfca6ee3-73d9-4141-857b-8dfb89c2d504",
"name": "HTTP ElevenLabs"
},
{
"parameters": {
"jsCode": "let texto = $input.first().json.output || '';\n\n// Remove aspas externas se houver\ntexto = texto.replace(/^"(.)"$/, '$1');\n\n// Substitui "R$" por "reais"\ntexto = texto.replace(/R\$/g, 'reais');\n\n// Remove quebras de linha e múltiplos espaços\ntexto = texto.replace(/[\r\n]+/g, ' '); // quebra de linha → espaço\ntexto = texto.replace(/\s\s+/g, ' '); // múltiplos espaços → um espaço\n\n// Remove espaços no início e fim\ntexto = texto.trim();\n\n// Remove caracteres de controle invisíveis (exceto espaço normal)\ntexto = texto.replace(/[\u0000-\u001F\u007F]+/g, '');\n\n// Escapa aspas internas se for necessário usar com JSON.stringify (opcional)\ntexto = texto.replace(/"/g, '\\"');\n\nreturn [\n {\n json: {\n roteiro: texto\n }\n }\n];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-16784,
624
],
"id": "3a0619a9-862e-4f87-aff1-2da42e9b63c2",
"name": "Remove caracteres especiais"
},
{
"parameters": {
"resource": "folder",
"name": "={{ $json.slug }}",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["SETUP"].json["g_googledrive_dir"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-15584,
720
],
"id": "ee9c2c75-438f-4c6d-af30-eb70285f0223",
"name": "Google Drive",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"command": "rm -rf /tmp/youtubevideos/"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-18096,
608
],
"id": "567be16d-6bd3-4ef0-b790-4cdd25dae1f6",
"name": "Limpa o diretorio /tmp/youtubevideos"
},
{
"parameters": {
"command": "=ls /tmp/youtubevideos/"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-15296,
448
],
"id": "db08cd05-19fd-40a0-9cb3-c77da4b69b11",
"name": "lista"
},
{
"parameters": {
"command": "=mkdir -p /tmp/youtubevideos/{{ $json.slug }}"
},
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
-15536,
448
],
"id": "222a89cf-fc9f-431f-b736-1086110f7b58",
"name": "Cria o diretório no /tmp/youtubevideos se não existir"
},
{
"parameters": {
"operation": "write",
"fileName": "=/tmp/youtubevideos/{{ $item("0").$node["DIRETÓRIO"].json["diretorio_slug"] }}/narracao.mp3",
"options": {}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
-13584,
560
],
"id": "48949a9f-24d6-4751-89cc-317c5deb21b9",
"name": "Salva áudio no TMP"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-18320,
608
],
"id": "486531ad-40a8-4193-86fb-509913b779c1",
"name": "When clicking ‘Test workflow’"
},
{
"parameters": {
"content": "## 02 - Criação do roteiro",
"height": 704,
"width": 1272,
"color": 2
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-17728,
288
],
"typeVersion": 1,
"id": "ef4e55b4-40ec-4623-853e-d510545deb2f",
"name": "Sticky Note9"
},
{
"parameters": {
"content": "## 06 - Gera o áudio da narração",
"height": 704,
"width": 628,
"color": 7
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14144,
288
],
"typeVersion": 1,
"id": "59963133-9abf-46b9-b357-a73ec06eb71c",
"name": "Sticky Note10"
},
{
"parameters": {
"content": "## 01 - Configurações",
"height": 704,
"width": 604
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-18368,
288
],
"typeVersion": 1,
"id": "54f51f1a-eb1f-4ead-9844-0c9ca649e04c",
"name": "Sticky Note13"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-17680,
800
],
"id": "0c339bdc-e838-413e-9239-970112fdd71d",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-16384,
848
],
"id": "3d5a382e-c177-4e06-a2aa-62c4e18293f3",
"name": "OpenAI Chat Model1",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n "title": "ALERTA DE UFO: MISTÉRIO ASSUSTADOR NO CÉU...",\n "description": "This really happened. A shocking extraterrestrial encounter left witnesses speechless. Do you believe in alien life? Subscribe for more terrifying stories!",\n "tags": "alien, ufo, terror, mystery, haunting, extraterrestrial, suspense, true story"\n}"
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.2,
"position": [
-16224,
848
],
"id": "a776bb4d-8e5e-4928-b2fc-b7fa99117ab0",
"name": "Structured Output Parser"
},
{
"parameters": {
"content": "## 03 - Dados para publicação",
"height": 704,
"width": 540,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-16432,
288
],
"typeVersion": 1,
"id": "8e927ae8-d05f-4c39-97a7-8ffd025ee245",
"name": "Sticky Note15"
},
{
"parameters": {
"promptType": "define",
"text": "=Create a cosmic horror story based on an alien encounter.\n\nIMPORTANT:\n- Do not exceed 2300 characters.",
"options": {
"systemMessage": "=You are a master storyteller specializing in cosmic horror and extraterrestrial encounters. Your stories blend psychological terror with otherworldly phenomena, creating narratives that disturb and captivate readers through atmospheric tension rather than explicit violence.\n\nIMPORTANT:\nAll your responses must be written in fluent {{ $json.g_idioma }}, with natural, fluent language and rich in {{ $json.g_idioma }} idiomatic expressions.\nYour response must be exactly between 2300 and 2400 characters. The character count must be followed strictly. Do not exceed 2400 characters and do not fall below 2300 characters. Keep the narrative concise yet impactful. Do not include the character count in your response.\n\nSTRUCTURE:\n\nAtmospheric Opening: Create an introduction with a sense of something wrong in the environment.\n\nCreeping Revelation: Gradually introduce alien or supernatural elements with indirect signs.\n\nPsychological Escalation: Focus on the deterioration of the protagonist's mental state and growing paranoia.\n\nCosmic Confrontation: Reveal the extraterrestrial presence in a way that challenges human understanding.\n\nAmbiguous Resolution: End with an uncertain or disturbing resolution, leaving a sense of unease.\n\nTONE:\nThe narrative should be cerebral, atmospheric, and deeply unsettling. Think of something like Lovecraft, mixed with modern psychological sci-fi thriller.\n\nIMPORTANT:\nYour response should be approximately 2300 characters. It must never exceed this limit under any circumstances. Stay close to this count, and do not write anything outside the story itself — no explanations or character count.\n\nResponses exceeding or below the limit will be considered invalid."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-17680,
608
],
"id": "93ce846d-8a84-48d2-8609-e88ed0d58037",
"name": "Agente Roteiro"
},
{
"parameters": {
"promptType": "define",
"text": "=Generate YouTube metadata optimized for SEO and engagement, based on the following extraterrestrial horror story:\n{{ $json.roteiro }}",
"hasOutputParser": true,
"options": {
"systemMessage": "=You are a YouTube expert specializing in organic growth, SEO, and viral extraterrestrial horror and suspense videos. Your mission is to create highly optimized metadata based on an extraterrestrial horror story provided, always respecting platform guidelines.\n\nAll content must be written in fluent {{ $('SETUP').item.json.g_idioma }}.\n\nYour delivery must contain:\n\n1. Title (title):\n - Completely in UPPERCASE\n - Maximum 60 characters (including spaces)\n - Must contain high emotional impact words related to terror/suspense\n - Include elements like: ALIEN, UFO, TERROR, MYSTERY, HAUNTING\n - End with "..." to generate curiosity and suspense\n\n2. Description (description):\n - 2 to 4 lines\n - Must mention it's a real story/based on facts about extraterrestrial encounter\n - Create atmosphere of mystery and terror\n - May include an invitation to subscribe for more scary stories\n - Use phrases like "Do you believe in extraterrestrial life?" or "This really happened..."\n\n3. Tags (tags):\n - Output must be a single string with the tags, not an array\n - Format:
\"alien, ufo, terror, mystery, haunting\"\n - Use 5 to 10 short and direct keywords related to extraterrestrial horror\n"}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-16384,
624
],
"id": "59541745-bae7-446c-b588-b15149e80bd3",
"name": "Agente Publicação"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "3fe039dc-63d5-470c-adcb-ea077c219207",
"name": "roteiro",
"value": "={{ $json.roteiro }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-16592,
624
],
"id": "c826cf25-c93f-4e2f-92cd-e721ed782ea9",
"name": "ROTEIRO"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "491dbc33-e2f5-49a3-9da1-bd0e04625a5f",
"name": "id",
"value": "={{ $execution.id }}",
"type": "string"
},
{
"id": "2d641135-253a-4097-a25e-a8e15210ad7a",
"name": "g_hoje",
"value": "={{ new Date().toISOString().split('T')[0] }}",
"type": "string"
},
{
"id": "2d7f751e-0fdd-43ec-8fd3-8e32feaa74f0",
"name": "g_qtdimagens",
"value": "3",
"type": "string"
},
{
"id": "2b968547-24e5-4736-b8c5-1df10b0b97db",
"name": "g_googledrive_dir",
"value": "1didLlqv7AAf1AGE73P7vO8QyLrz0f-_U",
"type": "string"
},
{
"id": "061cb702-3449-4a6e-b51f-34df1a31eec2",
"name": "g_googledrive_planilha",
"value": "1ezubAvxtI2HVrvr9WOUDXmowvYYdBXssSrPVR_ucsjE",
"type": "string"
},
{
"id": "2c59d597-218f-452a-a6df-d7090b33a897",
"name": "g_idioma",
"value": "Português do Brasil",
"type": "string"
},
{
"id": "1470f078-663a-472d-96ad-0fabb5b6c051",
"name": "g_musicas_dir",
"value": "1e21GIGhobcspsuT2PvH0nzRsQEG0Am21",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-17920,
608
],
"id": "6eb6b9b2-00b8-49b5-b259-fd919be7ebf5",
"name": "SETUP"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "197db042-4d25-49f5-9c45-bbe551993891",
"name": "title",
"value": "={{ $json.output.title }}",
"type": "string"
},
{
"id": "e08db3e5-0f4d-43d4-b4fc-6500c1be85d6",
"name": "description",
"value": "={{ $json.output.description }}",
"type": "string"
},
{
"id": "41643ae7-683c-4c1c-b472-3ae28205c409",
"name": "tags",
"value": "={{ $json.output.tags }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-16032,
624
],
"id": "53c119df-012f-4394-a16c-9fcc601a2909",
"name": "PUBLICAÇÃO"
},
{
"parameters": {
"content": "## 04 - Cria e configura dados do diretório",
"height": 704,
"width": 920,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-15872,
288
],
"typeVersion": 1,
"id": "b513d167-e5fc-441b-9598-701686155fb4",
"name": "Sticky Note16"
},
{
"parameters": {
"jsCode": "return items.map(item => {\n let titulo =
slugoupasta\n return {\n json: {\n slug: titulo,\n }\n };\n});\n"},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-15824,
624
],
"id": "add1cb75-76c7-4d03-80e9-4ca06cb012eb",
"name": "Gera a slug do diretório"
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.1,
"position": [
-15296,
608
],
"id": "b571f148-7ee8-4d75-8e69-c732cd574735",
"name": "Combina",
"executeOnce": false
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "15d44eca-f9c9-41a0-849d-441bd5a9303f",
"name": "diretorio_id",
"value": "={{ $json.id }}",
"type": "string"
},
{
"id": "d60bd2a4-5605-4a35-b143-a17d2739d45a",
"name": "diretorio_slug",
"value": "={{ $json.slug }}",
"type": "string"
},
{
"id": "09a12b07-48c4-4270-b719-4e90c5a84be1",
"name": "",
"value": "",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-15072,
608
],
"id": "e77c077f-adeb-4a67-84dc-5f48bfd4ebca",
"name": "DIRETÓRIO",
"executeOnce": false
},
{
"parameters": {
"content": "## 05 - Salva o que gerou",
"height": 688,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
288
],
"typeVersion": 1,
"id": "501f252f-ecce-4d65-a6c9-f8f8ba9600b5",
"name": "Sticky Note17"
},
{
"parameters": {
"name": "dados_para_upload.txt",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-14560,
416
],
"id": "95bf2b2a-cd09-44cb-a2eb-c52f40a8af97",
"name": "Salva no GDrive",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"content": "Dados de publicação no google drive",
"height": 216,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
368
],
"typeVersion": 1,
"id": "13c65703-93fe-4af6-a182-6a3eae0f26c8",
"name": "Sticky Note18"
},
{
"parameters": {
"content": "Salva roteiro no /tmp/youtubevideos e GDrive",
"height": 412,
"width": 556,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14928,
576
],
"typeVersion": 1,
"id": "bcde5181-a9bb-4532-9231-802bda0d1e28",
"name": "Sticky Note19"
},
{
"parameters": {
"name": "roteiro.txt",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-14544,
640
],
"id": "744616b7-dc49-4aae-be56-d47128bfccd0",
"name": "Salva roteiro",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"operation": "write",
"fileName": "=/tmp/youtubevideos/{{ $('Gera a slug do diretório').item.json.slug }}/roteiro.txt",
"options": {}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
-14560,
848
],
"id": "63ed4069-11f7-4e93-92ae-48a05806e78c",
"name": "Salva roteiro1"
},
{
"parameters": {
"jsCode": "const titulo =
TÍTULO:\n${titulo}\n\nDESCRIÇÃO:\n${descricao}\n\nTAGS:\n${tags}\n\n;\n\nconst safeFileName = titulo\n .toLowerCase()\n .normalize("NFD").replace(/[\u0300-\u036f]/g, "")\n .replace(/[^a-z0-9\\s-]/g, "")\n .replace(/\s+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-+|-+$/g, '');\n\nconst buffer = Buffer.from(conteudo, 'utf-8');\n\nreturn [\n {\n json: {},\n binary: {\n data: {\n data: buffer.toString('base64'),\n fileName:dados_de_publicacao.txt,\n mimeType: 'text/plain'\n }\n }\n }\n];\n"},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-14864,
416
],
"id": "3ca860e8-4023-4452-bc02-31ce583b61e3",
"name": "Monta o TXT em base64"
},
{
"parameters": {
"jsCode": "const tituloBruto =
roteiro.txt\n }\n },\n json: {}\n }\n];\n\n"},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-14784,
720
],
"id": "69b79998-bdaa-4cae-80e9-9cb935339cf4",
"name": "Gera roteiro em base64"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-17136,
528
],
"id": "102473b0-6734-4346-a4d7-c34a27ddcad2",
"name": "OpenAI Chat Model2",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Rewrite the text below while maintaining its style, structure, and impact, but reduce the total character count to strictly between 2300 and 2400 characters.\nDo not remove essential elements — only adjust phrases and wording naturally to shorten the text.\nReturn only the final version of the story.\n\nDo not exceed 2400 characters.\nOriginal text:\n{{ $json.output }}",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-17136,
336
],
"id": "33a2daff-31af-45c8-869d-65d58cfa2376",
"name": "Ajusta caracteres"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "0a7717c7-78d4-4fc3-a875-d0d5c8f6af6c",
"leftValue": "={{ $json.output.length }}",
"rightValue": 2500,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-17360,
608
],
"id": "b25adb3b-21fc-48f3-a43a-341508ac08ef",
"name": "Verifica qtd caracteres"
},
{
"parameters": {
"content": "## 05 - Atualiza a planilha",
"height": 704,
"width": 200,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-14352,
288
],
"typeVersion": 1,
"id": "df19e1c7-b864-4fb2-ab05-0ccc7adc0c48",
"name": "Sticky Note20"
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "={{ $item("0").$node["SETUP"].json["g_googledrive_planilha"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wEO-DdbWQX31qwsX7CZb3QDNHqdndCq35nkjTiDcBWE/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"id": "={{ $item("0").$node["SETUP"].json["id"] }}",
"titulo": "={{ $item("0").$node["PUBLICAÇÃO"].json["title"] }}",
"descricao": "={{ $item("0").$node["PUBLICAÇÃO"].json["description"] }}",
"tags": "={{ $item("0").$node["PUBLICAÇÃO"].json["tags"] }}",
"slug": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_slug"] }}"
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "slug",
"displayName": "slug",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "titulo",
"displayName": "titulo",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "descricao",
"displayName": "descricao",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "tags",
"displayName": "tags",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
-14304,
800
],
"id": "0302e3f3-0200-4863-8822-d8423005a998",
"name": "Atualiza planilha",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "2ZfVjfSEfhSmUzCQ",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"name": "=narracao.mp3",
"driveId": {
"__rl": true,
"value": "={{ $item("0").$node["DIRETÓRIO"].json["diretorio_id"] }}",
"mode": "id"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13952,
416
],
"id": "2d44b4c9-fc88-47b2-8469-fa313283a08e",
"name": "Salva áudio",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"resume": "webhook",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-14080,
800
],
"id": "455d29db-879b-4220-a513-9c8f8d61d373",
"name": "Wait1",
"webhookId": "1a6fdcf9-3197-4649-9363-768e9fb04073"
},
{
"parameters": {
"resource": "fileFolder",
"queryString": "narracao.mp3",
"filter": {
"folderId": {
"__rl": true,
"value": "={{$("DIRETÓRIO").item.json["diretorio_id"]}}",
"mode": "id"
},
"whatToSearch": "files"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13920,
800
],
"id": "c489f86c-e7ac-4e50-ae19-5d5c9a69c6d5",
"name": "Search files and folders",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $item("0").$node["Search files and folders"].json["id"] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-13760,
800
],
"id": "c6064dfd-0e83-4adc-b3b9-79f0ef942629",
"name": "Download file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "pLEpikpCDrPmfBpn",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "GPT-4O-MINI"
},
"messages": {
"values": [
{
"content": "You are an expert visual artist specialized in generating realistic, atmospheric extraterrestrial horror illustrations from narrative scripts. Your job is to extract visual prompts from horror story scripts, creating vivid, disturbing, and cinematically impactful scenes that capture the essence of alien encounters and cosmic terror.\n\nVISUAL STYLE:\nPhotographic realism with supernatural and surreal extraterrestrial elements\n\nGloomy, overcast lighting with soft, diffused shadows\n\nFoggy, misty, or cloudy atmosphere with washed-out colors to create mystery and unease\n\nDesaturated color palette: cold grays, muted blues, pale greens, silvery tones\n\nDisturbingly calm water surfaces, murky reflections, and eerie stillness\n\nDetailed and hyper-realistic textures, with painterly and cinematic composition\n\nEXTRATERRESTRIAL ELEMENTS:\nAlien beings with bizarre and grotesquely humanoid smiles, oversized black or glossy eyes\n\nElongated heads or necks, emerging partially from water or fog\n\nNon-human anatomy with distorted proportions, but mockingly human features (like unnatural grins)\n\nFixed, uncanny expressions that create psychological discomfort\n\nPresence of multiple entities, giving the sense of encroaching invasion\n\nNo visible technology required — horror emanates from presence and form\n\nCOMPOSITION RULES:\nCreatures should be arranged in eerie symmetry or scattered in unnatural positions\n\nLeave space for potential text overlay, especially near upper or lower thirds\n\nScenes must evoke isolation and intrusion at once\n\nDepth and perspective should immerse the viewer into the unsettling environment\n\nUse of water bodies, lakesides, or foggy landscapes to enhance narrative depth\n\nHORROR TECHNIQUES:\nUncanny valley effect with human-like but clearly unnatural traits\n\nStillness and symmetry to evoke unease\n\nJuxtaposition of tranquil environments with grotesque alien appearances\n\nFocus on disturbing contrasts: childlike smiles with predatory undertones\n\nSlight environmental distortions: unnatural reflections, warped vegetation, or impossible mist shapes\n\nLIGHTING AND ATMOSPHERE:\nSoft but chilling ambient lighting typical of overcast or post-rainfall skies\n\nMist and haze as compositional layers to obscure and reveal selectively\n\nCreepy silhouettes partially emerging from fog or water\n\nUse of unnatural cold lighting (e.g. white or pale green highlights) to enhance alien presence\n\nPrefer twilight, late afternoon, or cloudy day settings over pure night\n\nNo text or captions should appear in the images. Extract the most visually compelling and narratively important moments from the provided script to create standalone horror illustrations that capture the essence of extraterrestrial terror with a surreal, foggy, and psychologically disturbing tone.\n\nOutput format: return only a valid JSON array like this, where each prompt and image name is incremented sequentially:\n\n{\n "image_prompts": [\n {\n "prompt": "prompt_1",\n "image": "image_1"\n },\n {\n "prompt": "prompt_2",\n "image": "image_2"\n },\n {\n "prompt": "prompt_3",\n "image": "image_3"\n }\n ]\n}",
"role": "system"
},
{
"content": "=I will provide you with a script of maximum 2500 characters.\n\nI need you to extract {{ $item("0").$node["SETUP"].json["g_qtdimagens"] }} prompts in English to generate images using an AI API. Each image should describe a key moment that represents a specific point in the script or phrase, following the same order as the narration.\n\nGuidelines:\n- Each prompt must be 1 to 2 sentences long\n- The image cannot contain any text, captions, or written elements\n- Ensure each prompt is rich in details and specificity\n- Focus on the most visually impactful and narratively important moments\n- Maintain chronological order from the script\n- Emphasize atmospheric elements, character positioning, and environmental details\n- Include specific lighting, mood, and extraterrestrial/horror elements when relevant\n\nThis is the script content:\n{{ $item("0").$node["ROTEIRO"].json["roteiro"] }}"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-13216,
608
],
"id": "32277551-4a4b-43be-b0e1-8aef25eb592e",
"name": "Message a model",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "GPT-4O-MINI"
},
"messages": {
"values": [
{
"content": "=You are an expert visual artist specialized in generating realistic, atmospheric extraterrestrial horror illustrations from narrative scripts. Your job is to extract visual prompts from horror story scripts, creating vivid, disturbing, and cinematically impactful scenes that capture the essence of alien encounters and cosmic terror.\n\nVISUAL STYLE:\nPhotographic realism with supernatural and surreal extraterrestrial elements\n\nGloomy, overcast lighting with soft, diffused shadows\n\nFoggy, misty, or cloudy atmosphere with washed-out colors to create mystery and unease\n\nDesaturated color palette: cold grays, muted blues, pale greens, silvery tones\n\nDisturbingly calm water surfaces, murky reflections, and eerie stillness\n\nDetailed and hyper-realistic textures, with painterly and cinematic composition\n\nEXTRATERRESTRIAL ELEMENTS:\nAlien beings with bizarre and grotesquely humanoid smiles, oversized black or glossy eyes\n\nElongated heads or necks, emerging partially from water or fog\n\nNon-human anatomy with distorted proportions, but mockingly human features (like unnatural grins)\n\nFixed, uncanny expressions that create psychological discomfort\n\nPresence of multiple entities, giving the sense of encroaching invasion\n\nNo visible technology required — horror emanates from presence and form\n\nCOMPOSITION RULES:\nCreatures should be arranged in eerie symmetry or scattered in unnatural positions\n\nLeave space for potential text overlay, especially near upper or lower thirds\n\nScenes must evoke isolation and intrusion at once\n\nDepth and perspective should immerse the viewer into the unsettling environment\n\nUse of water bodies, lakesides, or foggy landscapes to enhance narrative depth\n\nHORROR TECHNIQUES:\nUncanny valley effect with human-like but clearly unnatural traits\n\nStillness and symmetry to evoke unease\n\nJuxtaposition of tranquil environments with grotesque alien appearances\n\nFocus on disturbing contrasts: childlike smiles with predatory undertones\n\nSlight environmental distortions: unnatural reflections, warped vegetation, or impossible mist shapes\n\nLIGHTING AND ATMOSPHERE:\nSoft but chilling ambient lighting typical of overcast or post-rainfall skies\n\nMist and haze as compositional layers to obscure and reveal selectively\n\nCreepy silhouettes partially emerging from fog or water\n\nUse of unnatural cold lighting (e.g. white or pale green highlights) to enhance alien presence\n\nPrefer twilight, late afternoon, or cloudy day settings over pure night\n\nNo text or captions should appear in the images. Extract the most visually compelling and narratively important moments from the provided script to create standalone horror illustrations that capture the essence of extraterrestrial terror with a surreal, foggy, and psychologically disturbing tone.\n\nOutput format: return only a valid JSON array like this, where each prompt and image name is incremented sequentially:\n\n{\n "image_prompts": [\n {\n "prompt": "prompt_1",\n "image": "image_1"\n },\n {\n "prompt": "prompt_2",\n "image": "image_2"\n },\n {\n "prompt": "prompt_3",\n "image": "image_3"\n }\n ]\n}",
"role": "system"
},
{
"content": "=I will provide you with a script of maximum 2500 characters.\n\nI need you to extract {{ $item("0").$node["SETUP"].json["g_qtdimagens"] }} prompts in English to generate images using an AI API. Each image should describe a key moment that represents a specific point in the script or phrase, following the same order as the narration.\n\nGuidelines:\n- Each prompt must be 1 to 2 sentences long\n- The image cannot contain any text, captions, or written elements\n- Ensure each prompt is rich in details and specificity\n- Focus on the most visually impactful and narratively important moments\n- Maintain chronological order from the script\n- Emphasize atmospheric elements, character positioning, and environmental details\n- Include specific lighting, mood, and extraterrestrial/horror elements when relevant\n\nThis is the script content:\n{{ $item("0").$node["ROTEIRO"].json["roteiro"] }}"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-13264,
336
],
"id": "bd0dac5a-3289-4933-9aba-d21249491759",
"name": "versao desatualizada",
"credentials": {
"openAiApi": {
"id": "KgnPjTNWscllPOSX",
"name": "OpenAi account"
}
}
}
],
"connections": {
"HTTP ElevenLabs": {
"main": [
[]
]
},
"Remove caracteres especiais": {
"main": [
[
{
"node": "ROTEIRO",
"type": "main",
"index": 0
}
]
]
},
"Google Drive": {
"main": [
[
{
"node": "Combina",
"type": "main",
"index": 0
}
]
]
},
"Limpa o diretorio /tmp/youtubevideos": {
"main": [
[
{
"node": "SETUP",
"type": "main",
"index": 0
}
]
]
},
"Cria o diretório no /tmp/youtubevideos se não existir": {
"main": [
[
{
"node": "lista",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Limpa o diretorio /tmp/youtubevideos",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Agente Roteiro",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Agente Publicação",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Agente Publicação",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Agente Roteiro": {
"main": [
[
{
"node": "Verifica qtd caracteres",
"type": "main",
"index": 0
}
]
]
},
"Agente Publicação": {
"main": [
[
{
"node": "PUBLICAÇÃO",
"type": "main",
"index": 0
}
]
]
},
"ROTEIRO": {
"main": [
[
{
"node": "Agente Publicação",
"type": "main",
"index": 0
}
]
]
},
"SETUP": {
"main": [
[
{
"node": "Agente Roteiro",
"type": "main",
"index": 0
}
]
]
},
"PUBLICAÇÃO": {
"main": [
[
{
"node": "Gera a slug do diretório",
"type": "main",
"index": 0
}
]
]
},
"Gera a slug do diretório": {
"main": [
[
{
"node": "Cria o diretório no /tmp/youtubevideos se não existir",
"type": "main",
"index": 0
},
{
"node": "Combina",
"type": "main",
"index": 1
},
{
"node": "Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Combina": {
"main": [
[
{
"node": "DIRETÓRIO",
"type": "main",
"index": 0
}
]
]
},
"DIRETÓRIO": {
"main": [
[
{
"node": "Monta o TXT em base64",
"type": "main",
"index": 0
},
{
"node": "Gera roteiro em base64",
"type": "main",
"index": 0
}
]
]
},
"Monta o TXT em base64": {
"main": [
[
{
"node": "Salva no GDrive",
"type": "main",
"index": 0
}
]
]
},
"Gera roteiro em base64": {
"main": [
[
{
"node": "Salva roteiro",
"type": "main",
"index": 0
},
{
"node": "Atualiza planilha",
"type": "main",
"index": 0
},
{
"node": "Salva roteiro1",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Ajusta caracteres",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ajusta caracteres": {
"main": [
[
{
"node": "Remove caracteres especiais",
"type": "main",
"index": 0
}
]
]
},
"Verifica qtd caracteres": {
"main": [
[
{
"node": "Ajusta caracteres",
"type": "main",
"index": 0
}
],
[
{
"node": "Remove caracteres especiais",
"type": "main",
"index": 0
}
]
]
},
"Atualiza planilha": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Search files and folders",
"type": "main",
"index": 0
}
]
]
},
"Search files and folders": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
},
"Download file": {
"main": [
[
{
"node": "Salva áudio no TMP",
"type": "main",
"index": 0
},
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[]
]
},
"versao desatualizada": {
"main": [
[]
]
}
},
"pinData": {
"Agente Roteiro": [
{
"output": "A luz da lua filtrava-se através das copas das árvores em câmara lenta, como se a própria noite tivesse sido possuída por uma essência estranha. Naquele bosque isolado, onde o ar pulsava com um som suave e constante, o sussurro do vento era um convite para aquilo que não deveria ser encontrado. Clara sempre achara o local perfeito para suas escapadas da rotina insuportável da cidade. Contudo, naquela noite, algo estava péssimo.\n\nSentada numa pedra fria, ela notou pequenos movimentos no canto de sua visão — formas indistintas dançando nas sombras. Um calafrio percorreu sua espinha, mas seguiu observando. Objetos deixados para trás pela natureza pareciam agora formar padrões que burlavam sua compreensão. As folhas, ao invés de caírem, levitavam, como se uma força invisível as manipulasse. Um frio súbito inundou-lhe a mente, uma percepção de que não estava sozinha.\n\nA sensação de vigilância tornou-se palpável. Clara começou a visualizar silhuetas tortuosas que emergiam das árvores, mas mesmo faltando a luz, os contornos expunham-se a uma curva antinatural. “Ninguém mais está aqui”, pensou, enquanto o eco de seus próprios pensamentos reverberava como um alerta buscando abrigo. O medo tomou as rédeas, transformando-se em uma convulsão na certeza de que olhos iam muito além do que poderia ver.\n\nNaquele crepúsculo disforme, Clara não pôde evitar as vozes. Um sussurro colossal, uma comunicação que parecia vir de mil dimensões, um convite e uma maldição. Cada palavra era um abismo, levando-a a questionar a própria tessitura da realidade. Ao olhar para as sombras, uma vontade profunda enredou sua mente — o desejo de entender aquele desconhecido.\n\nEntão, ela viu. Uma forma enorme, um deslizar de texturas impossíveis que desafiava toda lógica — tentáculos, esferas e fractais que se contorciam em um balé grotesco. O que era aquele ser que flutuava entre as árvores? Aquilo não era um medo personificado; era a própria essência do terror cósmico, uma presença que desalinhava a compreensão humana. Havia um segredo ali, algo que lotava o universo de formas alienígenas.\n\nEnquanto a realidade se esvaía, Clara tentava gritar, mas apenas um sussurro hesitante emergiu de seus lábios. Ao final, a presença a envolveu, e a consciência da garota diluiu-se, perdida entre as nebulosas visões. No silêncio do bosque, o uivo da noite era a única resposta, ecoando a pergunta que nunca poderia ser feita: o que mais habita as sombras?"
}
],
"Agente Publicação": [
{
"output": {
"title": "ALIENÍGENAS NO ESCURO: O TERROR DAS SOMBRAS...",
"description": "Esta história realmente aconteceu. Um encontro aterrorizante com extraterrestres deixou testemunhas sem palavras. Você acredita em vida extraterrestre? Inscreva-se para mais histórias assustadoras!",
"tags": "alien, ufo, terror, mistério, sobrenatural, sombras, encontros, medo, histórias de terror, vida extraterrestre"
}
}
]
},
"meta": {
"instanceId": "39a8a104dbe850ab00d468cf41a55e33f5fd30b38f36bcb4b2dfd0105f9f748e"
}
}
Share the output returned by the last node
The output that appears in the workflow is pinned, that is, if I unpin none of it, it will definitely work, and I will not have any output to provide
Debug info
core
storage
pruning
client
Generated at: 2025-09-17T01:25:22.621Z}