From a3d59d8ea378eb69905e5771c07a2ba490fdc3dc Mon Sep 17 00:00:00 2001 From: Arnas Donauskas Date: Fri, 17 Apr 2026 21:42:20 +0300 Subject: [PATCH] fix(automations): Welcome Message template uses first_inbound_message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The template seeded trigger_type as new_contact_created, which only fires when the webhook auto-creates a contact row. A user who added or imported the contact manually before the contact first messaged would not hit the welcome flow — that's almost certainly not what the user setting up "Welcome Message" wants. first_inbound_message (added in PR #33) is the superset: fires the first time any contact — auto-created or pre-existing — sends us a customer message. Correct semantic for a welcome/greeting template. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/automations/templates.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/automations/templates.ts b/src/lib/automations/templates.ts index 8bb5bdd..5a4d260 100644 --- a/src/lib/automations/templates.ts +++ b/src/lib/automations/templates.ts @@ -33,7 +33,12 @@ export const AUTOMATION_TEMPLATES: Record