You're In!
Your free Instagram comment trigger system is ready. Follow the three steps below to set it up in under 10 minutes.
How It Works
Notion Database
Add keywords and DM replies to a simple table
Supabase Matching
A code node matches comments to your keywords
Auto DM Reply
GHL sends the matching DM, completely free
Step 1: Notion Keyword Database
Create your keyword → reply mapping table
Step 2: GHL Workflow
Build the Instagram Auto-Reply workflow
Step 3: Supabase + Automation
Database table & Notion sync
Full Code Node, Copy & Paste
Replace the two config values at the top with your own
GHL Code Node, Match DM Comment
// Supabase config
const SUPABASE_URL = 'https://YOUR-PROJECT-ID.supabase.co';
const SUPABASE_SERVICE_ROLE_KEY = 'YOUR-SUPABASE-SERVICE-ROLE-KEY';
const comment = (inputData.comment || '').toLowerCase().trim();
if (!comment) {
output = { result: { matched: false, reason: 'Empty comment text' } };
return;
}
const headers = {
apikey: SUPABASE_SERVICE_ROLE_KEY,
Authorization: 'Bearer ' + SUPABASE_SERVICE_ROLE_KEY,
};
const url = SUPABASE_URL
+ '/rest/v1/dm_keyword_triggers'
+ '?is_active=eq.true'
+ '&trigger_type=in.(comment,both)'
+ '&select=id,keyword,message,user_id,follow_up_enabled';
let triggers;
try {
const res = await customRequest.get(url, { headers });
triggers = res.data;
} catch (err) {
const status = err && err.response ? err.response.status : '';
const body = err && err.response ? JSON.stringify(err.response.data) : String(err && err.message || err);
output = { result: { matched: false, reason: 'Supabase error ' + status + ': ' + body } };
return;
}
const match = (triggers || []).find(function (t) {
const kw = (t.keyword || '').toLowerCase().trim();
return kw && comment.indexOf(kw) !== -1;
});
if (match) {
output = {
result: {
matched: true,
reply_message: match.message,
trigger_id: match.id,
user_id: match.user_id,
keyword_matched: match.keyword,
follow_up_enabled: match.follow_up_enabled || false,
},
};
} else {
output = {
result: {
matched: false,
reason: 'No keyword match found',
comment_text: comment,
},
};
}
Replace
YOUR-PROJECT-ID with your Supabase project URL and YOUR-SUPABASE-SERVICE-ROLE-KEY with your service role key from Supabase Dashboard → Settings → API.Cost Comparison
ManyChat Pro
$15 to $99
per month
Chatfuel
$15 to $60
per month
100% Free
This System
$0
forever
GHL Instagram comment triggers are included free on all plans. Supabase free tier handles up to 500MB and 50K API calls/month.
Want More Systems Like This? AI Automation Insiders
- Done-for-you automation templates for lead gen
- 17-lesson Claude Code module, zero to deploying custom apps
- 2,000+ members building and deploying right now