Today, let's discuss the problem of number retention for Google Voice. This article will use Google Apps Script to achieve automatic number retention and greatly reduce the risk of account suspension.
Update on February 1, 2024: Number retention has been stable for 4 months in a row 🎉
Forwarding Text Messages to Email#
On the web page, log in to Google Voice, go to the settings page, and open "Forward messages to email address". This way, any incoming and outgoing text messages will be forwarded to your email:
Obtain the ID of Mutual Friends#
Go to the Google Voice web page and find a number that you have exchanged text messages with. Copy their number, for example:
Then search for this number in your email, and you will see the history of incoming and outgoing messages. Click on any message.
Note: If you have just enabled the function to forward messages to your email in the first step, there may not be any previous records in your email. In this case, ask your mutual friend to send you a text message. If you don't have any mutual friends, you can find one here.
After opening a message, copy the part inside the <> brackets, for example:
15153296615.12674773683.wcX4KJ99Sm@txt.voice.google.com
Set Up Google Apps Script#
Go to Google Apps Script, create a new project, copy the following code into the editor, and replace the ID you just copied. Then save:
function autoReplier() {
MailApp.sendEmail("Replace with your content", "Automatic number retention", "Number retained!");
}
Then find the triggers and click "Add Trigger" in the bottom right corner:
Change the trigger time type to "Weekly timer" (send a text message once a week) or "Monthly timer" (send a text message once a month), then save:
You can go back to the editor and click "Run" to test if it is successful. The execution log will pop up below. Check if the text message is sent successfully on the Google Voice web page (don't test too many times!):
At this point, the automatic number retention script is set up. Apps Script will automatically send text messages to your friends according to the timer you set. The following are some additional steps. If you need them, you can continue reading. If not, you can close this tutorial.
Set Up Labels in Email#
Go to email settings:
Create a new filter:
Fill in the "To" field with the "Friend ID" you just copied, and fill in the "Has the words" field with "Number retention". Then click "Create filter":
In the pop-up window, check "Apply the label", create a new label, enter a name (e.g., "Number Retention"), click "Create", and then click "Create filter":
From now on, the number retention messages (previous ones will not be displayed) will be collected under this label for easy reading and viewing.