Built for startups,
scaled for unicorns
Successfully submitted!
Error! Please try again
Keeping your team informed about referral activity in real-time creates accountability, urgency, and excitement. Slack is where modern teams communicate, so putting referral notifications in Slack means your sales team sees new referral leads instantly, your marketing team can track program momentum, and leadership can watch revenue attribution happen live.
This guide covers setting up a direct GrowSurf-to-Slack integration using Slack's Incoming Webhooks. Unlike the Zapier approach, this method gives you full control over message formatting, is completely free, and has zero third-party dependencies. You'll build a webhook handler that receives GrowSurf events and posts formatted messages to Slack.
Set up a Slack app that can post messages to your workspace channels.
Create a server endpoint that receives GrowSurf webhook events and forwards formatted messages to Slack.
/api/growsurf-slack)Use Slack's Block Kit to create visually appealing and information-rich referral notifications.
Send different types of referral events to appropriate Slack channels.
#referrals-all β all referral activity (high volume)#sales-leads β only converted referrals (sales team notification)#growth-wins β milestone achievements and top referrer alertsPrevent Slack notification fatigue during high-volume periods.
Validate your Slack integration end-to-end before going live.
// Direct GrowSurf to Slack webhook integration
const axios = require('axios');
const SLACK_WEBHOOKS = {
all: process.env.SLACK_WEBHOOK_ALL,
sales: process.env.SLACK_WEBHOOK_SALES,
wins: process.env.SLACK_WEBHOOK_WINS
};
function formatReferralMessage(event, participant, referrer) {
const eventEmojis = {
'PARTICIPANT_CREATED': ':wave:',
'PARTICIPANT_REFERRED': ':sparkles:',
'CAMPAIGN_REFERRAL_CONVERTED': ':tada:'
};
const eventLabels = {
'PARTICIPANT_CREATED': 'New Participant',
'PARTICIPANT_REFERRED': 'New Referral',
'CAMPAIGN_REFERRAL_CONVERTED': 'Referral Converted!'
};
return {
blocks: [
{
type: 'header',
text: {
type: 'plain_text',
text: `${eventEmojis[event]} ${eventLabels[event]}`
}
},
{
type: 'section',
fields: [
{ type: 'mrkdwn', text: `*Participant:*\n${participant.email}` },
{ type: 'mrkdwn', text: `*Referrer:*\n${referrer?.email || 'Direct'}` },
{ type: 'mrkdwn', text: `*Referral Code:*\n${participant.referralCode}` },
{ type: 'mrkdwn', text: `*Total Referrals:*\n${referrer?.referralCount || 0}` }
]
},
{
type: 'actions',
elements: [{
type: 'button',
text: { type: 'plain_text', text: 'View in GrowSurf' },
url: `https://app.growsurf.com/dashboard/campaign/${participant.campaignId}/participants`
}]
}
]
};
}
app.post('/api/growsurf-slack', async (req, res) => {
const { event, participant, referrer } = req.body;
const message = formatReferralMessage(event, participant, referrer);
// Send to appropriate channel
await axios.post(SLACK_WEBHOOKS.all, message);
if (event === 'CAMPAIGN_REFERRAL_CONVERTED') {
await axios.post(SLACK_WEBHOOKS.sales, message);
}
res.json({ success: true });
});Slack's Block Kit Builder lets you visually design and preview your notification messages. Design your referral notification format there first, then copy the JSON into your webhook handler. This saves time compared to trial-and-error with raw JSON.
Add buttons that link to the participant's GrowSurf profile, their company's website, and their LinkedIn profile. This gives sales reps one-click access to all the context they need to follow up on a referral lead immediately from the Slack notification.
Instead of real-time notifications, send leadership a daily digest at 9 AM with: total referrals yesterday, conversions, top referrer of the day, and program health metrics. Use a scheduled cron job that queries GrowSurf's API and posts a summary to a leadership channel.
You could point GrowSurf's webhooks directly at a Slack Incoming Webhook URL, but GrowSurf's payload format doesn't match Slack's expected message format. A handler in between lets you transform the data into a properly formatted Slack message with rich formatting, routing, and error handling.
Slack's Incoming Webhooks allow 1 message per second per webhook URL. If your referral program generates more than 60 events per minute, implement a message queue that batches notifications. For most programs, rate limits aren't an issue β it would require very high referral volume to hit them.
Yes, but this requires a more complex setup using Slack's interactive messages (Block Kit with actions) and a Slack app with an interactivity URL. The buttons would call your server, which then calls GrowSurf's API to approve or reject referrals. This is an advanced setup beyond basic notifications.
Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies
