AutomationFlowsData & Sheets › Formularios T-shirt Con Db

Formularios T-shirt Con Db

Formularios T-shirt con DB. Uses gmail, googleSheetsTrigger, postgres, googleSheets. Event-driven trigger; 24 nodes.

Event trigger★★★★☆ complexity24 nodesGmailGoogle Sheets TriggerPostgresGoogle Sheets
Data & Sheets Trigger: Event Nodes: 24 Complexity: ★★★★☆ Added:

This workflow follows the Gmail → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Formularios T-shirt con DB",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1168,
        -512
      ],
      "id": "46b251de-7b5c-4a88-92af-9d281f6f97d6",
      "name": "Unir ramas"
    },
    {
      "parameters": {
        "sendTo": "jdrangel00@outlook.com",
        "subject": "Actualizacion de camisetas - n8n",
        "message": "=<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Notificaci\u00f3n de Inventario</title>\n</head>\n<body style=\"margin: 0; padding: 0; font-family: Arial, sans-serif; background-color: #f4f4f4;\">\n    <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #f4f4f4; padding: 20px;\">\n        <tr>\n            <td align=\"center\">\n                <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #ffffff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1);\">\n                    \n                    <!-- Header -->\n                    <tr>\n                        <td style=\"background-color: #4CAF50; padding: 30px; text-align: center;\">\n                            <h1 style=\"margin: 0; color: #ffffff; font-size: 24px;\">\u2713 Proceso Completado</h1>\n                        </td>\n                    </tr>\n                    \n                    <!-- Content -->\n                    <tr>\n                        <td style=\"padding: 40px 30px;\">\n                            <h2 style=\"color: #333333; margin-top: 0;\">Actualizaci\u00f3n de Inventario</h2>\n                            <p style=\"color: #666666; line-height: 1.6; font-size: 16px;\">\n                                El proceso de automatizaci\u00f3n de inventario se ha completado exitosamente.\n                            </p>\n                            \n                            <!-- Info Box -->\n                            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #f8f9fa; border-left: 4px solid #4CAF50; margin: 20px 0;\">\n                                <tr>\n                                    <td style=\"padding: 20px;\">\n                                        <p style=\"margin: 5px 0; color: #333333;\"><strong>Fecha:</strong> {{ $now.format('dd/MM/yyyy') }}</p>\n                                        <p style=\"margin: 5px 0; color: #333333;\"><strong>Hora:</strong> {{ $now.format('HH:mm:ss') }}</p>\n                                        \n                                        <p style=\"margin: 5px 0; color: #333333;\"><strong>Estado:</strong> <span style=\"color: #4CAF50;\">Exitoso</span></p>\n                                    </td>\n                                </tr>\n                            </table>\n                            \n                            <p style=\"color: #666666; line-height: 1.6; font-size: 16px;\">\n                                Todos los cambios han sido sincronizados correctamente con Google Sheets.\n                            </p>\n                            \n                            <!-- Button -->\n                            <table cellpadding=\"0\" cellspacing=\"0\" style=\"margin: 30px 0;\">\n                                <tr>\n                                    <td style=\"background-color: #4CAF50; border-radius: 4px; text-align: center;\">\n\n\n\n<h1>Solicitudes exitosas</h1>\n\n<div style=\"text-align: left; background-color: white;\">\n<br>\n{{ $json.data.filter(e => e.Verificado).map(element => `\n  <div style=\"text-align: left; background-color: white;\">Nombre: ${element.Nombre} - estado: ${element.Verificado ? \"Con \u00e9xito\" : \"Sin \u00e9xito\"} - Talla: ${element[\"Talla de camiseta\"]}</div>`) }}\n</div>\n\n<h1>Solicitudes con errores</h1>\n\n\n<div style=\"text-align: left; background-color: white;\">\n<br>\n{{ $json.data.filter(e => !e.Verificado).map(element => `\n  <div style=\"text-align: left; background-color: white;\">Nombre: ${element.Nombre} - estado: ${element.Verificado ? \"Con \u00e9xito\" : \"Sin \u00e9xito\"} - Talla: ${element[\"Talla de camiseta\"]}</div>`) }}\n</div>\n                                        \n                                    </td>\n                                </tr>\n                            </table>\n                        </td>\n                    </tr>\n                    \n                    <!-- Footer -->\n                    <tr>\n                        <td style=\"background-color: #f8f9fa; padding: 20px; text-align: center; border-top: 1px solid #e0e0e0;\">\n                            <p style=\"margin: 0; color: #999999; font-size: 12px;\">\n                                Este es un mensaje autom\u00e1tico generado por n8n<br>\n                                Por favor no responder a este correo\n                            </p>\n                        </td>\n                    </tr>\n                    \n                </table>\n            </td>\n        </tr>\n    </table>\n</body>\n</html>",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1760,
        -496
      ],
      "id": "df8f42d8-b4b1-4624-9c78-e94a2cdd3820",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU",
          "mode": "list",
          "cachedResultName": "T-Shirt (respuestas)",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1166230884,
          "mode": "list",
          "cachedResultName": "Respuestas de formulario 1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit#gid=1166230884"
        },
        "event": "rowAdded",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        -560,
        -112
      ],
      "id": "e33cacc1-5064-486e-9072-b9c8cacc79af",
      "name": "Sheets Trigger - jdrangel00",
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Pendiente al sheet\nCuando hay un nuevo registro en el sheet, se ejecuta.",
        "height": 288,
        "width": 320,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -672,
        -224
      ],
      "id": "33ab3265-0252-493c-a4f8-e04dc7133f06",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        528,
        -128
      ],
      "id": "dd7fbabc-8deb-4ca8-a62a-82873bee2c13",
      "name": "Barrer cada solicitud nueva"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Fin del ciclo",
      "typeVersion": 1,
      "position": [
        2064,
        -128
      ],
      "id": "5b85ca87-3828-4019-8709-baf90054e1bc"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "select * from public.inventory where size = '{{ $json['Talla de camiseta'].substring(0,2).replaceAll('--','') }}'",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        928,
        -112
      ],
      "id": "77d83ee8-1fd8-4e44-b42c-289bb6377f84",
      "name": "obtener inventario x talla",
      "alwaysOutputData": true,
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "ba505a42-6c8e-4aa7-b705-411112b9f6f7",
              "leftValue": "={{ $json.in_stock }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              }
            },
            {
              "id": "932417c9-c58a-419c-8cdb-d8ea971a6696",
              "leftValue": "={{ $json.in_stock }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        1136,
        -112
      ],
      "id": "68440473-13c0-430e-935b-7c88634e8d40",
      "name": "\u00bfHay existencias?"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cc26fd0b-595d-43c7-a4ab-2887d40b0853",
              "name": "id",
              "value": "={{ $json.id }}",
              "type": "number"
            },
            {
              "id": "dcccf7db-6c1a-4688-b42d-de72c0e89ea6",
              "name": "product_name",
              "value": "={{ $json.product_name }}",
              "type": "string"
            },
            {
              "id": "ba8a3a19-275a-43d7-bb4a-110f2dd72254",
              "name": "size",
              "value": "={{ $json.size }}",
              "type": "string"
            },
            {
              "id": "cb8bb86c-09e9-4525-8304-689fc40c19b2",
              "name": "in_stock",
              "value": "={{ ($json.in_stock - 1 > 0) ? $json.in_stock : 0 }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1392,
        -128
      ],
      "id": "573476d0-694d-47d5-98a0-091998f9b737",
      "name": "restar inventario"
    },
    {
      "parameters": {
        "operation": "update",
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "table": {
          "__rl": true,
          "value": "inventory",
          "mode": "list",
          "cachedResultName": "inventory"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $json.id }}",
            "in_stock": "={{ $json.in_stock }}"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "product_name",
              "displayName": "product_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "size",
              "displayName": "size",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "in_stock",
              "displayName": "in_stock",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        1600,
        -128
      ],
      "id": "3163f121-9e91-45b0-84ff-8caa0ffaeeb3",
      "name": "Actualizar inventario en DB",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Validacion de correo y verificado\nSi titene correo y no est\u00e1 verificado, pasa a realizarse la solicitud.",
        "height": 288,
        "width": 400,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -224
      ],
      "typeVersion": 1,
      "id": "9f6081ef-ddb9-46d0-ac88-8dad9f428cb7",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Procesamiento de la solicitud - correos validos y sin procesar - verificado false\nSe revisan los inventarios y se procesan los casos.",
        "height": 288,
        "width": 1760,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -224
      ],
      "typeVersion": 1,
      "id": "ab219d8c-fd6c-4356-81ef-a2b66824ef49",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU",
          "mode": "list",
          "cachedResultName": "T-Shirt (respuestas)",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1166230884,
          "mode": "list",
          "cachedResultName": "Respuestas de formulario 1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit#gid=1166230884"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Talla de camiseta": "={{ $json.size }}",
            "Fecha de verificacion": "={{ $now }}",
            "Verificado": "={{ true }}",
            "Direcci\u00f3n de correo electr\u00f3nico": "={{ $('\u00bfHay correo en la solicitud y es verificado?').item.json['Direcci\u00f3n de correo electr\u00f3nico'] }}",
            "Nombre": "={{ $('Barrer cada solicitud nueva').item.json.Nombre }}"
          },
          "matchingColumns": [
            "Direcci\u00f3n de correo electr\u00f3nico"
          ],
          "schema": [
            {
              "id": "Marca temporal",
              "displayName": "Marca temporal",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Nombre",
              "displayName": "Nombre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Talla de camiseta",
              "displayName": "Talla de camiseta",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Otros comentarios",
              "displayName": "Otros comentarios",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Direcci\u00f3n de correo electr\u00f3nico",
              "displayName": "Direcci\u00f3n de correo electr\u00f3nico",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Verificado",
              "displayName": "Verificado",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Fecha de verificacion",
              "displayName": "Fecha de verificacion",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1808,
        -128
      ],
      "id": "d4bb356b-6545-49d6-ab69-04806e1d46e8",
      "name": "Actaulizar respuestas",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU",
          "mode": "list",
          "cachedResultName": "T-Shirt (respuestas)",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1166230884,
          "mode": "list",
          "cachedResultName": "Respuestas de formulario 1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit#gid=1166230884"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Direcci\u00f3n de correo electr\u00f3nico": "={{ $('Barrer cada solicitud nueva').item.json['Direcci\u00f3n de correo electr\u00f3nico'] }}",
            "Verificado": "={{ false }}",
            "Fecha de verificacion": "={{ $now }}",
            "Nombre": "={{ $('Barrer cada solicitud nueva').item.json.Nombre }}",
            "Talla de camiseta": "={{ $('Barrer cada solicitud nueva').item.json['Talla de camiseta'] }}"
          },
          "matchingColumns": [
            "Direcci\u00f3n de correo electr\u00f3nico"
          ],
          "schema": [
            {
              "id": "Marca temporal",
              "displayName": "Marca temporal",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Nombre",
              "displayName": "Nombre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Talla de camiseta",
              "displayName": "Talla de camiseta",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Otros comentarios",
              "displayName": "Otros comentarios",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Direcci\u00f3n de correo electr\u00f3nico",
              "displayName": "Direcci\u00f3n de correo electr\u00f3nico",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Verificado",
              "displayName": "Verificado",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Fecha de verificacion",
              "displayName": "Fecha de verificacion",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1248,
        96
      ],
      "id": "a58a68e0-448b-4f2b-84ef-1f4837ea5512",
      "name": "Actualiza solicitud sin inventario-talla existente",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU",
          "mode": "list",
          "cachedResultName": "T-Shirt (respuestas)",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1166230884,
          "mode": "list",
          "cachedResultName": "Respuestas de formulario 1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UzvbWYRieXSUD4LqL2Pw5gTT4CLmj2ova01rl1AOkvU/edit#gid=1166230884"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Verificado": "={{ false }}",
            "Fecha de verificacion": "={{ $now }}",
            "Nombre": "={{ $json.Nombre }}",
            "Talla de camiseta": "={{ $json['Talla de camiseta'] }}",
            "row_number": 0
          },
          "matchingColumns": [
            "Nombre"
          ],
          "schema": [
            {
              "id": "Marca temporal",
              "displayName": "Marca temporal",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Nombre",
              "displayName": "Nombre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Talla de camiseta",
              "displayName": "Talla de camiseta",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Otros comentarios",
              "displayName": "Otros comentarios",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Direcci\u00f3n de correo electr\u00f3nico",
              "displayName": "Direcci\u00f3n de correo electr\u00f3nico",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Verificado",
              "displayName": "Verificado",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Fecha de verificacion",
              "displayName": "Fecha de verificacion",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        816,
        -496
      ],
      "id": "2bcdf755-df83-4233-b9e3-5e0e17445b1d",
      "name": "Actualiza solicitud sin inventario-talla existente1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Procesamiento de no verificados.\n",
        "height": 288,
        "width": 384,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -592
      ],
      "typeVersion": 1,
      "id": "1c4de040-19e5-4902-9ca9-bad9940482d1",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "ee3573b8-4a79-4a24-bf97-43ce5ba68b48",
              "leftValue": "={{ $json['Fecha de verificacion'] }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        464,
        -512
      ],
      "id": "d381db6e-5137-4f7a-b5ca-f5506e0fa892",
      "name": "\u00bfYa fue verificado?"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "19eeb073-bab1-419e-a601-38ef93abb0cf",
              "leftValue": "={{ $json['Direcci\u00f3n de correo electr\u00f3nico'] }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "id": "cebde0f5-d2ee-44ce-8690-5db75d5bde52",
              "leftValue": "={{ $json['Fecha de verificacion'] }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        224,
        -112
      ],
      "id": "8c473e5c-fa2f-4226-8ba8-f2d82454cafc",
      "name": "\u00bfHay correo en la solicitud y es verificado?"
    },
    {
      "parameters": {
        "content": "## Sin inventario\nSi no existe inventario, se actualiza el sheet de solicitud\ncomo verificado false.",
        "height": 224,
        "width": 608
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        80
      ],
      "typeVersion": 1,
      "id": "7eb0885e-f5c6-4203-a647-34258ab3bdde",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.Verificado = Boolean(item.json.Verificado)\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -208,
        -112
      ],
      "id": "fe64dcb4-ad3d-4597-b536-bbbbf899fa55",
      "name": "Convertimos verificado en un Boolean"
    },
    {
      "parameters": {
        "content": "## Booelans\nAjustamos los booleans de verificado correctamente",
        "height": 288
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -224
      ],
      "typeVersion": 1,
      "id": "82297ac7-4213-4afa-a016-0d177e8f0b21",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1504,
        -496
      ],
      "id": "4b4b8295-5fde-4465-b546-2076144e1c61",
      "name": "Aggregate"
    },
    {
      "parameters": {
        "content": "## Recibimos todas las ramas y esperamos\n",
        "height": 304,
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -608
      ],
      "typeVersion": 1,
      "id": "322c20db-f3b4-4343-970a-edb528efe38e",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "## Unificamos data\nUnimos data en 1 sola salida para el mail de notificacion.",
        "height": 304,
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        -608
      ],
      "typeVersion": 1,
      "id": "1ddeb17c-c6fd-489f-bc9b-c650e5dd93c4",
      "name": "Sticky Note7"
    }
  ],
  "connections": {
    "Unir ramas": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Trigger - jdrangel00": {
      "main": [
        [
          {
            "node": "Convertimos verificado en un Boolean",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Barrer cada solicitud nueva": {
      "main": [
        [
          {
            "node": "Unir ramas",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "obtener inventario x talla",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fin del ciclo": {
      "main": [
        [
          {
            "node": "Barrer cada solicitud nueva",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "obtener inventario x talla": {
      "main": [
        [
          {
            "node": "\u00bfHay existencias?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00bfHay existencias?": {
      "main": [
        [
          {
            "node": "restar inventario",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Actualiza solicitud sin inventario-talla existente",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "restar inventario": {
      "main": [
        [
          {
            "node": "Actualizar inventario en DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actualizar inventario en DB": {
      "main": [
        [
          {
            "node": "Actaulizar respuestas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actaulizar respuestas": {
      "main": [
        [
          {
            "node": "Fin del ciclo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actualiza solicitud sin inventario-talla existente": {
      "main": [
        [
          {
            "node": "Barrer cada solicitud nueva",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actualiza solicitud sin inventario-talla existente1": {
      "main": [
        [
          {
            "node": "Unir ramas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00bfYa fue verificado?": {
      "main": [
        [],
        [
          {
            "node": "Actualiza solicitud sin inventario-talla existente1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00bfHay correo en la solicitud y es verificado?": {
      "main": [
        [
          {
            "node": "Barrer cada solicitud nueva",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u00bfYa fue verificado?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convertimos verificado en un Boolean": {
      "main": [
        [
          {
            "node": "\u00bfHay correo en la solicitud y es verificado?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "df21712e-24a6-4bc0-8a58-2758480820e6",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "Kb8obCXAtrWwYTws",
  "tags": [
    {
      "name": "postgresql",
      "id": "BLx7Z63eaEX6Sxt8",
      "updatedAt": "2025-12-28T14:26:13.396Z",
      "createdAt": "2025-12-28T14:26:13.396Z"
    },
    {
      "name": "db",
      "id": "erC9N6bP5zYigKxF",
      "updatedAt": "2025-12-28T14:25:59.638Z",
      "createdAt": "2025-12-28T14:25:59.638Z"
    }
  ]
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Formularios T-shirt con DB. Uses gmail, googleSheetsTrigger, postgres, googleSheets. Event-driven trigger; 24 nodes.

Source: https://gist.github.com/joserangel25/c0f107801122a7639fef6698931e5a71 — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

WF8 — SecureVault Error Monitor + Weekly Report. Uses errorTrigger, googleSheets, gmail, telegram. Event-driven trigger; 10 nodes.

Error Trigger, Google Sheets, Gmail +2
Data & Sheets

This workflow automatically detects completed orders in PostgreSQL and prepares them for AI-based post-purchase communication. It enriches each order with customer, product, and payment data, then gen

Postgres Trigger, Postgres, Agent +4
Data & Sheets

This workflow acts as a junior finance research analyst for a UK boutique M&A or corporate finance team. It listens for Slack messages, classifies the request, gathers company or market data, and prod

HTTP Request, Google Drive, Google Docs +5
Data & Sheets

This workflow monitors customer health by combining payment behavior, complaint signals, and AI-driven feedback analysis. It runs on daily and weekly schedules to evaluate risk levels, escalate high-r

Google Sheets, HTTP Request, Gmail +2
Data & Sheets

This template demonstrates how to build a low-code, AI-powered data analysis workflow in n8n. It enables you to connect to various data sources (such as MySQL, Google Sheets, or local files), process

MySQL, Google Sheets, Read Write File +2