SMS Gateway
G K G Guru
Airtable SMS Integration
Airtable automation integration for database-driven SMS notifications.
Instant Notifications
Real-time SMS alerts for important events
Global Reach
Send SMS to 200+ countries worldwide
Reliable Delivery
99.9% uptime with delivery reports
Easy Integration
Simple REST API with webhooks
Requirements
Before you begin:
- Active SMS Gateway account with API access
- API Key from your dashboard
- Airtable account with webhook/API access
- Basic understanding of REST APIs
Setup Guide
-
Get Your API Key
Log in to your SMS Gateway dashboard and navigate toSettings > API Keysto generate a new API key. -
Configure Airtable Webhook
In your Airtable settings, configure a webhook URL pointing to your application endpoint. -
Create SMS Handler
Set up an endpoint in your application to receive Airtable webhooks and send SMS via our API. -
Test the Integration
Trigger a test event in Airtable and verify SMS delivery.
Webhook Integration
Create a webhook endpoint to receive events from Airtable and trigger SMS notifications.
Webhook Handler (Node.js)
JavaScriptconst express = require('express');
const axios = require('axios');
const app = express();
app.use(express.json());
// SMS Gateway configuration
const SMS_API_KEY = process.env.SMS_API_KEY;
const SMS_API_URL = 'https://whitelabled.securesmsc.com/api/v2/sms/send';
// Webhook endpoint for Airtable
app.post('/webhook/airtable', async (req, res) => {
try {
const event = req.body;
// Extract relevant data from the event
const phoneNumber = event.phone || event.mobile;
const message = formatMessage(event);
if (phoneNumber && message) {
await sendSMS(phoneNumber, message);
}
res.status(200).json({ success: true });
} catch (error) {
console.error('Webhook error:', error);
res.status(500).json({ error: 'Internal server error' });
}
});
async function sendSMS(recipient, message) {
const response = await axios.post(SMS_API_URL, {
sender_id: 'NOTIFY',
recipient: recipient,
message: message,
route: 'transactional'
}, {
headers: {
'Authorization': `Bearer ${SMS_API_KEY}`,
'Content-Type': 'application/json'
}
});
return response.data;
}
function formatMessage(event) {
// Customize message based on event type
return `Airtable Notification: ${event.type || 'New event'} - ${event.description || 'Check your dashboard'}`;
}
app.listen(3000, () => console.log('Webhook server running'));
Webhook Handler (Python)
Pythonfrom flask import Flask, request, jsonify
import requests
import os
app = Flask(__name__)
SMS_API_KEY = os.environ.get('SMS_API_KEY')
SMS_API_URL = 'https://whitelabled.securesmsc.com/api/v2/sms/send'
@app.route('/webhook/airtable', methods=['POST'])
def handle_webhook():
try:
event = request.json
phone_number = event.get('phone') or event.get('mobile')
message = format_message(event)
if phone_number and message:
send_sms(phone_number, message)
return jsonify({'success': True}), 200
except Exception as e:
return jsonify({'error': str(e)}), 500
def send_sms(recipient, message):
headers = {
'Authorization': f'Bearer {SMS_API_KEY}',
'Content-Type': 'application/json'
}
data = {
'sender_id': 'NOTIFY',
'recipient': recipient,
'message': message,
'route': 'transactional'
}
response = requests.post(SMS_API_URL, json=data, headers=headers)
return response.json()
def format_message(event):
event_type = event.get('type', 'New event')
description = event.get('description', 'Check your dashboard')
return f'Airtable Notification: {event_type} - {description}'
if __name__ == '__main__':
app.run(port=3000)
Code Examples
Send SMS via API
cURLcurl -X POST "https://whitelabled.securesmsc.com/api/v2/sms/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sender_id": "AIRTAB",
"recipient": "1234567890",
"message": "Your Airtable notification: Event triggered successfully!",
"route": "transactional"
}'
PHP Integration
PHP<?php
class AirtableSmsIntegration
{
private $apiKey;
private $apiUrl = 'https://whitelabled.securesmsc.com/api/v2/sms/send';
public function __construct($apiKey)
{
$this->apiKey = $apiKey;
}
public function sendNotification($phone, $event)
{
$message = $this->formatMessage($event);
$data = [
'sender_id' => 'AIRTAB',
'recipient' => $phone,
'message' => $message,
'route' => 'transactional'
];
$ch = curl_init($this->apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $this->apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
private function formatMessage($event)
{
return "Airtable Alert: " . ($event['type'] ?? 'Notification') .
" - " . ($event['description'] ?? 'Check your dashboard');
}
}
// Usage
$sms = new AirtableSmsIntegration('YOUR_API_KEY');
$result = $sms->sendNotification('+1234567890', [
'type' => 'New Event',
'description' => 'Action required'
]);
print_r($result);
?>
Common Use Cases
Event Notifications
Send instant SMS alerts when important events occur in Airtable.
- New lead or customer notifications
- Status change alerts
- Deadline reminders
Team Alerts
Keep your team informed with SMS notifications for critical updates.
- Assignment notifications
- Urgent task alerts
- Escalation messages
Troubleshooting
Common Issues
SMS Not Delivering
- Verify your API key is correct and active
- Check the phone number format (include country code)
- Ensure you have sufficient SMS credits
- Check for any sender ID restrictions in the destination country
Webhook Not Triggering
- Verify the webhook URL is publicly accessible
- Check Airtable webhook logs for errors
- Ensure your server returns a 200 status code
- Verify SSL certificate is valid (HTTPS required)
Need Help?
Contact our support team at smsalerts.noreply@racksserver.com or check our API documentation.
Contact our support team at smsalerts.noreply@racksserver.com or check our API documentation.