{
  "name": "location_by_ip",
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        440,
        510
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Get Location By IP",
      "type": "n8n-nodes-base.uproc",
      "position": [
        850,
        510
      ],
      "parameters": {
        "ip": "={{$node[\"Create IP and Email Item\"].json[\"ip\"]}}",
        "tool": "getLocationByIp",
        "group": "geographic",
        "additionalOptions": {}
      },
      "typeVersion": 1
    },
    {
      "name": "User in Spain?",
      "type": "n8n-nodes-base.if",
      "position": [
        1050,
        510
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$node[\"Get Location By IP\"].json[\"message\"][\"country_code\"]}}",
              "value2": "ES"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Create IP and Email Item",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        640,
        510
      ],
      "parameters": {
        "functionCode": "item.ip = \"83.46.131.46\";\nitem.email = \"user@example.com\";\n\nreturn item;"
      },
      "typeVersion": 1
    },
    {
      "name": "Send English Email",
      "type": "n8n-nodes-base.awsSes",
      "position": [
        1270,
        650
      ],
      "parameters": {
        "body": "Hi,\n\nThank you for your signup!",
        "subject": "Welcome aboard",
        "fromEmail": "REPLACE_WITH_FROMEMAIL",
        "toAddresses": [
          "={{$node[\"Create IP and Email Item\"].json[\"email\"]}}"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "name": "Send Spanish Email",
      "type": "n8n-nodes-base.awsSes",
      "position": [
        1270,
        420
      ],
      "parameters": {
        "body": "Hola,\n\n¡Gracias por registrarte!",
        "subject": "Bienvenido a bordo",
        "fromEmail": "REPLACE_WITH_FROMEMAIL",
        "toAddresses": [
          "={{$node[\"Create IP and Email Item\"].json[\"email\"]}}"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "f2c25bd4-1dfc-5ff4-8747-dfb86449b18c",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# location_by_ip\n\n## Purpose and structure\nThis folder contains the **location_by_ip** workflow. Its executable nodes use `awsSes`, `functionItem`, `if`, `manualTrigger`, `uproc`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nOn clicking 'execute'\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0025_Manual_Uproc_Automation_Triggered.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "active": false,
  "settings": {},
  "connections": {
    "User in Spain?": {
      "main": [
        [
          {
            "node": "Send Spanish Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send English Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Location By IP": {
      "main": [
        [
          {
            "node": "User in Spain?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Create IP and Email Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create IP and Email Item": {
      "main": [
        [
          {
            "node": "Get Location By IP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
