Flujo de trabajo simple

Intermedio

Este es unAI, IT Opsflujo de automatización del dominio deautomatización que contiene 11 nodos.Utiliza principalmente nodos como Code, Slack, Webhook, Aggregate, GoogleDrive, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Verificación automatizada de calidad de traducción de documentos usando Straker, Google Drive y Slack

Requisitos previos
  • Bot Token de Slack o URL de Webhook
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Credenciales de API de Google Drive
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "UlhQJ6EtKLNQ0D0B",
  "meta": {
    "instanceId": "80505302fd25f9874da713d840f99df997e6fbacf51f09d5b5fa57decd258ea9",
    "templateCredsSetupCompleted": true
  },
  "name": "Simple Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "3686255e-4eee-41aa-9046-76ef2d0159f5",
      "name": "Aplanar",
      "type": "n8n-nodes-base.code",
      "position": [
        200,
        740
      ],
      "parameters": {
        "jsCode": "/**\n * n8n “Function” node — Run Once for All Items\n * ──> emits one item per target-file URL, with\n *      • filename tagged <base>_<site_shortname>.<ext>\n *      • original language_uuid preserved\n */\nreturn items.flatMap(({ json: { data } }) => {\n  if (!data?.source_files) {\n    throw new Error('No source_files array found in job payload');\n  }\n\n  // uuid → site_shortname\n  const shortCode = Object.fromEntries(\n    (data.target_languages ?? []).map(l => [\n      l.uuid.toLowerCase(),\n      l.site_shortname ?? l.code,\n    ]),\n  );\n\n  return data.source_files.flatMap(sf =>\n    (sf.target_files ?? []).map(tf => {\n      const short = shortCode[tf.language_uuid.toLowerCase()] || tf.language_uuid;\n      const [name, ext = ''] = sf.filename.split(/(?=\\.[^\\.]+$)/); // split at last dot\n\n      return {\n        json: {\n          url: tf.url,\n          filename: `${name}_${short}${ext}`,\n          source_file_uuid: sf.file_uuid,\n          target_file_uuid: tf.target_file_uuid,\n          language_uuid: tf.language_uuid,\n          status: tf.status,\n        },\n      };\n    }),\n  );\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f8a3825e-2091-4359-ad1a-9ac9ed4423a0",
      "name": "Observar Carpeta de Entrada",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -240,
        480
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1jS3LMLVuHbsKFmtTRiRmUPUBO-CKqsfb",
          "cachedResultUrl": "",
          "cachedResultName": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "53ab19cd-4abc-463c-9c98-00e4fe843ef1",
      "name": "Descargar Archivos",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -20,
        480
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "on4yFmHCAe4A3uke",
          "name": "Google Drive account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "a29304d4-4d30-4d36-9db1-0c0412c946a9",
      "name": "Esperar Finalización",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -240,
        740
      ],
      "webhookId": "6540f764-161d-4627-b7c2-a78a992daf1d",
      "parameters": {
        "path": "6540f764-161d-4627-b7c2-a78a992daf1d",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "0e4c0d6c-db2d-4625-9f57-235342ce791e",
      "name": "Guardar en Carpeta de Salida",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        640,
        740
      ],
      "parameters": {
        "name": "={{ $('Flatten').item.json.filename }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "16Ke3E8wSbTVfuOUXrex-ueNLuyIRhK95",
          "cachedResultUrl": "",
          "cachedResultName": ""
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "on4yFmHCAe4A3uke",
          "name": "Google Drive account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "5152a976-9ea9-48f6-bbe1-3bbbff90f13b",
      "name": "Notificar",
      "type": "n8n-nodes-base.slack",
      "position": [
        1080,
        740
      ],
      "webhookId": "516ba7f2-c441-4cf9-a045-ef8842b273fb",
      "parameters": {
        "text": "={{ $('Fetch Job Info').first().json.data.title }} {{ $('Fetch Job Info').first().json.data.status }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C08NJCEJS8Y",
          "cachedResultName": "slack-bots"
        },
        "otherOptions": {}
      },
      "notesInFlow": true,
      "typeVersion": 2.3
    },
    {
      "id": "e9cac943-64d4-4a3e-99cb-e4f1ac8cbfaf",
      "name": "Agregar",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        860,
        740
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "21827824-54e7-458a-bab7-8fb3f83421ab",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        260
      ],
      "parameters": {
        "width": 720,
        "height": 840,
        "content": "# Straker Verify n8n Node\n\nThis node allows you to interact with the Straker Verify API to manage translation projects, API keys, user information, and files directly within your n8n workflows.\n\n## Configuration\n\n**Credentials**: Connect your Straker Verify account by creating a new credential in n8n using your Straker Verify API Key. You can find more information on obtaining an API key in the [Straker Verify API documentation](https://api-verify.straker.ai/docs).\n\n## How It's Used\n\n### Workflow 1: Submit for Translation\n\n1.  **Trigger (e.g., `Watch Input Folder` on Google Drive)**: Detects new files.\n2.  **Download File (e.g., `Download Files` from Google Drive)**: Fetches the file content.\n3.  **`Start Translation` (Straker Verify Node - Project: Create)**: Sends the file to Straker Verify to begin the translation process. This step involves specifying target languages, a Straker workflow, and a project title.\n\n### Workflow 2: Retrieve Translation\n\n1.  **Trigger (e.g., `Wait for Completion` via Webhook)**: Listens for a notification from Straker Verify (if a callback URL was configured) that the translation is ready.\n2.  **`Fetch Job Info` (Straker Verify Node - Project: Get)**: Retrieves details about the completed translation job using its ID.\n3.  **`Grab Translation` (Straker Verify Node - File: Get)**: Downloads the translated file(s) from Straker Verify.\n4.  **Save & Notify (e.g., `Save to Output Folder` on Google Drive & `Notify` via Slack)**: Stores the translated file and informs users.\n\nThis node helps automate your translation tasks by connecting Straker Verify with other services in n8n."
      },
      "typeVersion": 1
    },
    {
      "id": "5f4e70ca-2db9-4f52-94b3-f65c2c67bbe5",
      "name": "Obtener Información del Trabajo",
      "type": "n8n-nodes-straker-verify.strakerVerify",
      "position": [
        -20,
        740
      ],
      "parameters": {
        "operation": "get",
        "projectId": "={{ $json.body.job_uuid }}"
      },
      "credentials": {
        "strakerVerifyApi": {
          "id": "iRfa1PqR7RY6GKtJ",
          "name": "Straker Verify account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "180231a6-563a-4843-a450-98f67cda6215",
      "name": "Capturar Traducción",
      "type": "n8n-nodes-straker-verify.strakerVerify",
      "position": [
        420,
        740
      ],
      "parameters": {
        "fileId": "={{ $json.target_file_uuid }}",
        "resource": "file"
      },
      "credentials": {
        "strakerVerifyApi": {
          "id": "iRfa1PqR7RY6GKtJ",
          "name": "Straker Verify account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "b0cd4ece-949b-43d1-8229-2c6988dac15e",
      "name": "Iniciar Traducción",
      "type": "n8n-nodes-straker-verify.strakerVerify",
      "position": [
        200,
        480
      ],
      "parameters": {
        "title": "TEST 12",
        "languages": [],
        "operation": "create",
        "workflowId": "78ed818e-3655-4bd2-b347-dcce14e58c1c"
      },
      "notesInFlow": true,
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "173445a9-d8f0-4f31-a46d-8671eabf98a8",
  "connections": {
    "3686255e-4eee-41aa-9046-76ef2d0159f5": {
      "main": [
        [
          {
            "node": "180231a6-563a-4843-a450-98f67cda6215",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e9cac943-64d4-4a3e-99cb-e4f1ac8cbfaf": {
      "main": [
        [
          {
            "node": "5152a976-9ea9-48f6-bbe1-3bbbff90f13b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "53ab19cd-4abc-463c-9c98-00e4fe843ef1": {
      "main": [
        [
          {
            "node": "b0cd4ece-949b-43d1-8229-2c6988dac15e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f4e70ca-2db9-4f52-94b3-f65c2c67bbe5": {
      "main": [
        [
          {
            "node": "3686255e-4eee-41aa-9046-76ef2d0159f5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "180231a6-563a-4843-a450-98f67cda6215": {
      "main": [
        [
          {
            "node": "0e4c0d6c-db2d-4625-9f57-235342ce791e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f8a3825e-2091-4359-ad1a-9ac9ed4423a0": {
      "main": [
        [
          {
            "node": "53ab19cd-4abc-463c-9c98-00e4fe843ef1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a29304d4-4d30-4d36-9db1-0c0412c946a9": {
      "main": [
        [
          {
            "node": "5f4e70ca-2db9-4f52-94b3-f65c2c67bbe5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0e4c0d6c-db2d-4625-9f57-235342ce791e": {
      "main": [
        [
          {
            "node": "e9cac943-64d4-4a3e-99cb-e4f1ac8cbfaf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Inteligencia Artificial, Operaciones de TI

¿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.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos11
Categoría2
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34