diff --git a/workflows/Automate contract signing from Tally to Airtable and DocuSign-13757/13757-automate-contract-signing-from-tally-to-airtable-and-docusign.webp b/workflows/Automate contract signing from Tally to Airtable and DocuSign-13757/13757-automate-contract-signing-from-tally-to-airtable-and-docusign.webp new file mode 100644 index 000000000..c082f912e --- /dev/null +++ b/workflows/Automate contract signing from Tally to Airtable and DocuSign-13757/13757-automate-contract-signing-from-tally-to-airtable-and-docusign.webp @@ -0,0 +1 @@ +{"id":"5hGzTXrVDrvM5or4","meta":{"instanceId":"1cfae1c5e40abdb9d6aa4140af4a502d39ba6c004725411e2213384175f7e3f4","templateCredsSetupCompleted":true},"name":"Automated Contract Signing with Tally and DocuSign","tags":[],"nodes":[{"id":"3aece8bb-db25-4999-a1d6-f8437158cdc5","name":"Receive Tally Form Submission","type":"n8n-nodes-base.webhook","position":[3584,1056],"webhookId":"bb5e972a-18aa-431c-bbf9-3c9fe330317b","parameters":{"path":"tally-submission","options":{},"httpMethod":"POST"},"typeVersion":2.1},{"id":"65c2fa2f-47b9-4267-b0fc-2e96094f94dd","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","position":[3776,1056],"parameters":{"options":{"responseCode":200,"responseHeaders":{"entries":[{"name":"Content-Type","value":"application/json"}]}},"respondWith":"text","responseBody":"={\"status\": \"received\", \"message\": \"Form submission accepted\"}"},"typeVersion":1.1},{"id":"8fd95630-4c94-444f-88c2-84ac2a2a2109","name":"Normalize Form Payload","type":"n8n-nodes-base.code","position":[3984,1056],"parameters":{"jsCode":"// Normalize Tally form payload into flat, English-named fields.\n// IMPORTANT: Update the field labels below to match YOUR Tally form's question labels.\nconst input = items[0].json;\nconst fields = input.body.data.fields || [];\n\n// Get first or nth occurrence of a field by label\nfunction getFieldValue(label, index = 0) {\n const matches = fields.filter(f => f.label?.trim() === label.trim());\n return matches[index] ? matches[index].value : '';\n}\n\n// Get dropdown text of first or nth occurrence\nfunction getDropdownText(label, index = 0) {\n const matches = fields.filter(f => f.label?.trim() === label.trim());\n const field = matches[index];\n if (!field || !field.options) return '';\n const selectedId = Array.isArray(field.value) ? field.value[0] : field.value;\n const option = field.options.find(opt => opt.id === selectedId);\n return option ? option.text : '';\n}\n\nreturn [\n {\n json: {\n // Service Provider (looked up from Airtable)\n provider_id: getFieldValue(\"Service Provider\"),\n provider_name: getDropdownText(\"Service Provider\"),\n\n // Subject (person the contract is about)\n subject_name: getFieldValue(\"Subject Full Name\"),\n subject_dob: getFieldValue(\"Date of Birth\"),\n subject_address: getFieldValue(\"Address\", 0),\n\n // Primary Contact (e.g. parent, guardian, or main signer)\n primary_contact_name: getFieldValue(\"Primary Contact Full Name\"),\n primary_contact_address: getFieldValue(\"Address\", 1),\n primary_contact_email: getFieldValue(\"Email\", 0),\n primary_contact_phone: getFieldValue(\"Phone\", 0),\n\n // Secondary Contact (e.g. second parent/guardian)\n secondary_contact_name: getFieldValue(\"Secondary Contact Full Name\"),\n secondary_contact_address: getFieldValue(\"Address\", 2),\n secondary_contact_email: getFieldValue(\"Email\", 1),\n secondary_contact_phone: getFieldValue(\"Phone\", 1),\n\n // Service details\n service_start_date: getFieldValue(\"Service Start Date\"),\n service_schedule: getFieldValue(\"Service Schedule\"),\n signing_arrangement: getDropdownText(\"Signing Arrangement\")\n }\n }\n];"},"typeVersion":2},{"id":"125bbcc4-b37f-4be6-82ad-957ce4d1aeed","name":"Create Airtable Contract Record","type":"n8n-nodes-base.airtable","position":[4224,992],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_CONTRACTS_TABLE_ID"},"columns":{"value":{"created_at":"={{ $now.toISO() }}","provider_id":"={{ $json.provider_id }}","subject_dob":"={{ $json.subject_dob }}","subject_name":"={{ $json.subject_name }}","provider_name":"={{ $json.provider_name }}","contract_status":"pending","subject_address":"={{ $json.subject_address }}","service_schedule":"={{ $json.service_schedule }}","service_start_date":"={{ $json.service_start_date }}","signing_arrangement":"={{ $json.signing_arrangement }}","primary_contact_name":"={{ $json.primary_contact_name }}","primary_contact_email":"={{ $json.primary_contact_email }}","primary_contact_phone":"={{ $json.primary_contact_phone }}","secondary_contact_name":"={{ $json.secondary_contact_name }}","primary_contact_address":"={{ $json.primary_contact_address }}","secondary_contact_email":"={{ $json.secondary_contact_email }}","secondary_contact_phone":"={{ $json.secondary_contact_phone }}","secondary_contact_address":"={{ $json.secondary_contact_address }}"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"create"},"typeVersion":2.1},{"id":"db5416cf-151e-4f34-96ec-2e28b52bbc36","name":"Lookup Service Provider in Airtable","type":"n8n-nodes-base.airtable","position":[4224,1184],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_SERVICE_PROVIDERS_TABLE_ID"},"options":{},"operation":"search","filterByFormula":"={provider_id}=\"{{ $json.provider_id }}\""},"typeVersion":2.1,"alwaysOutputData":true},{"id":"f4d6e45a-e0d4-4325-8b04-759f98e872ea","name":"Merge Contract and Provider Data","type":"n8n-nodes-base.merge","position":[4480,1088],"parameters":{"mode":"combine","options":{}},"typeVersion":3.2,"alwaysOutputData":true},{"id":"187ba781-b9f7-4802-a7e1-1ae580084734","name":"Map Envelope Fields","type":"n8n-nodes-base.set","position":[4816,1104],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9cfd0322-0377-5213-a334-fe052a886882","name":"primary_contact_name","type":"string","value":"={{ $json.primary_contact_name }}"},{"id":"5c46ff92-f68a-537a-99a6-a46fdeedf6b5","name":"primary_contact_email","type":"string","value":"={{ $json.primary_contact_email }}"},{"id":"83f65298-b7ba-5480-b0c8-312375907505","name":"primary_contact_address","type":"string","value":"={{ $json.primary_contact_address }}"},{"id":"ce38df6c-4654-5024-9c32-575d25518e7d","name":"secondary_contact_name","type":"string","value":"={{ $json.secondary_contact_name }}"},{"id":"5b641eb1-cd10-5fa9-9ce6-3498130a0539","name":"secondary_contact_email","type":"string","value":"={{ $json.secondary_contact_email }}"},{"id":"ffc8041a-144f-5a19-aad1-52e16c43903c","name":"secondary_contact_address","type":"string","value":"={{ $json.secondary_contact_address }}"},{"id":"bbf0f4cd-9725-5ce3-8ee9-29f7230ff5c3","name":"subject_name","type":"string","value":"={{ $json.subject_name }}"},{"id":"ce495505-d7a3-51b0-96aa-98285ee6f502","name":"subject_dob","type":"string","value":"={{ $json.subject_dob }}"},{"id":"b87c6fa1-2b4e-56a8-8504-e2cf13c6ca6d","name":"subject_address","type":"string","value":"={{ $json.subject_address }}"},{"id":"08d7a484-7f5b-5fd8-a151-275c1e80a5cd","name":"service_start_date","type":"string","value":"={{ $json.service_start_date }}"},{"id":"96b23558-c421-5026-b583-e4b2b9848c28","name":"service_schedule","type":"string","value":"={{ $json.service_schedule }}"},{"id":"24873425-6712-5c83-944f-146da6097ae7","name":"signing_arrangement","type":"string","value":"={{ $json.signing_arrangement }}"},{"id":"481e9a9e-ddfe-502f-b29a-91068a190fad","name":"provider_name","type":"string","value":"={{ $json.provider_name }}"},{"id":"3cbed91f-220f-5a93-9c97-840ca80bdb24","name":"provider_email","type":"string","value":"={{ $json.provider_email }}"},{"id":"b47c7097-371e-5e83-a02a-34d39d1d7906","name":"provider_address","type":"string","value":"={{ $json.provider_address }}"},{"id":"765a481f-db0e-5b8c-8e5d-d59c4fcc2100","name":"company_rep1_name","type":"string","value":"={{ $json.company_rep1_name }}"},{"id":"ee1f2bbf-c435-5eb5-b05b-3e1f9643673b","name":"company_rep1_email","type":"string","value":"={{ $json.company_rep1_email }}"},{"id":"4365b108-e61b-5378-9834-e3db0b658fd0","name":"company_rep2_name","type":"string","value":"={{ $json.company_rep2_name }}"},{"id":"6ab878ad-4067-5417-876d-4bcd0996e708","name":"company_rep2_email","type":"string","value":"={{ $json.company_rep2_email }}"},{"id":"bc69fcd1-f2a2-5ea7-8b92-f6eaae0dc41c","name":"contract_record_id","type":"string","value":"={{ $('Create Airtable Contract Record').item.json.id }}"}]}},"typeVersion":3.4},{"id":"5d7c8c0f-725a-4d12-9385-5907a09f8842","name":"Route by Signing Arrangement","type":"n8n-nodes-base.switch","position":[5024,1088],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5df6c9c9-822e-5537-9b00-9a98b4d1fc1d","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.signing_arrangement }}","rightValue":"Both Contacts"}]}},{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2453f609-7880-5ec6-882b-67bfeb71acb3","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.signing_arrangement }}","rightValue":"Primary Contact Only"}]}},{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"990b1fd0-6314-5ea2-b9ec-dc1df793f4df","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.signing_arrangement }}","rightValue":"Secondary Contact Only"}]}}]},"options":{}},"typeVersion":3.3},{"id":"324965a3-7f2e-42fc-b04a-4fcbc8f5e802","name":"Send DocuSign Envelope (Both Contacts)","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","maxTries":3,"position":[5328,960],"parameters":{"url":"https://demo.docusign.net/restapi/v2.1/accounts/YOUR_DOCUSIGN_ACCOUNT_ID/envelopes","method":"POST","options":{},"jsonBody":"={\n \"templateId\": \"YOUR_DOCUSIGN_TEMPLATE_ID_BOTH_CONTACTS\",\n \"status\": \"sent\",\n \"writeInitialValuesForAllRecipients\": true,\n \"templateRoles\": [\n {\n \"roleName\": \"PrimaryContact\",\n \"name\": \"{{ $json.primary_contact_name }}\",\n \"email\": \"{{ $json.primary_contact_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"primary_contact_name\",\n \"value\": \"{{ $json.primary_contact_name }}\"\n },\n {\n \"tabLabel\": \"primary_contact_address\",\n \"value\": \"{{ $json.primary_contact_address }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"SecondaryContact\",\n \"name\": \"{{ $json.secondary_contact_name }}\",\n \"email\": \"{{ $json.secondary_contact_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"secondary_contact_name\",\n \"value\": \"{{ $json.secondary_contact_name }}\"\n },\n {\n \"tabLabel\": \"secondary_contact_address\",\n \"value\": \"{{ $json.secondary_contact_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"ServiceProvider\",\n \"name\": \"{{ $json.provider_name }}\",\n \"email\": \"{{ $json.provider_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"provider_name\",\n \"value\": \"{{ $json.provider_name }}\"\n },\n {\n \"tabLabel\": \"provider_address\",\n \"value\": \"{{ $json.provider_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep1\",\n \"name\": \"{{ $json.company_rep1_name }}\",\n \"email\": \"{{ $json.company_rep1_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep1_name\",\n \"value\": \"{{ $json.company_rep1_name }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep2\",\n \"name\": \"{{ $json.company_rep2_name }}\",\n \"email\": \"{{ $json.company_rep2_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep2_name\",\n \"value\": \"{{ $json.company_rep2_name }}\"\n }\n ]\n }\n }\n ],\n \"emailSubject\": \"Contract — Signature Request\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"oAuth2Api","headerParameters":{"parameters":[{"name":"Accept","value":"application/json"},{"name":"Content-Type","value":"application/json"}]}},"retryOnFail":true,"typeVersion":4.2,"alwaysOutputData":true},{"id":"fc233fc1-2e0a-4cea-891e-9ac1acdaf0aa","name":"Send DocuSign Envelope (Primary Only)","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","maxTries":3,"position":[5328,1152],"parameters":{"url":"https://demo.docusign.net/restapi/v2.1/accounts/YOUR_DOCUSIGN_ACCOUNT_ID/envelopes","method":"POST","options":{},"jsonBody":"={\n \"templateId\": \"YOUR_DOCUSIGN_TEMPLATE_ID_PRIMARY_ONLY\",\n \"status\": \"sent\",\n \"writeInitialValuesForAllRecipients\": true,\n \"templateRoles\": [\n {\n \"roleName\": \"PrimaryContact\",\n \"name\": \"{{ $json.primary_contact_name }}\",\n \"email\": \"{{ $json.primary_contact_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"primary_contact_name\",\n \"value\": \"{{ $json.primary_contact_name }}\"\n },\n {\n \"tabLabel\": \"primary_contact_address\",\n \"value\": \"{{ $json.primary_contact_address }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n },\n {\n \"tabLabel\": \"secondary_contact_name\",\n \"value\": \"{{ $json.secondary_contact_name }}\"\n },\n {\n \"tabLabel\": \"secondary_contact_address\",\n \"value\": \"{{ $json.secondary_contact_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"ServiceProvider\",\n \"name\": \"{{ $json.provider_name }}\",\n \"email\": \"{{ $json.provider_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"provider_name\",\n \"value\": \"{{ $json.provider_name }}\"\n },\n {\n \"tabLabel\": \"provider_address\",\n \"value\": \"{{ $json.provider_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep1\",\n \"name\": \"{{ $json.company_rep1_name }}\",\n \"email\": \"{{ $json.company_rep1_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep1_name\",\n \"value\": \"{{ $json.company_rep1_name }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep2\",\n \"name\": \"{{ $json.company_rep2_name }}\",\n \"email\": \"{{ $json.company_rep2_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep2_name\",\n \"value\": \"{{ $json.company_rep2_name }}\"\n }\n ]\n }\n }\n ],\n \"emailSubject\": \"Contract — Signature Request\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"oAuth2Api","headerParameters":{"parameters":[{"name":"Accept","value":"application/json"},{"name":"Content-Type","value":"application/json"}]}},"retryOnFail":true,"typeVersion":4.2,"alwaysOutputData":true},{"id":"df4b2e67-0281-4a15-be68-7cba6601eab4","name":"Send DocuSign Envelope (Secondary Only)","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","maxTries":3,"position":[5328,1360],"parameters":{"url":"https://demo.docusign.net/restapi/v2.1/accounts/YOUR_DOCUSIGN_ACCOUNT_ID/envelopes","method":"POST","options":{},"jsonBody":"={\n \"templateId\": \"YOUR_DOCUSIGN_TEMPLATE_ID_SECONDARY_ONLY\",\n \"status\": \"sent\",\n \"writeInitialValuesForAllRecipients\": true,\n \"templateRoles\": [\n {\n \"roleName\": \"SecondaryContact\",\n \"name\": \"{{ $json.secondary_contact_name }}\",\n \"email\": \"{{ $json.secondary_contact_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"secondary_contact_name\",\n \"value\": \"{{ $json.secondary_contact_name }}\"\n },\n {\n \"tabLabel\": \"secondary_contact_address\",\n \"value\": \"{{ $json.secondary_contact_address }}\"\n },\n {\n \"tabLabel\": \"primary_contact_name\",\n \"value\": \"{{ $json.primary_contact_name }}\"\n },\n {\n \"tabLabel\": \"primary_contact_address\",\n \"value\": \"{{ $json.primary_contact_address }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"ServiceProvider\",\n \"name\": \"{{ $json.provider_name }}\",\n \"email\": \"{{ $json.provider_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"provider_name\",\n \"value\": \"{{ $json.provider_name }}\"\n },\n {\n \"tabLabel\": \"provider_address\",\n \"value\": \"{{ $json.provider_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep1\",\n \"name\": \"{{ $json.company_rep1_name }}\",\n \"email\": \"{{ $json.company_rep1_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep1_name\",\n \"value\": \"{{ $json.company_rep1_name }}\"\n },\n {\n \"tabLabel\": \"service_start_date\",\n \"value\": \"{{ $json.service_start_date }}\"\n },\n {\n \"tabLabel\": \"service_schedule\",\n \"value\": \"{{ $json.service_schedule }}\"\n },\n {\n \"tabLabel\": \"subject_name\",\n \"value\": \"{{ $json.subject_name }}\"\n },\n {\n \"tabLabel\": \"subject_dob\",\n \"value\": \"{{ $json.subject_dob }}\"\n },\n {\n \"tabLabel\": \"subject_address\",\n \"value\": \"{{ $json.subject_address }}\"\n }\n ]\n }\n },\n {\n \"roleName\": \"CompanyRep2\",\n \"name\": \"{{ $json.company_rep2_name }}\",\n \"email\": \"{{ $json.company_rep2_email }}\",\n \"tabs\": {\n \"textTabs\": [\n {\n \"tabLabel\": \"company_rep2_name\",\n \"value\": \"{{ $json.company_rep2_name }}\"\n }\n ]\n }\n }\n ],\n \"emailSubject\": \"Contract — Signature Request\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"oAuth2Api","headerParameters":{"parameters":[{"name":"Accept","value":"application/json"},{"name":"Content-Type","value":"application/json"}]}},"retryOnFail":true,"typeVersion":4.2,"alwaysOutputData":true},{"id":"8b707a9c-a8c4-496c-85e8-982fbaed4588","name":"Update Contract Status (Both)","type":"n8n-nodes-base.airtable","position":[5744,1024],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_CONTRACTS_TABLE_ID"},"columns":{"value":{"sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","contract_status":"sent"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"update"},"typeVersion":2.1},{"id":"0a90c616-f3fb-4666-ad51-fdc0d76c54ee","name":"Update Contract Status (Primary)","type":"n8n-nodes-base.airtable","position":[5744,1216],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_CONTRACTS_TABLE_ID"},"columns":{"value":{"sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","contract_status":"sent"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"update"},"typeVersion":2.1},{"id":"1ac67141-d6d2-4a68-8083-02e465ac3f09","name":"Update Contract Status (Secondary)","type":"n8n-nodes-base.airtable","position":[5744,1424],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_CONTRACTS_TABLE_ID"},"columns":{"value":{"sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","contract_status":"sent"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"update"},"typeVersion":2.1},{"id":"33d04e63-2e5f-4218-9290-46d0e8817f19","name":"Log Signers to Airtable (Both)","type":"n8n-nodes-base.airtable","position":[6000,1024],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_SIGNERS_TABLE_ID"},"columns":{"value":{"status":"sent","sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","signer_role":"=All signers","contract_record_id":"={{ $('Map Envelope Fields').item.json.contract_record_id }}"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"create"},"typeVersion":2.1},{"id":"75c583f6-2273-48c8-b6de-2cfe3d7884d4","name":"Log Signers to Airtable (Primary)","type":"n8n-nodes-base.airtable","position":[6000,1216],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_SIGNERS_TABLE_ID"},"columns":{"value":{"status":"sent","sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","signer_role":"=All signers","contract_record_id":"={{ $('Map Envelope Fields').item.json.contract_record_id }}"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"create"},"typeVersion":2.1},{"id":"52abf005-46b2-487d-8662-4c104526292f","name":"Log Signers to Airtable (Secondary)","type":"n8n-nodes-base.airtable","position":[6000,1424],"parameters":{"base":{"__rl":true,"mode":"id","value":"YOUR_AIRTABLE_BASE_ID"},"table":{"__rl":true,"mode":"id","value":"YOUR_SIGNERS_TABLE_ID"},"columns":{"value":{"status":"sent","sent_at":"={{ $now.toISO() }}","envelope_id":"={{ $json.envelopeId }}","signer_role":"=All signers","contract_record_id":"={{ $('Map Envelope Fields').item.json.contract_record_id }}"},"schema":[],"mappingMode":"defineBelow","matchingColumns":[]},"options":{},"operation":"create"},"typeVersion":2.1},{"id":"5ac458fe-33fe-4149-840b-7602192226d7","name":"Sticky Note - Intro","type":"n8n-nodes-base.stickyNote","position":[2976,592],"parameters":{"width":500,"height":888,"content":"## Automated Contract Signing with Tally and DocuSign\n\n### **What it does:**\nAutomatically processes form submissions (Tally), stores contract data in Airtable, looks up service provider details, routes by signing arrangement, and sends pre-filled DocuSign envelopes to the correct signers.\n\n### **Why it matters:**\nEliminates manual contract preparation and routing — every new submission instantly triggers the correct DocuSign envelope with pre-filled data, updates CRM status, and tracks all signers automatically.\n\n### **How it works:**\n1. Receives Tally form submission via webhook\n2. Responds with 200 OK, then normalizes the form payload\n3. Creates a contract record in Airtable and looks up the service provider\n4. Merges data and maps all fields for the DocuSign API\n5. Routes by signing arrangement (Both / Primary Only / Secondary Only)\n6. Sends the appropriate DocuSign envelope with pre-filled signer data\n7. Updates contract status and logs all signers in Airtable\n\n### **Setup steps:**\n1. Connect your **Airtable** credential and create the 3 required tables (see Airtable Setup note)\n2. Connect your **DocuSign OAuth2** credential\n3. Replace `YOUR_AIRTABLE_BASE_ID` and all table ID placeholders\n4. Replace `YOUR_DOCUSIGN_ACCOUNT_ID` with your DocuSign account ID\n5. Replace the 3 `YOUR_DOCUSIGN_TEMPLATE_ID_*` placeholders with your template IDs\n6. Update field labels in the **Normalize Form Payload** Code node to match your Tally form\n7. Configure the Tally webhook to point to this workflow's production webhook URL\n8. Test with a sample Tally submission"},"typeVersion":1},{"id":"8272ae99-0ab6-45ff-a434-5817cf806465","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[3536,832],"parameters":{"color":4,"width":568,"height":440,"content":"## 1. Receive & Normalize\n\nTally form webhook triggers the workflow. The Respond to Webhook node immediately returns a 200 OK to prevent retries. The Code node extracts and normalizes all fields from the nested Tally payload into a flat, English-named structure.\n\n**Customize:** Update the field labels in the Code node to match your Tally form questions."},"typeVersion":1},{"id":"ac69646a-e56a-46cd-904a-40c853436bad","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[4144,832],"parameters":{"color":5,"width":582,"height":524,"content":"## 2. Airtable CRM — Store & Enrich\n\nCreates a new contract record in the **Contracts** table (status: `pending`), then looks up the selected service provider from the **Service Providers** table. The Merge node combines both datasets for the DocuSign envelope."},"typeVersion":1},{"id":"8171e41d-18f0-4a8c-b1d0-6f615a2f6e3b","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[4768,832],"parameters":{"color":5,"width":888,"height":684,"content":"## 3. Route & Send DocuSign Envelope\n\nMaps all fields for the DocuSign API, then routes by signing arrangement to send the correct contract template:\n- **Both Contacts** — Primary + Secondary + Provider + Company Reps\n- **Primary Only** — Primary + Provider + Company Reps\n- **Secondary Only** — Secondary + Provider + Company Reps"},"typeVersion":1},{"id":"a0eaa807-f225-415c-942c-427bf03b50a6","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[5696,832],"parameters":{"color":4,"width":616,"height":780,"content":"## 4. Post-Send CRM Tracking\n\nAfter DocuSign sends the envelope successfully:\n1. Updates the contract record status to `sent` with the `envelope_id`\n2. Logs signer details to the **Signers** table for tracking\n\nThis closes the loop so your Airtable always reflects the current state."},"typeVersion":1},{"id":"8a0d2627-43b6-4f87-b709-41c869df0e43","name":"Sticky Note - Airtable Setup","type":"n8n-nodes-base.stickyNote","position":[2976,1504],"parameters":{"color":6,"width":540,"height":980,"content":"## Airtable Setup Guide\n\nCreate these 3 tables in your Airtable base:\n\n### Table 1: `Contracts`\n| Column | Type |\n|---|---|\n| `primary_contact_name` | Single line text |\n| `primary_contact_email` | Email |\n| `primary_contact_phone` | Phone |\n| `primary_contact_address` | Single line text |\n| `secondary_contact_name` | Single line text |\n| `secondary_contact_email` | Email |\n| `secondary_contact_phone` | Phone |\n| `secondary_contact_address` | Single line text |\n| `subject_name` | Single line text |\n| `subject_dob` | Date |\n| `subject_address` | Single line text |\n| `service_start_date` | Date |\n| `service_schedule` | Long text |\n| `signing_arrangement` | Single select |\n| `provider_id` | Single line text |\n| `provider_name` | Single line text |\n| `contract_status` | Single select (`pending`, `sent`, `signed`, `declined`) |\n| `envelope_id` | Single line text |\n| `sent_at` | Date |\n| `created_at` | Date |\n\n### Table 2: `Service Providers`\n| Column | Type |\n|---|---|\n| `provider_id` | Single line text (primary) |\n| `provider_name` | Single line text |\n| `provider_email` | Email |\n| `provider_address` | Single line text |\n| `company_rep1_name` | Single line text |\n| `company_rep1_email` | Email |\n| `company_rep2_name` | Single line text |\n| `company_rep2_email` | Email |\n\n### Table 3: `Signers`\n| Column | Type |\n|---|---|\n| `contract_record_id` | Link to Contracts |\n| `envelope_id` | Single line text |\n| `signer_role` | Single line text |\n| `status` | Single select (`sent`, `delivered`, `signed`, `declined`) |\n| `sent_at` | Date |"},"typeVersion":1},{"id":"bdf4824b-665c-4a04-a613-82a5cbdbb40b","name":"Sticky Note - DocuSign Setup","type":"n8n-nodes-base.stickyNote","position":[3568,1504],"parameters":{"color":6,"width":540,"height":320,"content":"## DocuSign Setup\n\n1. Create 3 DocuSign templates matching the signing arrangements\n2. Define roles in each template: `PrimaryContact`, `SecondaryContact`, `ServiceProvider`, `CompanyRep1`, `CompanyRep2`\n3. Add text tabs matching the field names (e.g., `primary_contact_name`, `subject_name`, etc.)\n4. Copy each template ID into the corresponding HTTP Request node\n5. Replace `YOUR_DOCUSIGN_ACCOUNT_ID` in the URL of all 3 nodes\n\n**Note:** The URL uses `demo.docusign.net` (sandbox). For production, change to `docusign.net`."},"typeVersion":1},{"id":"724ced4f-f7a9-43c6-91d7-e63d6f57b3c5","name":"Contact & Attribution","type":"n8n-nodes-base.stickyNote","position":[6368,832],"parameters":{"width":700,"height":1284,"content":"## Was this helpful? Get in touch!\n\n[![clic](https://vptkuqoipqbebipqjnqw.supabase.co/storage/v1/object/public/Milo%20Bravo/seeAxWUupcOOXY5tntexZ_video.gif)](https://tally.so/r/EkKGgB)\n\nI really hope this automation helped you. Your feedback is incredibly valuable and helps me create better resources for business and the n8n community.\n\n### **Have Feedback, a Question, or a Project Idea?**\n\nI've streamlined the way we connect. It all starts with one simple form that takes less than 10 seconds. After that, you'll chat with my AI assistant who will gather the key details and pass them directly on to me.\n\n#### **[Start the conversation here](https://tally.so/r/EkKGgB)**\n\n* **Give Feedback:** Share your thoughts on this template—whether you found a typo, encountered an unexpected error, have a suggestion, or just want to say thanks!\n\n* **n8n Consulting:** Have a complex business challenge or need a custom workflow built from scratch? Let's partner on a powerful automation solution tailored to your specific needs.\n\n* **Join your team:** We can work together to get you launched with confidence.\n\n---\n\nHappy Automating!\n[Milo Bravo](https://linkedin.com/in/MiloBravo/) | BRaiA Labs | Automation & BI Systems + AI Integration\n"},"typeVersion":1}],"active":false,"pinData":{"Receive Tally Form Submission":[{"json":{"body":{"data":{"fields":[{"key":"q_provider","type":"DROPDOWN","label":"Service Provider","value":["provider-001"],"options":[{"id":"provider-001","text":"Jane Smith Daycare"},{"id":"provider-002","text":"City Kids Center"}]},{"key":"q_start","type":"INPUT_DATE","label":"Service Start Date","value":"2025-03-01"},{"key":"q_schedule","type":"TEXTAREA","label":"Service Schedule","value":"Monday 08:00-17:00, Wednesday 08:00-17:00, Friday 08:00-13:00"},{"key":"q_subject","type":"INPUT_TEXT","label":"Subject Full Name","value":"Alex Johnson"},{"key":"q_addr1","type":"INPUT_TEXT","label":"Address","value":"123 Main Street, 8000 Sample City"},{"key":"q_dob","type":"INPUT_DATE","label":"Date of Birth","value":"2022-06-15"},{"key":"q_primary","type":"INPUT_TEXT","label":"Primary Contact Full Name","value":"Sarah Johnson"},{"key":"q_addr2","type":"INPUT_TEXT","label":"Address","value":"123 Main Street, 8000 Sample City"},{"key":"q_email1","type":"INPUT_EMAIL","label":"Email","value":"sarah@example.com"},{"key":"q_phone1","type":"INPUT_PHONE_NUMBER","label":"Phone","value":"+41791234567"},{"key":"q_secondary","type":"INPUT_TEXT","label":"Secondary Contact Full Name","value":"Mike Johnson"},{"key":"q_addr3","type":"INPUT_TEXT","label":"Address","value":"456 Oak Avenue, 8001 Sample City"},{"key":"q_email2","type":"INPUT_EMAIL","label":"Email","value":"mike@example.com"},{"key":"q_phone2","type":"INPUT_PHONE_NUMBER","label":"Phone","value":"+41791234568"},{"key":"q_arrangement","type":"MULTIPLE_CHOICE","label":"Signing Arrangement","value":["both-id"],"options":[{"id":"both-id","text":"Both Contacts"},{"id":"primary-id","text":"Primary Contact Only"},{"id":"secondary-id","text":"Secondary Contact Only"}]}],"formId":"yourFormId","formName":"Service Registration Form","createdAt":"2025-01-15T10:00:00.000Z","responseId":"sample123","respondentId":"resp123","submissionId":"sample123"},"eventId":"sample-event-id","createdAt":"2025-01-15T10:00:00.000Z","eventType":"FORM_RESPONSE"},"query":{},"params":{},"headers":{"host":"your-instance.app.n8n.cloud","content-type":"application/json"},"webhookUrl":"https://your-instance.app.n8n.cloud/webhook/tally-submission","executionMode":"production"}}]},"settings":{"executionOrder":"v1"},"versionId":"10957aa0-1c3f-46e0-af01-56250345c232","connections":{"Respond to Webhook":{"main":[[{"node":"Normalize Form Payload","type":"main","index":0}]]},"Map Envelope Fields":{"main":[[{"node":"Route by Signing Arrangement","type":"main","index":0}]]},"Normalize Form Payload":{"main":[[{"node":"Create Airtable Contract Record","type":"main","index":0},{"node":"Lookup Service Provider in Airtable","type":"main","index":0}]]},"Route by Signing Arrangement":{"main":[[{"node":"Send DocuSign Envelope (Both Contacts)","type":"main","index":0}],[{"node":"Send DocuSign Envelope (Primary Only)","type":"main","index":0}],[{"node":"Send DocuSign Envelope (Secondary Only)","type":"main","index":0}]]},"Receive Tally Form Submission":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]},"Update Contract Status (Both)":{"main":[[{"node":"Log Signers to Airtable (Both)","type":"main","index":0}]]},"Create Airtable Contract Record":{"main":[[{"node":"Merge Contract and Provider Data","type":"main","index":0}]]},"Merge Contract and Provider Data":{"main":[[{"node":"Map Envelope Fields","type":"main","index":0}]]},"Update Contract Status (Primary)":{"main":[[{"node":"Log Signers to Airtable (Primary)","type":"main","index":0}]]},"Update Contract Status (Secondary)":{"main":[[{"node":"Log Signers to Airtable (Secondary)","type":"main","index":0}]]},"Lookup Service Provider in Airtable":{"main":[[{"node":"Merge Contract and Provider Data","type":"main","index":1}]]},"Send DocuSign Envelope (Primary Only)":{"main":[[{"node":"Update Contract Status (Primary)","type":"main","index":0}]]},"Send DocuSign Envelope (Both Contacts)":{"main":[[{"node":"Update Contract Status (Both)","type":"main","index":0}]]},"Send DocuSign Envelope (Secondary Only)":{"main":[[{"node":"Update Contract Status (Secondary)","type":"main","index":0}]]}}} \ No newline at end of file