{
  "name": "Google Sheets to SinergiaCRM: automate event participant registration",
  "nodes": [
    {
      "id": "9425f505-8d3e-43f7-bd40-c578a1eb6026",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -64,
        -848
      ]
    },
    {
      "id": "92e25a51-e446-4a28-ba0a-fc9687d13c0c",
      "name": "SinergiaCRM: Create Contact",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        1504,
        -752
      ]
    },
    {
      "id": "2700a9e3-1fc6-4b38-b6e6-6049e52d85a7",
      "name": "SinergiaCRM: Create Relationship",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        1504,
        -944
      ]
    },
    {
      "id": "ff4db6a7-3545-4d1f-9c15-96cfd99b2cc0",
      "name": "SinergiaCRM: Create Registration",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        1728,
        -944
      ]
    },
    {
      "id": "e9c8836d-8f17-421c-b28d-e6b5608bb682",
      "name": "Google Sheets: Mark Procesado = Sí",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2176,
        -944
      ]
    },
    {
      "id": "1fe200ba-1909-4c3b-925b-5b80340b712b",
      "name": "IF: to CRM == Yes",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        -848
      ]
    },
    {
      "id": "af5074a1-11ef-4a81-b167-dbf89dae317f",
      "name": "IF: Not processed == No",
      "type": "n8n-nodes-base.if",
      "position": [
        384,
        -848
      ]
    },
    {
      "id": "64c626cd-b7d0-4c87-a59f-77e06a8194aa",
      "name": "IF: Person exist",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        -848
      ]
    },
    {
      "id": "dfac6070-5bf8-4729-b4f8-fb9f419f63da",
      "name": "Find person by NIF",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        608,
        -976
      ]
    },
    {
      "id": "92859515-4463-4c38-ba53-d0c4fdf426e8",
      "name": "Combinar ID del CRM",
      "type": "n8n-nodes-base.merge",
      "position": [
        832,
        -848
      ]
    },
    {
      "id": "005a1758-b6ac-40ef-8951-57fbb715447e",
      "name": "SinergiaCRM: Create Relationship1",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        1728,
        -752
      ]
    },
    {
      "id": "f1485c90-4ac8-45ce-b835-35ee6fe91399",
      "name": "SinergiaCRM: Create Registration1",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        1952,
        -752
      ]
    },
    {
      "id": "94312c1a-788a-407f-a07d-83a897ab3982",
      "name": "Google Sheets: Mark Procesado = Sí1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2176,
        -752
      ]
    },
    {
      "id": "523588fd-0d0e-4645-adac-5d58d3ea6a87",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1056,
        -848
      ]
    },
    {
      "id": "1369d32f-01d4-4167-8eaa-a22e5803d0a5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -976
      ],
      "parameters": {
        "width": 448,
        "height": 400,
        "content": "## Workflow Overview\n\nThis workflow listens for new rows in a Google Sheet and creates contact and event registration records in SinergiaCRM.\n\n### Key Steps:\n1. Google Sheets Trigger detects a new row"
      }
    },
    {
      "id": "4cc84d89-c396-4e91-a36c-8b7d474527aa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -1344
      ],
      "parameters": {
        "width": 416,
        "height": 768,
        "content": "## Google Sheet Setup\n\nMake sure your Google Sheet includes these columns:\n\n- First name\n- Last name\n- NIF\n- Email\n- Relation type\n- Relation date\n- Event ID\n- Registration date\n- To CRM → must be \"Ye"
      }
    },
    {
      "id": "de331bc1-7eca-4c76-a071-e8025a7dff81",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -1344
      ],
      "parameters": {
        "width": 672,
        "height": 768,
        "content": "## SinergiaCRM Requirements\n\nEnsure you have the following modules available in your SinergiaCRM instance:\n\n- Contacts\n- stic_Contacts_Relationships\n- stic_Registrations\n\nEach node requires authentica"
      }
    },
    {
      "id": "99bf98a7-ca7b-45ce-a4fb-7dfdf1385d0a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -1344
      ],
      "parameters": {
        "width": 448,
        "height": 768,
        "content": "## Contact Check Logic\n\nThis IF node decides the path:\n\n- ✅ If contact exists: continue with relationship and registration.\n- ❌ If not: create the contact first, then continue.\n\nMatching is done by NI"
      }
    },
    {
      "id": "9d101aeb-60a5-4405-a1c1-f979dbe4d8e6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -1344
      ],
      "parameters": {
        "width": 448,
        "height": 768,
        "content": "## Mark Row as Processed\n\nAfter a successful registration, the corresponding row in Google Sheets is updated:\n\n- Processed = \"Sí\"\n\nMatching is done by the NIF field.\nThis prevents duplicate processing"
      }
    },
    {
      "id": "8fd28865-6c05-4637-b289-5dd948664915",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2544,
        -976
      ],
      "parameters": {
        "width": 448,
        "height": 400,
        "content": "## Troubleshooting Tips\n\n- Make sure your spreadsheet column names match exactly.\n- If no contact is created, check NIF formatting.\n- Confirm custom fields exist in your CRM.\n- Check logs for any erro"
      }
    }
  ],
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "IF: Person exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Person exist": {
      "main": [
        [
          {
            "node": "SinergiaCRM: Create Relationship",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SinergiaCRM: Create Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: to CRM == Yes": {
      "main": [
        [
          {
            "node": "IF: Not processed == No",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Find person by NIF": {
      "main": [
        [
          {
            "node": "Combinar ID del CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combinar ID del CRM": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "IF: to CRM == Yes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Not processed == No": {
      "main": [
        [
          {
            "node": "Find person by NIF",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combinar ID del CRM",
            "type": "main",
            "index": 1
          }
        ],
        []
      ]
    },
    "SinergiaCRM: Create Contact": {
      "main": [
        [
          {
            "node": "SinergiaCRM: Create Relationship1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SinergiaCRM: Create Registration": {
      "main": [
        [
          {
            "node": "Google Sheets: Mark Procesado = Sí",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SinergiaCRM: Create Relationship": {
      "main": [
        [
          {
            "node": "SinergiaCRM: Create Registration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SinergiaCRM: Create Registration1": {
      "main": [
        [
          {
            "node": "Google Sheets: Mark Procesado = Sí1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SinergiaCRM: Create Relationship1": {
      "main": [
        [
          {
            "node": "SinergiaCRM: Create Registration1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}