{
  "name": "Automating Venue Research as a Musician",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -2720,
        -288
      ],
      "id": "acd75017-90d6-4123-8307-7d57264d4c24",
      "name": "Start Venue Search"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        -2544,
        -288
      ],
      "id": "84f5207b-3a77-4f4b-86f7-1029d712c54f",
      "name": "Route to Data Sources"
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "=tblv6cjzU0BOv3g5e",
          "mode": "id"
        },
        "filterByFormula": "{Status} = 'Pending'",
        "options": {},
        "sort": {
          "property": [
            {
              "field": "Added to Airtable"
            },
            {
              "field": "MusicianName"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -2304,
        -368
      ],
      "id": "1df96ff9-7adb-4a06-99bf-c3578ab11fab",
      "name": "Fetch Musicians",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "=tbl68JNLb74hfwIRT",
          "mode": "id"
        },
        "filterByFormula": "{Status} = 'Pending'",
        "options": {},
        "sort": {
          "property": [
            {
              "field": "Venue name"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -2304,
        -208
      ],
      "id": "6e8861a4-2b43-4bd6-a71b-f07eb5f9bf41",
      "name": "Fetch Venues",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7f9b781b-3ea3-45e2-a71b-ab02f3397dc8",
              "name": "UserPrompt",
              "value": "=Here is the webpage which contains concert information for a musician {{ $json.MusicianName }}",
              "type": "string"
            },
            {
              "id": "af15a80f-a564-4a7f-8951-36119800bb81",
              "name": "URL",
              "value": "={{ $json['Concert page URL'] }}",
              "type": "string"
            },
            {
              "id": "b466e099-474a-4825-a0c1-c0fc22914659",
              "name": "TableName",
              "value": "tblv6cjzU0BOv3g5e",
              "type": "string"
            },
            {
              "id": "b2fa7788-ec96-43ac-b20c-399fb5bb7416",
              "name": "StatusVariable",
              "value": "=Status",
              "type": "string"
            },
            {
              "id": "19824ef5-ea6b-4245-a0eb-237a75cb26a0",
              "name": "MusicianID",
              "value": "={{ $json.id }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -2112,
        -368
      ],
      "id": "06e2241b-1266-4634-8be7-b074d1601e4e",
      "name": "Prepare Musicians Data"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7f9b781b-3ea3-45e2-a71b-ab02f3397dc8",
              "name": "UserPrompt",
              "value": "=Here is the webpage which contains event information for a venue {{ $json['Venue name'] }}",
              "type": "string"
            },
            {
              "id": "af15a80f-a564-4a7f-8951-36119800bb81",
              "name": "URL",
              "value": "={{ $json['Events URL'] }}",
              "type": "string"
            },
            {
              "id": "b466e099-474a-4825-a0c1-c0fc22914659",
              "name": "TableName",
              "value": "tbl68JNLb74hfwIRT",
              "type": "string"
            },
            {
              "id": "b2fa7788-ec96-43ac-b20c-399fb5bb7416",
              "name": "StatusVariable",
              "value": "=Status",
              "type": "string"
            },
            {
              "id": "ff9ff065-4ac2-4ac0-9b0f-0ac73bcc2550",
              "name": "VenueID",
              "value": "={{ $json.id }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -2112,
        -208
      ],
      "id": "2d2c314e-3e8d-4d90-99f4-4a1fa3e529d3",
      "name": "Prepare Venues Data"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -1872,
        -288
      ],
      "id": "fa782ed7-91e8-47ee-ab01-ca99b0df69aa",
      "name": "Merge Musicians & Venues"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -1680,
        -288
      ],
      "id": "3566d837-39cc-4047-9187-0111b9a14a3b",
      "name": "Process Each Musician or Venue",
      "retryOnFail": true
    },
    {
      "parameters": {
        "zone": {
          "__rl": true,
          "value": "myzone",
          "mode": "list",
          "cachedResultName": "myzone"
        },
        "country": {
          "__rl": true,
          "value": "de",
          "mode": "list",
          "cachedResultName": "de"
        },
        "url": "={{ $json.URL }}",
        "format": "json",
        "requestOptions": {}
      },
      "type": "@brightdata/n8n-nodes-brightdata.brightData",
      "typeVersion": 1,
      "position": [
        -1472,
        -272
      ],
      "id": "e3b41150-3b86-45e3-a4ed-b00e343b1d3b",
      "name": "Scrape Events Page",
      "credentials": {
        "brightdataApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "html": "={{ $json?.body || \"<h1>error: page data not available.Return an empty JSON according to schema</h1>\" }}",
        "options": {}
      },
      "type": "n8n-nodes-base.markdown",
      "typeVersion": 1,
      "position": [
        -1296,
        -272
      ],
      "id": "a0af074c-1274-4566-9944-ca17d110e971",
      "name": "Convert HTML to Markdown"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Here is {{ $('Process Each Musician or Venue').item.json.UserPrompt }}:\n\n******\n{{ $json.data }}\n******",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=Extract all concert and venue information from this page. For each concert or performance listing, extract:\n\n1. Venue names (concert halls, clubs, theaters, festivals if available)\n2. Venue locations (city, country, full address if available)\n3. Contact information (email, phone, website) for each venue if available\n4. Performance dates (if available)\n\nProcessing rules:\n- If contact information is not found for a venue, put 'not available'\n- Extract venue names even if dates are past or missing\n- Include all types of performance venues (clubs, halls, festivals, private events)\n- If multiple contact methods exist for one venue, include all of them\n- Extract venue information even if you're unsure of the complete details "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -1104,
        -272
      ],
      "id": "0258a333-689b-484d-9d17-1461ba1e96c9",
      "name": "Extract Event Details"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"concerts\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"MusicianName\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the main musician contained in the input musician markdown data.\"\n          },\n          \"ProjectName\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the project format: festival, workshop, guitar night, tour, event session etc. It is the 'what', not the 'where'. For example, in 'G\u00fctersloh \u2013 G-Town Session', the ProjectName is 'G-Town Session'. In 'Stendal \u2013 Post 4 Jazz', the ProjectName is 'Post 4 Jazz'. Write exactly the way it is written in the input musician markdown data. If not available, put 'not available'.\"\n          },\n          \"Collaborators\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Extract the names of any other collaborating musicians, featured artists or ensembles (like 'Orchester'). For example, from 'Constanze Friend, Bobo, Eleanor Forbes...', return [\\\"Constanze Friend\\\", \\\"Bobo\\\", \\\"Eleanor Forbes\\\"]. For 'Songland Trio feat. Cherry Gehring + Orchester', return ['Cherry Gehring', 'Orchester']. Do not include the main musician. If only one is listed, return an array with that one name. If no collaborators are listed, return an empty array [].\"\n          },\n          \"ConcertLocation\": {\n            \"type\": \"string\",\n            \"description\": \"The specific venue of the concert (e.g., 'Apollo Theater', 'Schloss Hundisburg'). This is the specific place, NOT the city itself. It is also the 'where', not the 'what'. If a specific venue is not explicitly named (e.g., in 'G\u00fctersloh \u2013 G-Town Session'), then use your general knowledge to research and identify the likely venue for that specific event in that city (e.g. , for the event G-Town Session the ocation is 'Die Weberei'). If a likely venue can be found, state it here. If no specific venue can be determined, put 'not available'. \"\n          },\n          \"City\": {\n            \"type\": \"string\",\n            \"description\": \"The city where the concert takes place. This is the administrative city name. For example, in 'G\u00fctersloh \u2013 G-Town Session', the City is 'G\u00fctersloh'. IMPORTANT: If the venue name includes a location (e.g., 'Schloss Hundisburg'), find the actual city it belongs to. For example, if the venue is 'Schloss Hundisburg', the City is 'Haldensleben'. If the text presents multiple options like 'Wuhan or Suzhou', you MUST include the full string 'Wuhan or Suzhou' in this field. Do not pick one.\"\n          },\n          \"Country\": {\n            \"type\": \"string\",\n            \"description\": \"The country of the concert. Infer from the city if not specified.\"\n          },\n          \"StartDate\": {\n            \"type\": \"string\",\n            \"description\": \"The start date of the concert. Format as YYYY-MM-DD. IMPORTANT LOGIC: The current date is late 2025. If you find a date from early 2026 (e.g., 'Januar 2026') that appears before dates from late 2025, you must assume it is a typo on the webpage and correct the year to 2025. If the date has no year but is a few months before the current date (e.g. March), assume it is 2026. Return an empty string if the date is not available.\"\n          },\n          \"EndDate\": {\n            \"type\": \"string\",\n            \"description\": \"The end date of the concert, if it is a range. If it is a single-day event, this should be the SAME as the StartDate. Format as YYYY-MM-DD. IMPORTANT LOGIC: Apply the same year-correction logic as for the StartDate. Return an empty string if the date is not available.\"\n          },\n          \"ConcertTime\": {\n            \"type\": \"string\",\n            \"description\": \"The start time of the concert (e.g., '19:30'). If not available, put 'not available'.\"\n          },\n          \"URL\": {\n            \"type\": \"string\",\n            \"description\": \"A direct link to the concert or ticket page, if one is present. If not available, put 'not available'.\"\n          }\n        }\n      }\n    }\n  }\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -1040,
        -80
      ],
      "id": "bf99ada3-b3d0-472a-9a4b-b37c091aea98",
      "name": "Define Output Format"
    },
    {
      "parameters": {
        "model": "anthropic/claude-3.7-sonnet",
        "options": {
          "responseFormat": "json_object",
          "temperature": 0.1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        -1184,
        16
      ],
      "id": "1b266f1d-8e1f-4ceb-a41c-ced16e63ca1a",
      "name": "AI Brain",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "5153f6d6-c757-4b42-aa4d-81cf1d82e423",
              "leftValue": "={{ $json.output.concerts }}",
              "rightValue": "",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -848,
        -528
      ],
      "id": "3c960661-597c-455e-970d-27c25b9efaf1",
      "name": "Check if Concerts Found"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.concerts",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -608,
        -272
      ],
      "id": "c157c36d-f9fe-428b-9db8-d061b6bdf941",
      "name": "Process Individual Events"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "103e675e-1731-4d84-ad5b-11a010c0dddb",
              "name": "Collaborators",
              "value": "={{ $json.Collaborators.join(', ') }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -432,
        -272
      ],
      "id": "8f929f2a-8ea7-488a-b0b0-93e4e7b7430c",
      "name": "Format Collaborators"
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl89I5Bp4KI4ZRfA",
          "mode": "list",
          "cachedResultName": "Extracted events data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl89I5Bp4KI4ZRfA"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ProjectName": "={{ $json.ProjectName }}",
            "ConcertLocation": "={{ $json.ConcertLocation }}",
            "City": "={{ $json.City }}",
            "Country": "={{ $json.Country }}",
            "StartDate": "={{ $json.StartDate }}",
            "EndDate": "={{ $json.EndDate }}",
            "ConcertTime": "={{ $json.ConcertTime }}",
            "URL": "={{ $json.URL }}",
            "Collaborators": "={{ $json.Collaborators }}",
            "Event": "={{ $json.MusicianName }},{{ $json.ProjectName }} - {{ $json.ConcertLocation }}",
            "MusicianLink": "={{ $('Process Each Musician or Venue').item.json?.MusicianID || \"\" }}",
            "VenueLink": "={{ $('Process Each Musician or Venue').item.json?.VenueID || \"\" }}",
            "MusicianName": "={{ $json.MusicianName }}",
            "Status": "Pending"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Event",
              "displayName": "Event",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "MusicianLink",
              "displayName": "MusicianLink",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "VenueLink",
              "displayName": "VenueLink",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "ProjectName",
              "displayName": "ProjectName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "MusicianName",
              "displayName": "MusicianName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Collaborators",
              "displayName": "Collaborators",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "ConcertLocation",
              "displayName": "ConcertLocation",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "City",
              "displayName": "City",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "StartDate",
              "displayName": "StartDate",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "EndDate",
              "displayName": "EndDate",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "ConcertTime",
              "displayName": "ConcertTime",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "URL",
              "displayName": "URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "EventID",
              "displayName": "EventID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                },
                {
                  "name": "Error",
                  "value": "Error"
                },
                {
                  "name": "Not Applicable",
                  "value": "Not Applicable"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Venues data",
              "displayName": "Venues data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -256,
        -272
      ],
      "id": "6b1ad38a-521f-40d0-8c57-59b882851fc4",
      "name": "Enrich Events Data",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "daf56233-595d-44dd-8306-4b51ff72682f",
              "name": "id",
              "value": "={{ $('Process Each Musician or Venue').item.json.id }}",
              "type": "string"
            },
            {
              "id": "67354f23-7e93-45a7-8f94-07105db8e8a9",
              "name": "Status",
              "value": "Completed",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -80,
        -272
      ],
      "id": "74587dbf-82c0-41f4-be81-8743c930f88c",
      "name": "Set up id & Status",
      "executeOnce": true
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "={{ $('Process Each Musician or Venue').item.json.TableName }}",
          "mode": "id"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": false
            },
            {
              "id": "MusicianName",
              "displayName": "MusicianName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Website URL",
              "displayName": "Website URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Concert page URL",
              "displayName": "Concert page URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Country of residence",
              "displayName": "Country of residence",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Genre",
              "displayName": "Genre",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Added to Airtable",
              "displayName": "Added to Airtable",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "New",
                  "value": "New"
                },
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Extracted events data",
              "displayName": "Extracted events data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        96,
        -272
      ],
      "id": "3f5a55b0-61ac-48bf-828d-7b6ac489df1d",
      "name": "Update Status",
      "executeOnce": true,
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -2960,
        592
      ],
      "id": "aa383bd5-8f69-4d04-870e-1bba7d9fb6f2",
      "name": "Launch Record Check"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        -2768,
        592
      ],
      "id": "71f5f777-496f-4dfd-96de-a4cd28608782",
      "name": "Route to Data Sources1"
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tblv6cjzU0BOv3g5e",
          "mode": "list",
          "cachedResultName": "Musicians data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tblv6cjzU0BOv3g5e"
        },
        "options": {
          "fields": [
            "MusicianName",
            "Country of residence"
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -2464,
        304
      ],
      "id": "ba33e382-f124-4fb4-b544-c79e875486dc",
      "name": "Load Existing Musicians",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl68JNLb74hfwIRT",
          "mode": "list",
          "cachedResultName": "Venues data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl68JNLb74hfwIRT"
        },
        "options": {
          "fields": [
            "Venue name",
            "City",
            "Country"
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -2464,
        864
      ],
      "id": "1055cca7-1492-4cd4-8552-58b175a50f31",
      "name": "Load Existing Venues",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl89I5Bp4KI4ZRfA",
          "mode": "list",
          "cachedResultName": "Extracted events data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl89I5Bp4KI4ZRfA"
        },
        "filterByFormula": "{Status} = \"Pending\"",
        "options": {},
        "sort": {
          "property": [
            {
              "field": "StartDate"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -2464,
        592
      ],
      "id": "5bc82068-a9c6-4f12-80ab-96d466320aee",
      "name": "Load New Musicians or Venues",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.MusicianLink }}",
                    "rightValue": "",
                    "operator": {
                      "type": "array",
                      "operation": "empty",
                      "singleValue": true
                    },
                    "id": "5473d17e-9519-4285-a3d8-b3c03ca65ba4"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "MusiciansNew"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "b705b583-e357-4d47-bf99-7975c3364a91",
                    "leftValue": "={{ $json.VenueLink }}",
                    "rightValue": "",
                    "operator": {
                      "type": "array",
                      "operation": "empty",
                      "singleValue": true
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "VenuesNew"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -2272,
        592
      ],
      "id": "87522a72-2262-42e0-9266-b3c8507cbb04",
      "name": "Route Musicians & Venues"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "MusicianName",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        -2048,
        496
      ],
      "id": "42d07456-9bc5-4f9d-8e9c-9b7fa379f79c",
      "name": "Remove Duplicate Musicians"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "ConcertLocation",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        -2048,
        688
      ],
      "id": "9e66e61d-c042-4e43-8c03-d843ec4a1e4a",
      "name": "Remove Duplicates Venues"
    },
    {
      "parameters": {
        "includeOtherFields": true,
        "include": "selected",
        "includeFields": "MusicianName",
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1856,
        496
      ],
      "id": "fe5726b5-27d6-4dbb-8dbc-a05f1411522d",
      "name": "Keep Musician Name"
    },
    {
      "parameters": {
        "includeOtherFields": true,
        "include": "selected",
        "includeFields": "ConcertLocation",
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1856,
        688
      ],
      "id": "4983ad53-7f8c-4890-8bd6-a3da0affbb93",
      "name": "Keep Concert Location"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "newdata",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -1664,
        496
      ],
      "id": "9bb78dbf-7c0f-458e-9b97-ecc5e3b6583e",
      "name": "Aggregate New Musician Names"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "newdata",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -1664,
        688
      ],
      "id": "0af43aa9-e084-41ce-8a1f-c518e696f807",
      "name": "Aggregate New Venue Names"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -2272,
        304
      ],
      "id": "6aadebdf-8395-4c4d-8dc1-d4aa47b260d1",
      "name": "Aggregate Existing Musicians"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -2240,
        864
      ],
      "id": "5dac1b3a-800b-4f07-99a5-31ecebc4c87c",
      "name": "Aggregate Existing Venues"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -1456,
        320
      ],
      "id": "91b38a61-d168-4542-8ce3-34f0e60536b6",
      "name": "Merge Existing vs New Musicians"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -1424,
        848
      ],
      "id": "3ea55055-0474-4cc1-9d5c-ce0280df67fe",
      "name": "Merge Existing vs New Venues"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cf3af094-fbee-4716-bf50-7e028d358ff0",
              "name": "TableName",
              "value": "Musicians",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1248,
        320
      ],
      "id": "5343b7b9-0e6a-4cd8-9c91-7522681cbd8b",
      "name": "Set up Musicians Table Name"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cf3af094-fbee-4716-bf50-7e028d358ff0",
              "name": "TableName",
              "value": "Venues",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1216,
        848
      ],
      "id": "61974730-2b84-4926-8d43-eecd3a93509b",
      "name": "Set up Venues Table Name"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -992,
        576
      ],
      "id": "3d5490ed-5e0f-4d37-95c5-4253698bb589",
      "name": "Merge Musicians & Venues Data"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Here is the first array with existing records: \n\n***\n{{ $json.data.toJsonString() }}\n***\n\nThis is the second array with the new data:\n\n***\n{{ $json.newdata.toJsonString() }}\n***",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "You will get two arrays of data: the first array contains existing records and the second one contains new records.\n\nYour task is to compare two provided arrays and identify if the data in the second array is new and not already in the first array. Return only unique new values which do not exist in the first array. "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -800,
        576
      ],
      "id": "f69faebd-0073-4e5c-879c-9b8ce54bf5f5",
      "name": "Find Unique Records"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n\t\"uniquenewvalues\": [\"value1\",\"value2\"]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -624,
        752
      ],
      "id": "2bc75a86-70e8-4ef5-8835-878db26b39ae",
      "name": "Define Output Format1"
    },
    {
      "parameters": {
        "model": "anthropic/claude-3.7-sonnet",
        "options": {
          "responseFormat": "json_object",
          "temperature": 0.1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        -832,
        768
      ],
      "id": "ea1a6294-ff7c-4cbf-9d4e-ca1ef9f1966a",
      "name": "AI Brain1",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "65aa4539-1bd2-4d14-abc2-309f7e27ed37",
              "name": "TableName",
              "value": "={{ $('Merge Musicians & Venues Data').item.json.TableName }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -480,
        576
      ],
      "id": "db4e4721-de72-4d96-86ee-abf6ed3be30f",
      "name": "Define Table Name"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.uniquenewvalues",
        "include": "selectedOtherFields",
        "fieldsToInclude": "TableName",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -288,
        576
      ],
      "id": "17c7bb9d-d34f-42c4-9ac9-e3f20f8019e9",
      "name": "Split Out New Names"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.TableName }}",
                    "rightValue": "Musicians",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "0263da4c-dcaa-4e03-8275-eb15cd504748"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Musicians"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "111fa3a0-af38-4a66-9507-e445dd3fe44c",
                    "leftValue": "={{ $json.TableName }}",
                    "rightValue": "Venues",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Venues"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -96,
        576
      ],
      "id": "6e3ff1b3-db8f-475b-a129-9ce4a1ff4b34",
      "name": "Route to Correct Database"
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tblv6cjzU0BOv3g5e",
          "mode": "list",
          "cachedResultName": "Musicians data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tblv6cjzU0BOv3g5e"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "MusicianName": "={{ $json['output.uniquenewvalues'] }}",
            "Status": "New"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "MusicianName",
              "displayName": "MusicianName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Website URL",
              "displayName": "Website URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Concert page URL",
              "displayName": "Concert page URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Country of residence",
              "displayName": "Country of residence",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Genre",
              "displayName": "Genre",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Added to Airtable",
              "displayName": "Added to Airtable",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "New",
                  "value": "New"
                },
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Extracted events data",
              "displayName": "Extracted events data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        128,
        416
      ],
      "id": "c980570f-226b-41c1-9788-dd0b41928f9b",
      "name": "Add New Musicians",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl68JNLb74hfwIRT",
          "mode": "list",
          "cachedResultName": "Venues data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl68JNLb74hfwIRT"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Venue name": "={{ $json['output.uniquenewvalues'] }}",
            "Status": "New"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Venue name",
              "displayName": "Venue name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Full address",
              "displayName": "Full address",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "City",
              "displayName": "City",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone number",
              "displayName": "Phone number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Homepage URL",
              "displayName": "Homepage URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Events URL",
              "displayName": "Events URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "New",
                  "value": "New"
                },
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Extracted events data",
              "displayName": "Extracted events data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        144,
        720
      ],
      "id": "fbf8c8e9-482e-40a0-9692-d95a445d8ba2",
      "name": "Add New Venues",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "chooseBranch",
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        336,
        304
      ],
      "id": "8530e4b9-c1fd-436b-ae30-1c63dd6816dd",
      "name": "Merge Processing Data"
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl89I5Bp4KI4ZRfA",
          "mode": "list",
          "cachedResultName": "Extracted events data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl89I5Bp4KI4ZRfA"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $json.id }}",
            "Status": "Completed"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": false
            },
            {
              "id": "Event",
              "displayName": "Event",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "MusicianLink",
              "displayName": "MusicianLink",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "VenueLink",
              "displayName": "VenueLink",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "ProjectName",
              "displayName": "ProjectName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "MusicianName",
              "displayName": "MusicianName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Collaborators",
              "displayName": "Collaborators",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "ConcertLocation",
              "displayName": "ConcertLocation",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "City",
              "displayName": "City",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "StartDate",
              "displayName": "StartDate",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "EndDate",
              "displayName": "EndDate",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "ConcertTime",
              "displayName": "ConcertTime",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "URL",
              "displayName": "URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "EventID",
              "displayName": "EventID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                },
                {
                  "name": "Error",
                  "value": "Error"
                },
                {
                  "name": "Not Applicable",
                  "value": "Not Applicable"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Venues data",
              "displayName": "Venues data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        544,
        192
      ],
      "id": "d4752bd3-0eff-4ccc-8a9d-8165f119ef16",
      "name": "Update Events Status",
      "executeOnce": false,
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 2
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -1920,
        1408
      ],
      "id": "6334962c-b634-44aa-995f-2cbd4410baaa",
      "name": "Launch URL Enrichment"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        -1712,
        1408
      ],
      "id": "d06b5627-f959-4333-b0fa-a8e99ebe467c",
      "name": "Route to Data Sources2"
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tblv6cjzU0BOv3g5e",
          "mode": "list",
          "cachedResultName": "Musicians data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tblv6cjzU0BOv3g5e"
        },
        "filterByFormula": "{Status} = 'New'",
        "options": {},
        "sort": {
          "property": [
            {
              "field": "Added to Airtable"
            },
            {
              "field": "MusicianName"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -1488,
        1312
      ],
      "id": "2a56042a-03da-4f94-90c8-611d29298c30",
      "name": "Get New Musicians",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl68JNLb74hfwIRT",
          "mode": "list",
          "cachedResultName": "Venues data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl68JNLb74hfwIRT"
        },
        "filterByFormula": "{Status} = 'New'",
        "options": {},
        "sort": {
          "property": [
            {
              "field": "Venue name"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -1488,
        1504
      ],
      "id": "e13707e3-045a-4bbc-90c7-cd1bfd7f0db1",
      "name": "Get New Venues",
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7f9b781b-3ea3-45e2-a71b-ab02f3397dc8",
              "name": "SearchQuery",
              "value": "={{ $json.MusicianName }} calendar OR events OR programm OR spielplan",
              "type": "string"
            },
            {
              "id": "b466e099-474a-4825-a0c1-c0fc22914659",
              "name": "TableName",
              "value": "Musicians",
              "type": "string"
            },
            {
              "id": "19824ef5-ea6b-4245-a0eb-237a75cb26a0",
              "name": "MusicianID",
              "value": "={{ $json.id }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1280,
        1312
      ],
      "id": "4c70b209-fda0-4468-9629-c648857826b0",
      "name": "Define Search Ouery for Musicians"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7f9b781b-3ea3-45e2-a71b-ab02f3397dc8",
              "name": "SearchQuery",
              "value": "={{ $json['Venue name'] }} calendar OR events OR programm OR spielplan",
              "type": "string"
            },
            {
              "id": "b466e099-474a-4825-a0c1-c0fc22914659",
              "name": "TableName",
              "value": "Venues",
              "type": "string"
            },
            {
              "id": "ff9ff065-4ac2-4ac0-9b0f-0ac73bcc2550",
              "name": "VenueID",
              "value": "={{ $json.id }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1264,
        1504
      ],
      "id": "f4dcc118-d37c-463f-9998-cf7bd4f63550",
      "name": "Define Search Ouery for Venues"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -1024,
        1392
      ],
      "id": "e6263654-e398-49b6-a1a4-a154e0717e90",
      "name": "Merge Data for URL Search"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -848,
        1392
      ],
      "id": "45a9d817-f091-4894-87aa-c934377b52d0",
      "name": "Process Each New Record"
    },
    {
      "parameters": {
        "q": "={{ $json.SearchQuery }}",
        "location": "=",
        "additionalFields": {},
        "requestOptions": {}
      },
      "type": "n8n-nodes-serpapi.serpApi",
      "typeVersion": 1,
      "position": [
        -656,
        1392
      ],
      "id": "a84e91a7-f48d-4459-8941-54c445260028",
      "name": "Find Events URL",
      "alwaysOutputData": false,
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Process Each New Record').item.json.TableName }}",
                    "rightValue": "Musicians",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "d46b3a6b-e64b-4833-b2ad-53ef52aaa273"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Musicians"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "5516ee49-a38a-4ba0-9edf-9900bb0e5aaf",
                    "leftValue": "={{ $('Process Each New Record').item.json.TableName }}",
                    "rightValue": "Venues",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Venues"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -464,
        1392
      ],
      "id": "41615ca4-3189-47b6-85ad-6e592dee9a68",
      "name": "Route to Correct Database1"
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tblv6cjzU0BOv3g5e",
          "mode": "list",
          "cachedResultName": "Musicians data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tblv6cjzU0BOv3g5e"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $('Process Each New Record').item.json.id }}",
            "Concert page URL": "={{ $json.organic_results[0].link }}",
            "Status": "Pending"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true
            },
            {
              "id": "MusicianName",
              "displayName": "MusicianName",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Website URL",
              "displayName": "Website URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Concert page URL",
              "displayName": "Concert page URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Country of residence",
              "displayName": "Country of residence",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Genre",
              "displayName": "Genre",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Added to Airtable",
              "displayName": "Added to Airtable",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "New",
                  "value": "New"
                },
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Extracted events data",
              "displayName": "Extracted events data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -240,
        1184
      ],
      "id": "9476f427-5493-47b1-9920-3c229d1fef0d",
      "name": "Update Musicians URL & Status",
      "executeOnce": false,
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appfBx8WBRfqCvLab",
          "mode": "list",
          "cachedResultName": "n8n & Bright Data Challenge",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab"
        },
        "table": {
          "__rl": true,
          "value": "tbl68JNLb74hfwIRT",
          "mode": "list",
          "cachedResultName": "Venues data",
          "cachedResultUrl": "https://airtable.com/appfBx8WBRfqCvLab/tbl68JNLb74hfwIRT"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ $('Process Each New Record').item.json.id }}",
            "Events URL": "={{ $json.organic_results[0].link }}",
            "Status": "Pending"
          },
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true
            },
            {
              "id": "Venue name",
              "displayName": "Venue name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Full address",
              "displayName": "Full address",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "City",
              "displayName": "City",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Country",
              "displayName": "Country",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone number",
              "displayName": "Phone number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Homepage URL",
              "displayName": "Homepage URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Events URL",
              "displayName": "Events URL",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "New",
                  "value": "New"
                },
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Completed",
                  "value": "Completed"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Extracted events data",
              "displayName": "Extracted events data",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "array",
              "readOnly": false,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        -224,
        1408
      ],
      "id": "f4291e0b-294c-465d-beac-257fcd258485",
      "name": "Update Venues URL & Status",
      "executeOnce": false,
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "# Venue Aggregator\n",
        "height": 784,
        "width": 3760
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -3008,
        -624
      ],
      "id": "7d78051b-fdc9-42da-9949-a095931474ed",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Smart Deduplication\n",
        "height": 896,
        "width": 3760,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -3008,
        160
      ],
      "id": "fde82c2a-bc98-45c7-b8d6-178731e7b71d",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "# Source Expansion  \n",
        "height": 784,
        "width": 3760,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -3008,
        1056
      ],
      "id": "23e2e24d-bbe5-4536-8243-100bdf4e0d70",
      "name": "Sticky Note2"
    }
  ],
  "connections": {
    "Start Venue Search": {
      "main": [
        [
          {
            "node": "Route to Data Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Data Sources": {
      "main": [
        [
          {
            "node": "Fetch Musicians",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Musicians": {
      "main": [
        [
          {
            "node": "Prepare Musicians Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Venues": {
      "main": [
        [
          {
            "node": "Prepare Venues Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Musicians Data": {
      "main": [
        [
          {
            "node": "Merge Musicians & Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Venues Data": {
      "main": [
        [
          {
            "node": "Merge Musicians & Venues",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Musicians & Venues": {
      "main": [
        [
          {
            "node": "Process Each Musician or Venue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Musician or Venue": {
      "main": [
        [],
        [
          {
            "node": "Scrape Events Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Events Page": {
      "main": [
        [
          {
            "node": "Convert HTML to Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML to Markdown": {
      "main": [
        [
          {
            "node": "Extract Event Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Event Details": {
      "main": [
        [
          {
            "node": "Check if Concerts Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Output Format": {
      "ai_outputParser": [
        [
          {
            "node": "Extract Event Details",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Brain": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Event Details",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Define Output Format",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check if Concerts Found": {
      "main": [
        [
          {
            "node": "Process Individual Events",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Musician or Venue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Individual Events": {
      "main": [
        [
          {
            "node": "Format Collaborators",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Collaborators": {
      "main": [
        [
          {
            "node": "Enrich Events Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich Events Data": {
      "main": [
        [
          {
            "node": "Set up id & Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set up id & Status": {
      "main": [
        [
          {
            "node": "Update Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status": {
      "main": [
        [
          {
            "node": "Process Each Musician or Venue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch Record Check": {
      "main": [
        [
          {
            "node": "Route to Data Sources1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Data Sources1": {
      "main": [
        [
          {
            "node": "Load New Musicians or Venues",
            "type": "main",
            "index": 0
          },
          {
            "node": "Load Existing Musicians",
            "type": "main",
            "index": 0
          },
          {
            "node": "Load Existing Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Existing Musicians": {
      "main": [
        [
          {
            "node": "Aggregate Existing Musicians",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Existing Venues": {
      "main": [
        [
          {
            "node": "Aggregate Existing Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load New Musicians or Venues": {
      "main": [
        [
          {
            "node": "Route Musicians & Venues",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Processing Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Musicians & Venues": {
      "main": [
        [
          {
            "node": "Remove Duplicate Musicians",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Remove Duplicates Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Musicians": {
      "main": [
        [
          {
            "node": "Keep Musician Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates Venues": {
      "main": [
        [
          {
            "node": "Keep Concert Location",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep Musician Name": {
      "main": [
        [
          {
            "node": "Aggregate New Musician Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep Concert Location": {
      "main": [
        [
          {
            "node": "Aggregate New Venue Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate New Musician Names": {
      "main": [
        [
          {
            "node": "Merge Existing vs New Musicians",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate New Venue Names": {
      "main": [
        [
          {
            "node": "Merge Existing vs New Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Existing Musicians": {
      "main": [
        [
          {
            "node": "Merge Existing vs New Musicians",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Existing Venues": {
      "main": [
        [
          {
            "node": "Merge Existing vs New Venues",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Existing vs New Musicians": {
      "main": [
        [
          {
            "node": "Set up Musicians Table Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Existing vs New Venues": {
      "main": [
        [
          {
            "node": "Set up Venues Table Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set up Musicians Table Name": {
      "main": [
        [
          {
            "node": "Merge Musicians & Venues Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set up Venues Table Name": {
      "main": [
        [
          {
            "node": "Merge Musicians & Venues Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Musicians & Venues Data": {
      "main": [
        [
          {
            "node": "Find Unique Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Unique Records": {
      "main": [
        [
          {
            "node": "Define Table Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Output Format1": {
      "ai_outputParser": [
        [
          {
            "node": "Find Unique Records",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Brain1": {
      "ai_languageModel": [
        [
          {
            "node": "Find Unique Records",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Define Output Format1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Define Table Name": {
      "main": [
        [
          {
            "node": "Split Out New Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out New Names": {
      "main": [
        [
          {
            "node": "Route to Correct Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Correct Database": {
      "main": [
        [
          {
            "node": "Add New Musicians",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add New Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add New Musicians": {
      "main": [
        [
          {
            "node": "Merge Processing Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Add New Venues": {
      "main": [
        [
          {
            "node": "Merge Processing Data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Merge Processing Data": {
      "main": [
        [
          {
            "node": "Update Events Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch URL Enrichment": {
      "main": [
        [
          {
            "node": "Route to Data Sources2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Data Sources2": {
      "main": [
        [
          {
            "node": "Get New Musicians",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get New Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Musicians": {
      "main": [
        [
          {
            "node": "Define Search Ouery for Musicians",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Venues": {
      "main": [
        [
          {
            "node": "Define Search Ouery for Venues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Search Ouery for Musicians": {
      "main": [
        [
          {
            "node": "Merge Data for URL Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Search Ouery for Venues": {
      "main": [
        [
          {
            "node": "Merge Data for URL Search",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Data for URL Search": {
      "main": [
        [
          {
            "node": "Process Each New Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each New Record": {
      "main": [
        [],
        [
          {
            "node": "Find Events URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Events URL": {
      "main": [
        [
          {
            "node": "Route to Correct Database1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Correct Database1": {
      "main": [
        [
          {
            "node": "Update Musicians URL & Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Venues URL & Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Musicians URL & Status": {
      "main": [
        [
          {
            "node": "Process Each New Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Venues URL & Status": {
      "main": [
        [
          {
            "node": "Process Each New Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "868eda6b-aee0-4c3f-a195-d1f1cd67e4af",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "vCFJz7gGqKBTDSZY",
  "tags": []
}