Escalate process serving attempts and draft affidavits with OpenAI and Slack
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Edit Fields (Set)
n8n-nodes-base.set - Google Drive
n8n-nodes-base.googleDrive - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge
What it does
Quick overview This workflow collects process-server attempt logs via an n8n form, updates a case tracker in n8n Data Tables, classifies field notes with OpenAI, escalates eligible cases for attorney approval in Slack, and drafts an affidavit saved to Google Drive and staged to a court e-filing HTTP API. How it works 1. Receives a new service-attempt submission from an n8n Form trigger. 2. Looks up the matching case in an n8n Data Table and computes the next attempt count, days until the SOL deadline, and whether alternate service is eligible. 3. Uses OpenAI (gpt-4o-mini) to classify the attempt outcome notes into a single category (for example served successfully, wrong address, or no answer). 4. If the case meets the alternate-service rule and is not already authorized or served, sends a Slack approval request to case-approvals and waits for an attorney response. 5. Sets the case status (served, alternate service authorized, pending/denied, or continuing attempts) and upserts the updated case record back into the n8n Data Table. 6. If the case is ready to close (served or alternate service authorized), generates an affidavit-of-service text draft, saves it to Google Drive, and posts a draft filing payload to the court e-filing API via HTTP. 7. Posts a one-line status update for the attempt to Slack in case-tracking. Setup 1. Create an n8n Data Table named processservingcases with columns used by the workflow (at least casenumber, attemptcount, firstattemptdate, soldeadline, altserviceauthorized, and casestatus). 2. Add OpenAI API credentials for the OpenAI chat model used by the text classifier. 3. Add Slack credentials, and update the target channels (case-approvals and case-tracking) to match your workspace. 4. Add Google Drive OAuth2 credentials and replace CASEAFFIDAVITSFOLDERID with the destination folder ID. 5. Configure an HTTP Header Auth credential for the e-filing endpoint and replace the example URL and body fields to match your court/vendor API. 6. Review and adjust the escalation rule in the attempt/SOL computation code (currently 3 attempts within 30 days, with SOL urgency at 14 days) to match your jurisdiction and policy. Requirements - n8n Data Table: An active data table named processservingcases configured with the columns: casenumber, attemptcount, firstattemptdate, soldeadline, altserviceauthorized, and casestatus. - OpenAI API Key: Authenticated on the GPT-4o-mini for Outcome Classification chat model node (gpt-4o-mini, temperature 0) powering the Text Classifier. - Slack Bot & User Token: Credentials configured for interactive attorney authorizations in Request Alt-Service Approval (sendAndWait in case-approvals) and operational broadcasts in Post Case Status Update (case-tracking). - Google Drive OAuth2: Authenticated with write permissions for Save Affidavit to Drive targeting your dedicated storage directory (CASEAFFIDAVITSFOLDERID). - Court E-Filing API Access: Header Auth credential or bearer API token configured for the Submit to Court E-Filing API HTTP Request node (POST /api/filings). - Field Intake Data: Process server log submissions via the Form Trigger containing casenumber, defendant, address, and unstructured outcomenotes. Customization - Jurisdiction-Specific Diligence Rules: Adjust the escalation logic in Compute Attempt Count & SOL Countdown from the standard 3-attempt / 30-day threshold to reflect your state's statutory requirements for alternate/substitute service. - Outcome Taxonomy Expansion: Add custom categories (such as hostiledog, gatedcommunity, or movednoforwarding) to Classify Attempt Outcome to match specific field server terminology. - Attorney Approval Channel: Swap the Slack sendAndWait node with a Gmail sendAndWait step if your firm's managing attorneys prefer email-based sign-offs. - Affidavit Legal Boilerplate: Customize the deterministic template in Generate Affidavit of Service Draft to include your county- or court-specific statutory declarations, notary blocks, or