Route new and returning enquiries in Appdor with duplicate checks
This n8n workflow validates an enquiry, checks Appdor for a matching email address, then creates a record or updates the existing one. Sales, Support and Billing enquiries go to fixed team inboxes; urgent enquiries go to a fixed urgent inbox.
Download the inactive n8n workflow
The template is free. Appdor is commercial software; your Appdor plan, n8n hosting and SMTP service may have separate costs. See Appdor pricing.
What you need
- An Appdor workspace with permission to create a table and an API credential.
- An n8n installation supporting Form Trigger, Code, HTTP Request, If, Stop And Error and Send Email nodes.
- An SMTP account and team inboxes you control.
Create the Enquiries table
Create a table named Enquiries with these exact, case-sensitive column names. The workflow uses the column names as API keys.
Name— text.Email— email; one address per record.LastMessage— long text.EnquiryType— text: Sales, Support or Billing.Priority— text: Normal or Urgent.Queue— text: Sales, Support or Billing.Source— text, set ton8n enquiry form.LastReceivedAt— date with time.Status— text, set toNewonly when creating a record.
Copy the table UUID from its API documentation. Give the integration access to all enquiry records and these fields so the lookup can see existing matches.
Configure the workflow
- Import the JSON into n8n. It imports inactive without credentials.
- Open Configure and validate enquiry. At the top of its code, replace the fixed
origin,tableId,fromEmail,urgentEmailandqueuesrecipient addresses. Use your Appdor HTTPS origin and table UUID. Keep theSales,SupportandBillingkeys inqueuesand set their inboxes to addresses you control. - Create an n8n Bearer Auth credential with an Appdor token holding both
data:readanddata:write, plus the necessary table and field permissions. Select it on Lookup matching enquiry and Create or update enquiry. Keep the token in n8n's credential manager. - Select your SMTP credential on both Notify assigned queue and Notify urgent queue. Their sender and recipients come from your fixed configuration. Form visitors cannot supply an API URL, table, sender or recipient.
- Update the form description for your organization and link to your intake privacy notice. The form collects Name, Email, Message, Enquiry type and Priority. Submitting an enquiry is not newsletter consent.
- Keep automatic retries off. The template disables saved execution data for successful, failed and manual executions. Use synthetic submissions to inspect results in the current test session.
What happens to each enquiry
Form → validation → email lookup → create or update → team notification. Validation trims the submitted text, lowercases the email and accepts only Sales, Support or Billing and Normal or Urgent. Empty required fields, invalid emails, names over 200 characters, emails over 254 characters and messages over 5,000 characters are rejected before an API request.
The lookup sends POST /api/v1/tables/{tableId}/query with first: 2, select: ["Email"] and the filter TRIM({Email}) = followed by the normalized email encoded as a JSON string. Appdor compares text without case sensitivity and returns the record ID and version alongside the selected field.
- No match: create an enquiry with
Status = New. - One match: update that record with the version returned by the lookup. Preserve its existing
Status. - Two matches: stop for duplicate review; do not choose a record or send a notification.
An update replaces the latest name, message, type, priority, queue, source and receipt time. LastMessage holds the latest enquiry, not a message history. Repeated submissions with the same email update the same visible record when submitted sequentially.
Normal enquiries notify the configured sales, support or billing inbox. Urgent enquiries notify urgentEmail instead. The notification contains the saved record ID, enquiry type, priority, queue and whether the record was created or updated. Names, email addresses and message content are excluded from email. Email is sent only after Appdor confirms the save; the form confirms receipt only after notification succeeds.
Recover from a stopped execution
The workflow stops with separate recovery instructions for lookup, save and notification failures. It does not automatically retry.
- Lookup failure: check the Appdor origin, table UUID, credential, scopes and read access. A failed lookup is never treated as “no match”; no save or email follows it.
- Duplicate matches: review the records in Appdor and resolve the duplicate before submitting again.
- Save failure: check the error and the Appdor table. A version conflict means another writer changed the record; repeat the lookup before preparing a new update. If a timeout or lost response leaves the write outcome unknown, re-query Appdor before any manual replay. Do not blindly repeat a create.
- Notification failure: the record is already saved. Fix SMTP delivery and retry only the failed email step; do not replay the form, lookup or save. If execution data is unavailable, recover the record ID and routing metadata from Appdor and send the internal notification manually. Check the SMTP provider for uncertain delivery before resending.
Verify before activating
Run these checks with synthetic names, an email you control and “Integration test — no customer data” as the message. The download requires verification in your own Appdor, n8n and SMTP setup.
- Submit a new email as Sales / Normal. Confirm one record with
Status = New, the expected source and receipt time, and one notification to the sales inbox. - Change that record's Status in Appdor. Submit the same email again with different letter casing and a new message. Confirm the same record ID, replaced
LastMessage, refreshed receipt time and preserved Status. - Test Support / Normal and Billing / Normal; confirm the configured queue and inbox for each. Test Urgent; confirm delivery to the urgent inbox only.
- Verify missing names, invalid or oversized emails, oversized names and messages, and unsupported type or priority values are rejected without a save or email.
- Create two synthetic records with the same email and submit it. Confirm duplicate review stops both the save and notification.
- With test credentials, exercise failed lookup, rejected save and failed SMTP delivery. Confirm each failure stops at the appropriate branch and follow the recovery steps above. Check that notification text contains no submitted personal details.
- Resolve test failures, remove synthetic records, then activate the workflow and share its production form URL. Configure the form's access and spam protection for your audience.
This downloadable template is not an official n8n integration or an approved n8n gallery listing. It needs your configuration, credentials and live verification before use.