{
  "id": "ksn2kdpDsB796AlQ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "TEMPLATE - Tally form to Hubspot",
  "tags": [
    {
      "id": "rQ0XNJT6fCWftlwj",
      "name": "TEMPLATE",
      "createdAt": "2025-06-30T12:46:45.433Z",
      "updatedAt": "2025-06-30T12:46:45.433Z"
    },
    {
      "id": "V6bFW4rP32Ss8H8X",
      "name": "Tally",
      "createdAt": "2026-03-30T12:14:22.710Z",
      "updatedAt": "2026-03-30T12:14:22.710Z"
    },
    {
      "id": "0SCYWhYQkLdzQeGr",
      "name": "Hubspot",
      "createdAt": "2025-07-17T09:54:31.851Z",
      "updatedAt": "2025-07-17T09:54:31.851Z"
    }
  ],
  "nodes": [
    {
      "id": "6c388d7e-e6fc-490e-9fed-1abfff3be2d4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -176
      ],
      "parameters": {
        "width": 480,
        "height": 896,
        "content": "## TEMPLATE - Tally form to Hubspot\n\n### How it works\n\n1. A Tally form submission triggers the workflow and searches HubSpot for an existing contact by email.\n2. An If condition checks whether the contact was found; if not, a new contact is created or updated in HubSpot.\n3. Fields are normalized (contact ID, first name, last name) regardless of which branch was taken.\n4. A new HubSpot support ticket is created using the resolved contact data.\n\n### Setup steps\n\n- - [ ] Connect your Tally account and configure the form trigger with the correct form ID.\n- - [ ] Connect your HubSpot account (API key or OAuth) for the Search contacts, Create or update a contact, and Create a ticket nodes.\n- - [ ] Map the Tally form fields (email, first name, last name) to the corresponding HubSpot contact properties in the 'Create or update a contact' node.\n- - [ ] Configure the 'Edit Fields' node to correctly map the contact ID and name fields from both the 'If' (existing contact) and 'Create or update a contact' (new contact) branches.\n- - [ ] Set the ticket properties (subject, status, pipeline, etc.) in the 'Create a ticket' node to match your HubSpot setup.\n\n### Customization\n\nYou can extend the 'Edit Fields' node to pass additional Tally form fields (e.g., message, phone number) into the HubSpot ticket. You can also add an association step after ticket creation to link the ticket to the resolved contact."
      },
      "typeVersion": 1
    },
    {
      "id": "256e53d8-45c2-42d0-a3f4-7e1e52c3f4d2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 320,
        "content": "## Tally trigger and contact lookup\n\nReceives the Tally form submission and immediately searches HubSpot to check whether the submitter already exists as a contact."
      },
      "typeVersion": 1
    },
    {
      "id": "08c6076d-243d-492b-a7a8-db071fe5bf49",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 400,
        "content": "## Contact existence check and upsert\n\nEvaluates whether a matching HubSpot contact was found; if not, creates or updates the contact so a valid contact record always exists before proceeding."
      },
      "typeVersion": 1
    },
    {
      "id": "5a86f5b3-3da5-4a57-8886-78ef82bd8f9a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 464,
        "height": 320,
        "content": "## Prepare fields and create ticket\n\nNormalizes the contact ID and name fields from both branches, then creates a new HubSpot support ticket using the resolved contact data."
      },
      "typeVersion": 1
    },
    {
      "id": "9303a632-2061-48e4-902f-9a8670b75f15",
      "name": "When Tally Form Submitted",
      "type": "n8n-nodes-tallyforms.tallyTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "formId": "EkL9eB"
      },
      "credentials": {
        "tallyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "568d3998-5cb5-4bf0-9496-60fe088158e0",
      "name": "Search HubSpot Contacts",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        208,
        0
      ],
      "parameters": {
        "operation": "search",
        "authentication": "appToken",
        "filterGroupsUi": {
          "filterGroupsValues": [
            {
              "filtersUi": {
                "filterValues": [
                  {
                    "value": "={{ $json.question_R4DYq4.value }}",
                    "propertyName": "email|string"
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "208451cc-b0f5-4fd4-97ba-66a421d4d89b",
      "name": "Create HubSpot Ticket",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1184,
        -16
      ],
      "parameters": {
        "stageId": "1",
        "resource": "ticket",
        "pipelineId": "0",
        "ticketName": "=Support - {{ $json.properties.firstname }} {{ $json.properties.lastname }}",
        "authentication": "appToken",
        "additionalFields": {
          "associatedContactIds": "={{ [$json.id] }}"
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "72e15fca-3e67-4d8a-90ff-a589c2024464",
      "name": "Upsert HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        688,
        64
      ],
      "parameters": {
        "email": "={{ $('When Tally Form Submitted').item.json.question_R4DYq4.value }}",
        "options": {},
        "authentication": "appToken",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bc0b43d3-1eb8-41f8-b7ef-60bf212c22b1",
      "name": "If Contact Already Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        448,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a03ace9c-625c-480f-a74c-894311c84b8a",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "bdba1df5-5edc-46ca-b869-5cb7b9ae2d17",
      "name": "Set Contact ID and Name",
      "type": "n8n-nodes-base.set",
      "position": [
        912,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "caa812a1-5aa5-4f1d-b7ed-26623e3ea9d3",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "62f6f943-ef9f-4f8b-bc36-698ae1527724",
              "name": "properties.firstname",
              "type": "string",
              "value": "={{ $json.properties.firstname }}"
            },
            {
              "id": "94287d6c-19f0-46e5-ade5-a908865f1b2a",
              "name": "properties.lastname",
              "type": "string",
              "value": "={{ $json.properties.lastname }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7b59fa38-68d2-4f33-9dd0-b5317868b777",
  "connections": {
    "Create HubSpot Ticket": {
      "main": [
        []
      ]
    },
    "Upsert HubSpot Contact": {
      "main": [
        [
          {
            "node": "Set Contact ID and Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search HubSpot Contacts": {
      "main": [
        [
          {
            "node": "If Contact Already Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Contact ID and Name": {
      "main": [
        [
          {
            "node": "Create HubSpot Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Contact Already Exists": {
      "main": [
        [
          {
            "node": "Set Contact ID and Name",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upsert HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Tally Form Submitted": {
      "main": [
        [
          {
            "node": "Search HubSpot Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}