Automate SMS Sending with SMSlenz and Zapier
Do you want to send SMS messages automatically without doing it manually every time? With SMSlenz and Zapier, you can easily set up an SMS automation that saves you time and effort. Whether you’re sending reminders, notifications, or promotional messages, this guide will show you how to connect SMSlenz to Zapier and send SMS messages in just a few simple steps.
Example: Send SMS When a New Row is Added to Google Sheets
Let’s say you have a Google Sheet with customer phone numbers and messages. You can set up a Zap to send an SMS automatically whenever a new row is added to the sheet. You can even use AI to personalize the message based on the data in the Google Sheet!
- Trigger: New row in Google Sheets.
- Action: Send SMS via SMSlenz API.
- Result: The customer receives a personalized SMS instantly!
Step-by-Step Setup - Webhooks by Zapier
- Create a Zapier Account:
- Go to Zapier and sign up for a free account.
Click on “Create Zap” to start building your automation.
- Choose Google Sheets as the Trigger:
- Select Google Sheets as the trigger app.
- Set the trigger event to “New Row”.
Connect your Google account and select the specific sheet and column containing the data.
- Add an Action to Send SMS:
- Click on “Action” and search for “Webhooks by Zapier”.
- Choose “POST” as the request type.
- Configure the Webhook:
- URL: Enter the SMSlenz API endpoint: https://smslenz.lk/api/send-sms
- Payload Type: Select JSON.
- Data (Key-Value Pairs): Enter the following details in the key and value fields:
- Key: user_id, Value: YOUR_USER_ID
- Key: api_key, Value: YOUR_API_KEY
- Key: sender_id, Value: YOUR_SENDER_ID
- Key: contact, Value: Map the recipient’s phone number from your Google Sheet (e.g., +94712345678).
- Key: message, Value: Map the SMS content from your Google Sheet or use AI to generate a personalized message.
- Headers: Add the following key-value pair:
Key: Content-Type, Value: application/json
- Test and Publish:
- Click “Test & Continue” to check if the SMS is sent successfully.
- If the test works, click “Publish Zap” to activate your automation.
For a visual guide on how to set up this automation, check out this video tutorial:
👉 Zapier AI Tutorial for Beginners: Automation Made Simple
Step-by-Step Setup - Code by Zapier
- Create a Zapier Account:
- Go to Zapier and sign up for a free account.
- Click on “Create Zap” to start building your automation.
- Choose a Trigger:
- Select an app that will trigger the SMS (e.g., Google Sheets, Google Forms, or any other app).
- Configure the trigger event (e.g., a new row in Google Sheets or a new response in Google Forms).
- Add a Code Step:
- Click on “Action” and search for “Code by Zapier”.
Select “Run JavaScript” as the action.
Map Input Data:
- In the Input Data section, map the following fields from your trigger app:
- userId: Your SMSlenz user ID.
- apiKey: Your SMSlenz API key.
- senderId: Your SMSlenz Sender ID.
- contact: The recipient’s phone number (e.g., +94712345678).
- message: The SMS content you want to send.
- In the Input Data section, map the following fields from your trigger app:
- Paste the JavaScript Code:
- Copy and paste the following code into the code editor:
const sendSMS = async (userId, apiKey, senderId, contact, message) => { const url = "https://smslenz.lk/api/send-sms"; const data = { user_id: userId, api_key: apiKey, sender_id: senderId, contact: contact, message: message }; // Send the request without handling the response or errors await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(data) }); // Return a success message to Zapier return { success: true, message: "SMS sent successfully" }; }; // Call the function using your data return await sendSMS(inputData.userId, inputData.apiKey, inputData.senderId, inputData.contact, inputData.message);
Test and Publish:
- Click “Test & Continue” to check if the SMS is sent successfully.
- If the test works, click “Publish Zap” to activate your automation.
Start Automating Today!
With SMSlenz and Zapier, you can send SMS messages automatically and save hours of manual work. Whether you’re a business owner, marketer, or team leader, this integration will make your life easier.
Ready to get started? Sign up for SMSlenz and Zapier today, and start automating your SMS messages!