AutomationFlowsData & Sheets › Cosechadora_musical

Cosechadora_musical

Cosechadora_musical. Uses googleDrive, postgres. Event-driven trigger; 7 nodes.

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

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": "Cosechadora_musical",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        -112
      ],
      "id": "dae4d26e-85b7-4caf-978b-6788aa0df284",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "searchMethod": "query",
        "queryString": "'1cYqGdyMfhYRHXOexepyOydUHYQrcSg7X' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false",
        "returnAll": true,
        "filter": {
          "folderId": {
            "mode": "list",
            "value": "root",
            "cachedResultName": "/ (Root folder)"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        224,
        -112
      ],
      "id": "1139e090-59a2-49af-b96b-af162388c3e9",
      "name": "Search files and folders",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "batchSize": 50,
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        544,
        -112
      ],
      "id": "e75da1e0-9d79-4a61-8986-1d29abd134b4",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "searchMethod": "query",
        "queryString": "='{{ $json.id }}' in parents and mimeType contains 'audio/' and trashed = false",
        "returnAll": true,
        "filter": {
          "folderId": {
            "mode": "list",
            "value": "root",
            "cachedResultName": "/ (Root folder)"
          }
        },
        "options": {
          "fields": [
            "webViewLink",
            "id",
            "mimeType",
            "name"
          ]
        }
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        784,
        -272
      ],
      "id": "8245ac90-9bcb-4382-ac05-214abd2b3699",
      "name": "Search files and folders1",
      "alwaysOutputData": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "65a40f99-8cc5-4d34-ab44-6961c054605c",
              "name": "drive_file_id",
              "value": "={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "b9e1fab6-ffae-42e3-9fd3-72dd51f1bc56",
              "name": "name",
              "value": "={{ $json.name }}",
              "type": "string"
            },
            {
              "id": "4d144b44-c2c7-4b91-b536-6298e86a8a13",
              "name": "original_folder_name",
              "value": "={{ $('Search files and folders').item.json.name }}",
              "type": "string"
            },
            {
              "id": "674b6a73-5979-4059-8016-1f9f9a8b5cf3",
              "name": "parent_folder_id",
              "value": "={{ $('Search files and folders').item.json.id }}",
              "type": "string"
            },
            {
              "id": "99953e5b-8f29-42a2-aa4d-716025573ec7",
              "name": "webViewLink",
              "value": "={{ $json.webViewLink }}",
              "type": "string"
            },
            {
              "id": "9b7b3d61-8d90-4acd-b0ee-4c492f99b877",
              "name": "mime_type",
              "value": "={{ $('Search files and folders1').item.json.mimeType }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1280,
        -288
      ],
      "id": "2b384304-cad8-442c-b872-3ebf697a795b",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "operation": "upsert",
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "table": {
          "__rl": true,
          "value": "musica_startup",
          "mode": "list",
          "cachedResultName": "musica_startup"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "size_bytes": 0,
            "parent_folder_id": "={{ $json.parent_folder_id }}",
            "original_folder_name": "={{ $json.original_folder_name }}",
            "name": "={{ $json.name }}",
            "drive_file_id": "={{ $json.drive_file_id }}",
            "mime_type": "={{ $json.mime_type }}",
            "web_view_link": "={{ $json.webViewLink }}"
          },
          "matchingColumns": [
            "drive_file_id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "drive_file_id",
              "displayName": "drive_file_id",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false,
              "removed": false
            },
            {
              "id": "description",
              "displayName": "description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "mime_type",
              "displayName": "mime_type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "size_bytes",
              "displayName": "size_bytes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": false
            },
            {
              "id": "parent_folder_id",
              "displayName": "parent_folder_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "original_folder_name",
              "displayName": "original_folder_name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "artist",
              "displayName": "artist",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "album",
              "displayName": "album",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "genre",
              "displayName": "genre",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "web_view_link",
              "displayName": "web_view_link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "created_time_drive",
              "displayName": "created_time_drive",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "modified_time_drive",
              "displayName": "modified_time_drive",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "last_synced_at",
              "displayName": "last_synced_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "raw_metadata",
              "displayName": "raw_metadata",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "object",
              "canBeUsedToMatch": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        1456,
        -128
      ],
      "id": "bab7df48-5938-4f72-a74b-b224d520e84f",
      "name": "Insert or update rows in a table",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "56098fe0-e871-4782-aa36-e8386360cc0b",
              "leftValue": "={{ $json.id }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        992,
        -272
      ],
      "id": "933b6b91-d945-45f7-b90e-3e3576734bb3",
      "name": "If"
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Search files and folders1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Insert or update rows in a table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert or update rows in a table": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false,
    "timeSavedMode": "fixed",
    "saveDataErrorExecution": "none",
    "saveExecutionProgress": false,
    "callerPolicy": "workflowsFromSameOwner",
    "executionTimeout": -1
  },
  "versionId": "e572cace-c747-4bfc-8f38-36214fbc0d69",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "9QXhxNdY0DbejYKgcdmi3",
  "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.

About this workflow

Cosechadora_musical. Uses googleDrive, postgres. Event-driven trigger; 7 nodes.

Source: https://github.com/Kakuen9201/rokola_ia/blob/main/n8n_flujos/Cosechadora_musical.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →