Slack Integration
Send notifications and alerts directly to Slack channels.
Overview
Send real-time notifications to Slack when events occur in PropTechUSA.
Setup
1. Create Slack Webhook
2. Configure in PropTechUSA
await proptech.integrations.slack.configure({
webhookUrl: 'https://hooks.slack.com/services/xxx/xxx/xxx',
channel: '#leads',
events: ['lead.created', 'offer.accepted'],
});
3. Customize Messages
await proptech.integrations.slack.configure({
webhookUrl: process.env.SLACK_WEBHOOK_URL,
templates: {
'lead.created': {
text: '🎉 New lead from {{lead.source}}!',
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: 'New Lead\n{{lead.name}} ({{lead.email}})',
},
},
],
},
},
});
Available Variables
| Variable | Description |
|---|
{{lead.name}} | Lead's full name |
|---|---|
{{lead.email}} | Lead's email |
{{lead.phone}} | Lead's phone |
{{lead.source}} | Lead source |
{{property.address}} | Property address |
{{offer.amount}} | Offer amount |
Example Notification
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🏠 New Lead Received"
}
},
{
"type": "section",
"fields": [
{ "type": "mrkdwn", "text": "Name:\nJohn Doe" },
{ "type": "mrkdwn", "text": "Phone:\n555-1234" },
{ "type": "mrkdwn", "text": "Source:\nGoogle Ads" },
{ "type": "mrkdwn", "text": "Property:\n123 Main St" }
]
}
]
}