Using a Garmin Inreach to receive automated news/rss/reddit content at sea

We opted to increase our Garmin Inreach plan to “unlimited messages” for our Atlantic crossing in order to keep in touch and receive our FastSeas weather routing.

(Speaking of unlimited messages, please feel free to send us a message from our map page any time while we’re at sea!) share.garmin.com/speck

With unlimited messages, this got us thinking how nice it would be to have world news/reddit/inspirational quotes sent to us automatically while at sea.

Here’s the solution we found:

Using the free web service “If This Then That” (IFTTT), we can automatically check websites like BBC, Reddit, and RSS feeds for updated content.

When an update is found in one of these sources, IFTTT sends an email with the content to a gmail address.

When the email is received, Gmail applies a label to the email.

Using Google Apps Script, we can have Google search through these labeled emails and strip out the text we want to send to the Inreach (just the title of each post to keep each message under the 160 character sms limit). This script can be set to run once per minute. (See update and code at bottom of page). A special thank you to ismailzai.com where the inspiration for this script came from.

The script then sends an email to an existing Google Voice <> Inreach message thread.

This delivers the message to the Inreach and syncs to the Earthmate iOS app with just the content we are looking for. Excellent!

World News, Inspirational Quotes, r/TodayILearned while at sea!

Update: be careful about how many automated messages you send to your Inreach. It is possible to back up your Inreach inbox causing subsequent inbound messages to be delayed (in our testing, a message is delivered to the Inreach one every 10-13 minutes). To avoid this issue, we have switched to a request based model.

This involved reworking the Gmail Labels and the Google code. See updated code below.

Show full script code
//This script was created and adapted to search for a "request" email, then sends a number of news emails/sms to a google voice/garmin inreach device
//I made a separate gmail account for this project, just in case.
//Make sure a collection of "content" emails are labeled as the "gmailMessageLabel" - in this example, "InreachMessage", and that a filter is set in gmail to categorize "inreachRequest" labels

function parseEmailByLabel() {
  var gmailRequestLabel = "InreachRequest",
        gmailMessageLabel = "InreachMessage",
        gmailParsedLabel = "sentToInreach",
        gmailRequestObject = GmailApp.getUserLabelByName(gmailRequestLabel),
        gmailMessageObject = GmailApp.getUserLabelByName(gmailMessageLabel),
        gmailParsedLabelObject = GmailApp.getUserLabelByName(gmailParsedLabel),
        threadsRequest = gmailRequestObject.getThreads(),
        threadsMessages = gmailMessageObject.getThreads(),
        messages,
        numberToSend,
        message,
        inreachAddress,
        newBody;
  
  Logger.log("Starting");

  if (threadsRequest) {
    // handle each thread (see https://developers.google.com/apps-script/reference/gmail/gmail-thread)
        for (var i = 0; i