Guardar automáticamente los adjuntos de Gmail en Google Drive

Intermedio

Este es unFile Managementflujo de automatización del dominio deautomatización que contiene 6 nodos.Utiliza principalmente nodos como If, GoogleDrive, GmailTrigger. Guardar automáticamente adjuntos de Gmail en Google Drive

Requisitos previos
  • Credenciales de API de Google Drive
  • Cuenta de Google y credenciales de API de Gmail
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
{
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
  },
  "nodes": [
    {
      "id": "6f21b176-7f42-4cbb-938e-5ffd61aac490",
      "name": "Subir a Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -720,
        -320
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_DRIVE_FOLDER_ID"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "9ff0cc89-232e-4720-8ffd-ad3a516d0fd2",
      "name": "Disparador de Gmail",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -1248,
        -320
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ab199d88-e3c0-4ce4-96af-fe338e45484e",
      "name": "If (tiene archivos adjuntos)",
      "type": "n8n-nodes-base.if",
      "position": [
        -976,
        -320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "has-attachments",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.attachments.length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3b2f527f-7376-4a5e-b937-44877b90046d",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1312,
        -880
      ],
      "parameters": {
        "color": 7,
        "width": 832,
        "height": 768,
        "content": "## Gmail Attachment Extractor to Google Drive\n\nHow It Works\nThis workflow operates in three main steps:\n\nGmail New Email Trigger:\n\nThe workflow starts with a Gmail Trigger node, set to monitor for new emails in your specified Gmail inbox (e.g., your primary inbox).\n\nIt checks for emails that contain attachments.\n\nConditional Check (Optional but Recommended):\n\nAn If node checks if the email actually has attachments. This prevents errors if an email without an attachment somehow triggers the workflow.\n\nUpload to Google Drive:\n\nA Google Drive node receives the email data and its attachments.\n\nIt's configured to upload these attachments to a specific folder in your Google Drive.\n\nThe attachments are named dynamically based on their original filenames.\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "48285db9-5075-4bd4-8642-5749267324b8",
      "name": "Nota adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -928
      ],
      "parameters": {
        "color": 7,
        "height": 880,
        "content": "## Setup Steps\nTo get this workflow up and running, follow these instructions:\n\nStep 1: Create Gmail and Google Drive Credentials in n8n\n\nIn your n8n instance, click on Credentials in the left sidebar.\n\nClick New Credential.\n\nSearch for and select \"Gmail OAuth2 API\" and follow the authentication steps with your Google account. Save it.\n\nClick New Credential again.\n\nSearch for and select \"Google Drive OAuth2 API\" and follow the authentication steps with your Google account. Save it.\n\nMake note of the Credential Names (e.g., \"My Gmail Account\", \"My Google Drive Account\").\n\nStep 2: Create a Destination Folder in Google Drive\n\nGo to your Google Drive (drive.google.com).\n\nCreate a new folder where you want to save the email attachments (e.g., Email Attachments Archive).\n\nCopy the Folder ID from the URL (e.g., https://drive.google.com/drive/folders/YOUR_FOLDER_ID_HERE)."
      },
      "typeVersion": 1
    },
    {
      "id": "1cf8d9e0-1d2b-4d9e-a1bc-5e4713ffb848",
      "name": "Nota adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -832
      ],
      "parameters": {
        "color": 7,
        "height": 688,
        "content": "##  Configure the Nodes\n\nGmail Trigger Node:\n\nSelect your Gmail credential under the \"Credentials\" section.\n\nThe default settings monitor new emails with attachments. You can adjust Polling Interval if needed.\n\nUpload to Google Drive Node:\n\nSelect your Google Drive credential under the \"Credentials\" section.\n\nIn the \"Folder ID\" field, replace YOUR_GOOGLE_DRIVE_FOLDER_ID with the ID you copied in Step 2.\n\nThe File Name is set dynamically to ={{ $node[\"Gmail Trigger\"].json[\"attachments\"][0][\"filename\"] }} to use the original attachment name.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "ab199d88-e3c0-4ce4-96af-fe338e45484e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ab199d88-e3c0-4ce4-96af-fe338e45484e": {
      "main": [
        [
          {
            "node": "6f21b176-7f42-4cbb-938e-5ffd61aac490",
            "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 - Gestión de archivos

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Filtrado automatizado de currículos con GPT-4o y manejo de errores - Proceso de Google Sheets y Google Drive
Filtrado automatizado de currículums con GPT-4o y manejo de errores: proceso de Google Sheets y Drive
If
Set
Gmail
+
If
Set
Gmail
34 NodosDavid Olusola
Creación de contenido
Guardar automáticamente grabaciones de Zoom en Google Drive y registrar la reunión en Airtable
Guardar automáticamente las grabaciones de Zoom en Google Drive y registrar la reunión en Airtable
Code
Webhook
Airtable
+
Code
Webhook
Airtable
7 NodosDavid Olusola
Gestión de archivos
Archivar automáticamente artículos antiguos de WordPress a estado de borrador
Archivado automático de artículos antiguos de WordPress a estado de borrador
If
Email Send
Wordpress
+
If
Email Send
Wordpress
7 NodosDavid Olusola
Gestión de archivos
Soporte al cliente impulsado por IA: automatización de correo electrónico, base de conocimiento y escalado a humano
AIcorreo electrónico支持系统:integraciónGmail、Gemini、GPT-4、SlackyGoogle Sheetsdeflujo de trabajo程
Set
Gmail
Slack
+
Set
Gmail
Slack
26 NodosDavid Olusola
Gestión de tickets
Generador de Podcasts con IA con Suscripción RSS y Voz de ElevenLabs
Generador de Podcasts con IA: Integra suscripción RSS y voz de ElevenLabs
If
Code
Gmail
+
If
Code
Gmail
11 NodosDavid Olusola
Inteligencia Artificial
Filtrado de CVs con IA: Gmail, GPT-4o y Hojas de Cálculo de Google - Automatización del Proceso de Contratación
Filtrado de CVs con IA: Gmail, GPT-4o y Hojas de Cálculo de Google - Automatización del Proceso de Contratación
Set
Switch
Google Drive
+
Set
Switch
Google Drive
23 NodosDavid Olusola
Creación de contenido
Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos6
Categoría1
Tipos de nodos4
Descripción de la dificultad

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

Autor
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34