{
  "name": "Register volunteers in SinergiaCRM from form submissions and notify your team",
  "nodes": [
    {
      "id": "f4497f65-f971-4bf4-8f1d-ad3a2a88dcb6",
      "name": "Find person by NIF",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        -1424,
        -1824
      ]
    },
    {
      "id": "a58f26ea-7dd1-4045-8bb0-e21bcfdd7bfe",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -816,
        -1664
      ]
    },
    {
      "id": "6e9b3f59-8c48-4a00-9fbc-dd63383c3f7e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1568,
        -2192
      ],
      "parameters": {
        "width": 672,
        "height": 768,
        "content": "## SinergiaCRM Setup Requirements\n\nMake sure your SinergiaCRM instance includes the following modules:\n\n- Contacts  \n- stic_Contacts_Relationships\n\nThis workflow uses OAuth authentication. To configur"
      }
    },
    {
      "id": "15f337b4-f3ee-4b67-9978-6ad62e4661d6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -2192
      ],
      "parameters": {
        "width": 480,
        "height": 768,
        "content": "## Contact Existence Logic\n\nThis IF node determines the workflow path based on whether the contact already exists in SinergiaCRM:\n\n- ✅ If the contact is found (matched by NIF), continue by creating a "
      }
    },
    {
      "id": "855ecd07-87c2-4abf-8f99-49c302043020",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -1824
      ],
      "parameters": {
        "width": 448,
        "height": 400,
        "content": "## Troubleshooting Tips\n\n- Ensure the form submission includes all required fields: First name, Last name, Email, and NIF.\n- If no contact is created, double-check the NIF formatting and CRM field map"
      }
    },
    {
      "id": "bfb230ba-55a2-4842-96f9-e009956b0576",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        -2656
      ],
      "parameters": {
        "width": 448,
        "height": 1328,
        "content": "Automatically register new volunteers in SinergiaCRM when they submit a form, creating or updating contacts and relationships, and sending a confirmation email to your team.\n\n### Who is this workflow "
      }
    },
    {
      "id": "2ef8983c-810c-47c4-801b-208f1f09c906",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -2192
      ],
      "parameters": {
        "width": 928,
        "height": 768,
        "content": "## Notification Step\n\nAfter the contact and relationship have been created, this workflow sends an email notification.\n\nYou can customize the \"Send email to the person in charge\" node to:\n\n- Change th"
      }
    },
    {
      "id": "48cec7e3-2b4a-4167-856f-03032e4bba82",
      "name": "Merge CRM IDs",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1120,
        -1664
      ]
    },
    {
      "id": "91348271-ccd9-4336-a7e2-4ff2086af152",
      "name": "New Volunteer Form Submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1872,
        -1488
      ]
    },
    {
      "id": "f6c578c7-9746-4f2c-ab8a-575dddb9b34c",
      "name": "Check if Volunteer Already Exists in CRM (by NIF)",
      "type": "n8n-nodes-base.if",
      "position": [
        -592,
        -1664
      ]
    },
    {
      "id": "f4ac45c5-9e25-42c3-b8f7-8f761009bf31",
      "name": "Create New Volunteer Contact in SinergiaCRM",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        -208,
        -1600
      ]
    },
    {
      "id": "e8291cc5-16b0-4961-b609-2334da77ae36",
      "name": "Add Volunteer Relationship to Existing Contact",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        -208,
        -1792
      ]
    },
    {
      "id": "b34f61cc-40de-46d8-bca7-5978b4824b37",
      "name": "Add Volunteer Relationship to New Contact",
      "type": "n8n-nodes-sinergiacrm.sinergiaCrm",
      "position": [
        16,
        -1600
      ]
    },
    {
      "id": "e8e34724-d04b-4e18-a019-dd2b6c5da6b9",
      "name": "Notify Team: New Volunteer Submitted",
      "type": "n8n-nodes-base.gmail",
      "position": [
        304,
        -1792
      ]
    }
  ],
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Check if Volunteer Already Exists in CRM (by NIF)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge CRM IDs": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find person by NIF": {
      "main": [
        [
          {
            "node": "Merge CRM IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Volunteer Form Submission": {
      "main": [
        [
          {
            "node": "Find person by NIF",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge CRM IDs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Add Volunteer Relationship to New Contact": {
      "main": [
        [
          {
            "node": "Notify Team: New Volunteer Submitted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create New Volunteer Contact in SinergiaCRM": {
      "main": [
        [
          {
            "node": "Add Volunteer Relationship to New Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Volunteer Relationship to Existing Contact": {
      "main": [
        [
          {
            "node": "Notify Team: New Volunteer Submitted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Volunteer Already Exists in CRM (by NIF)": {
      "main": [
        [
          {
            "node": "Add Volunteer Relationship to Existing Contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create New Volunteer Contact in SinergiaCRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}