Apps Script is a cloud-based JavaScript platform powered by Google Drive that lets you integrate with and automate tasks across Google products.
This repository contains a Google Apps Script function that sends a test SMS message via SMS Gateway for Android™.
- A Google account to access Google Apps Script.
- An Android device with the SMS Gateway app installed and configured.
- Your SMS Gateway API username and password.
Follow these steps to set up and use this script:
-
Open Google Apps Script:
- Go to Google Apps Script.
- Click
New Project
.
-
Copy and paste the content of the code.gs file into the script editor.
-
Set up script properties:
- Navigate to
Project Settings
(gear icon). - Add the following script properties:
username
: Your SMS Gateway API username.password
: Your SMS Gateway API password.
- Navigate to
-
Save the project and run the
sendSMS
function:- Click on the play button
▶️ in the toolbar. - Grant permissions when prompted.
- Click on the play button
-
Check the execution logs (
View > Logs
) to verify the status of the SMS message.
The script uses the following properties to authenticate with SMS Gateway:
username
: Your SMS Gateway API username.password
: Your SMS Gateway API password.
You can manage these properties in Project Settings
under the Script Properties
section.
The sendSMS
function sends a test SMS message to a predefined number.
To customize:
- Update the
data.message
field in the script with your custom message. - Add or modify phone numbers in the
data.phoneNumbers
array.
The script sends the SMS via the SMS Gateway API and logs the response in the execution logs.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Built with Codeium.