How to send an SMS to save the website to Google Drive
This is a quick way to save an article or a website. Just send SMS to yourself and save the website as a PDF file to your Google Drive account to read later.
This is a quick way to save an article or a website. Just send SMS to yourself and save the website as a PDF file to your Google Drive account to read later.
Right now, you can set up this convenient automation feature in just a few steps! Let's find out soon!
How to send an SMS to save the website to Google Drive
- Step 1: Send SMS to Google Sheets with IFTTT
- Step 2: Save URL to Google Drive
- Step 3: Activate the script on the sheet update
- Step 4: Run your script test
Step 1: Send SMS to Google Sheets with IFTTT
You do not have to sign up for any paid services to save pages and read offline. The first step is to set up automation so you can send SMS to Google Sheets. You will do this by activating an IFTTT applet.
First, access IFTTT (create an IFTTT account if you don't have an account yet), click My Applets, and then New Applet.
Click This, then type SMS in the search field.
Select SMS.
Select Send IFTTT an SMS tagged .
Next, enter #savepage into the Tag field .
This requires IFTTT to activate the applet anytime you send IFTTT an SMS message, and whether to use the #savepage tag in the message.
Don't worry about phone numbers to send messages, you'll get that number after this process.
You are about to complete this step. Click Create trigger, then on the next page, click That.
This step will take you to the Action search page .
Write a new field in the Google spreadsheet to store the URL of the website you want to save.
Search for 'Sheets' and select Sheets action.
On the next page, you will select Update cell in spreadsheet .
This tells IFTTT that whenever you send an SMS starting with #savepage, you want IFTTT to update a specific box in your spreadsheet with your Google Drive account.
The next page is where you set up specifics for this action.
Set the fields on the next page as follows.
- Path drive folder : IFTTT / SMS
- Spreadsheet name : Article Warehouse
- Which cell : A2
- Value: {{Message}}
Before you click Create, visit your Google Drive account, create an IFTTT / SMS folder and create a spreadsheet to keep the URL you send.
The spreadsheet will look like this:
Name the worksheet with the name you specified in the Spreadsheet field name.
As you can see, cell A2 is empty and ready to receive the URL value that you are about to send to IFTTT via SMS.
Now, back to IFTTT, click Create.
Write down the phone number you need to send SMS to save the website you want to read later.
Step 2: Save URL to Google Drive
Now, you have a system that automatically sends the URLs you want to save to Google Sheet.
Next, you'll need to create a Google Script to convert that URL into a PDF file and save it in the special 'MyArticles' folder in your Google Drive account. Don't worry, the script has been written for you and it's very simple.
But first, create a new folder in your Google Drive account called 'MyArticles'. Right click on it and select Get shareable link .
Paste it into notepad and set it aside. You will need this special ID later.
Now, let's go back to the Google Sheet page called the Article Warehouse that you created above.
To create a new Google Script, click Tools and then click Script editor. Rename this project to SaveURL. Then paste the following script into Code.gs:
function myFunction () {
var ss = SpreadsheetApp.getActiveSpreadsheet ();
var sheet = ss.getSheetByName ('Sheet1');
var range = sheet.getRange (2,1);
var data = range.getValue ();
var URLtext = data.substring (10, data.length)
var response = UrlFetchApp.fetch (URLtext);
var htmlBody = response.getContentText ();
var blob = Utilities.newBlob (htmlBody, 'text / html'). getAs ('application / pdf'). setName (Date () + '_MyArticle.pdf');
var folder = DriveApp.getFolderById ("")
var file = folder.createFile (blob);
}
Here's how to do this step by step in this script:
1. Drag the cached URL in cell A2 (this is the 'getRange (2.1)' done).
2. Get the first 10 characters, followed by '#savepage', from the URL string.
3. Fetch web pages from the Internet.
4. Convert website to PDF format.
5. Save the PDF file to the drive you specified.
In the script, replace "" with the ID of the directory in the notepad file you saved above.
Save this script by clicking the save drive icon.
Step 3: Activate the script on the sheet update
You want your script to run every time the spreadsheet changes, and a change in the spreadsheet means you sent a new SMS containing a URL to save.
To do this, in the Script Editor window , click Edit and then click Current project's triggers .
You will see that there are no triggers available for this project.
Click on the blue link Click here to add one now .
Configure the trigger by setting "Run" to myFunction and "Events" to From spreadsheet and On change .
Now your whole project is complete and ready to run!
Step 4: Run your script test
On your mobile phone, send SMS to the phone number you listed above. Make sure to include '#savepage' in front of the URL.
Just copy the URL from the browser window on your mobile phone and paste that URL into the SMS message.
Next, check to make sure IFTTT is working properly.
Access your IFTTT account, click on the Applet you created for this project and check when it last ran.
If everything works normally, the last time it runs will be close to the current time.
Once you have confirmed that your IFTTT application is working, go to your Google Drive account and check the folder you created for your article.
You will see a new PDF file appear in the last few minutes.
Open the PDF file and make sure it has saved the website accordingly.
You will notice that images from the page are not included in the PDF version.
In fact, the removal of images is useful and there are several reasons for this.
It greatly reduces the size of PDF files stored in the drive. It also lets you focus on saving the text you want to read later, and it makes the later skimming process less distracting.
This is a very effective way to quickly save web-based academic materials, news stories you want to read later, or any other online text you want.
This is just an example. There are many other examples of how you can increase your productivity with Google Scripts.
Good luck!
See more:
- How to backup SMS messages with SMS Backup and Restore
- How to backup and restore Zalo messages on Android phones
- 7 things you can do with email inbox without you knowing
You should read it
- Download files and websites directly from Google Drive in Chrome browser
- [Infographic] How to become a 'power' user of Google Drive
- Gmail for directly saving attachments to Google Drive
- How to backup SMS messages with SMS Backup and Restore
- Google Drive closed, replaced with Backup and Sync
- Summary of useful shortcuts on Google Drive
- Google Drive 4,2021.46200, Download Google Drive here
- Don't miss these 9 useful Google Drive tricks!
- How to get 1TB of Google Drive capacity for free
- How to use Google Drive like free FTP server or Network Drive
- Will Google Drive back up photos and videos instead of Google+?
- Useful features on Google Office applications that you don't know yet