AutomationFlowsData & Sheets › [gus] Loans to Gsheet Main

[gus] Loans to Gsheet Main

[Gus] Loans to GSheet main. Uses googleSheets, mySql. Event-driven trigger; 7 nodes.

Event trigger★★★★☆ complexity7 nodesGoogle SheetsMySQL
Data & Sheets Trigger: Event Nodes: 7 Complexity: ★★★★☆ Added:

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
{
  "id": "e7DP1CFJj6GCwLWN",
  "createdAt": "2023-07-13T03:35:14.598Z",
  "updatedAt": "2023-07-13T06:26:10.368Z",
  "name": "[Gus] Loans to GSheet main",
  "active": false,
  "nodes": [
    {
      "id": "42ec67fc-62e1-494f-9290-4b55529666cc",
      "name": "clear sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -300,
        -320
      ],
      "parameters": {
        "operation": "clear",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 676534839,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ujRe-V0vEA_fF-ZzUZx5IQ_Wn7bthqwINEB54QdKilM/edit#gid=676534839",
          "cachedResultName": "investments"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ujRe-V0vEA_fF-ZzUZx5IQ_Wn7bthqwINEB54QdKilM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ujRe-V0vEA_fF-ZzUZx5IQ_Wn7bthqwINEB54QdKilM/edit?usp=drivesdk",
          "cachedResultName": "test_loans_admin_cl"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 3
    },
    {
      "id": "d6535b12-fa72-4d9b-9817-7f4cd7cedb2d",
      "name": "Set1",
      "type": "n8n-nodes-base.set",
      "position": [
        500,
        -320
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "start",
              "value": "={{ ($runIndex+1)*10000 }}"
            }
          ]
        },
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 2
    },
    {
      "id": "5aa94e40-9b7a-4ec1-b2f5-ea339a1db64a",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        220,
        -320
      ],
      "parameters": {
        "workflowId": "8"
      },
      "typeVersion": 1
    },
    {
      "id": "5053c80e-d1f7-42b0-b4d5-3b9fefc20bd4",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -760,
        -320
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c4f42dc4-3151-4af3-b12e-27ddedf7570a",
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        -320
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.start }}",
              "value2": "={{$node[\"count registros\"].data[\"total\"]}}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "25db3def-637b-4e50-82e1-a66821b27d0c",
      "name": "count registros",
      "type": "n8n-nodes-base.mySql",
      "position": [
        -540,
        -320
      ],
      "parameters": {
        "query": "select count(*) as total \nfrom investments i\n         inner join profiles p on i.investable_id = p.id and i.investable_type = \"Profile\"\nwhere state in\n      (\"active\", \"paid\", \"legal_collection_completed\", \"legal_collection\", \"waiting_completion\",\n       \"completed\")",
        "operation": "executeQuery"
      },
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9d8cbd93-0cc0-44d8-95d0-bbc3ef3bfdd3",
      "name": "Set start",
      "type": "n8n-nodes-base.set",
      "position": [
        -40,
        -320
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "start"
            }
          ]
        },
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 2
    }
  ],
  "connections": {
    "IF": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set1": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set start": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "clear sheet": {
      "main": [
        [
          {
            "node": "Set start",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "count registros": {
      "main": [
        [
          {
            "node": "clear sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Set1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "count registros",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "saveManualExecutions": true,
    "saveExecutionProgress": true
  },
  "staticData": null,
  "versionId": "e9d9f4c5-b8aa-4943-8cdc-abca12836c3f",
  "triggerCount": 0,
  "tags": []
}

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

[Gus] Loans to GSheet main. Uses googleSheets, mySql. Event-driven trigger; 7 nodes.

Source: https://github.com/abdopcnet/nodemation-backups/blob/main/[gus]-loans-to-gsheet-main-e7DP1CFJj6GCwLWN.json — 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

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
Data & Sheets

Sync Google Sheets Data With Mysql. Uses manualTrigger, compareDatasets, noOp, scheduleTrigger. Event-driven trigger; 15 nodes.

Google Sheets, MySQL
Data & Sheets

This workflow performs several data integration and synchronization tasks between Google Sheets and a MySQL database.

Google Sheets, MySQL
Data & Sheets

aula-00-mapa-do-n8n. Uses emailReadImap, stopAndError, httpRequest, graphql. Event-driven trigger; 46 nodes.

Email Read Imap, Stop And Error, HTTP Request +14
Data & Sheets

BP_check. Uses googleSheets, @n-octo-n/n8n-nodes-json-database, httpRequest, itemLists. Webhook trigger; 99 nodes.

Google Sheets, @N Octo N/N8N Nodes Json Database, HTTP Request +2