{"product_id":"n8n-detention-claim-approval-workflow-openai-gmail-tms","title":"n8n Detention Claim Approval Workflow: OpenAI, Gmail \u0026 TMS","description":"\u003ch3\u003eAutomatically calculate, draft, approve, and commit carrier detention claims—using n8n, OpenAI, Gmail, and your TMS API\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n Detention Claim Approval Workflow\u003c\/strong\u003e captures carrier detention submissions from an \u003cstrong\u003en8n Form\u003c\/strong\u003e, calculates billable detention with free-time and tier caps, drafts a settlement offer with \u003cstrong\u003eOpenAI\u003c\/strong\u003e, routes approvals through \u003cstrong\u003eGmail\u003c\/strong\u003e, and—once approved—posts the charge to your \u003cstrong\u003eTMS accessorial-charge API\u003c\/strong\u003e while logging outcomes in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a carrier submission\u003c\/strong\u003e via an n8n Form including load details, timestamps, carrier tier, and the contracted detention rate.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes input and calculates billable detention\u003c\/strong\u003e: applies \u003cstrong\u003e2 hours of free time\u003c\/strong\u003e, uses \u003cstrong\u003etier-based daily caps\u003c\/strong\u003e, and outputs the final detention amount.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDetermines the approval path\u003c\/strong\u003e:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cstrong\u003e$150 or less\u003c\/strong\u003e: auto-approval.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eAbove $150\u003c\/strong\u003e: calls \u003cstrong\u003eOpenAI\u003c\/strong\u003e to draft a settlement offer email body (optionally using an HTTP carrier-performance lookup tool for tier\/on-time context).\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the offer for broker manager review in Gmail\u003c\/strong\u003e and waits for an \u003cstrong\u003eApprove\/Reject\u003c\/strong\u003e decision.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCommits approved charges to your TMS\u003c\/strong\u003e using the TMS accessorial-charge API, then emails the carrier a confirmation via Gmail.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHandles rejection\u003c\/strong\u003e: appends a rejection record and denial message via \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e and Gmail.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAudits every outcome\u003c\/strong\u003e: logs approved\/rejected results to Google Sheets for reporting.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eStreamline detention\/accessorial claim processing from intake to TMS posting—without manual calculations.\u003c\/li\u003e\n  \u003cli\u003eStandardize settlement language for higher-value claims using OpenAI-assisted drafting.\u003c\/li\u003e\n  \u003cli\u003eRoute approvals to a broker manager with a clear Gmail-based approve\/reject step and auditable logs.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003en8n nodes\/logic: \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003egmail\u003c\/strong\u003e, \u003cstrong\u003emerge\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003eIntegrations: \u003cstrong\u003eOpenAI\u003c\/strong\u003e, \u003cstrong\u003eGmail\u003c\/strong\u003e, \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, plus an HTTP \u003cstrong\u003eTMS accessorial-charge API\u003c\/strong\u003e (and optional carrier-performance lookup API)\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45967499395251,"sku":"N8N-19273","price":78.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/B-ZQG9G0C9cjakQI4lkQN_9FlJZ3b8.png?v=1788685495","url":"https:\/\/buyflowscripts.com\/products\/n8n-detention-claim-approval-workflow-openai-gmail-tms","provider":"N8N Commerce","version":"1.0","type":"link"}