Schedule a text? (Write now, send later)

Personally I’d have a system save the messages to Data Jar, and then when you open Messages check if it’s after the specified time and if so, send it.

I’d have each message as something like this:

{
    "message": "Hi TJ!",
    "to": "123-456-7890",
    "sendAfter": "2020-09-01 09:00"
}

Then once the message is sent, the Data Jar entry could be deleted.

2 Likes

I use launch Center pro to schedule the message on due. See if it works for you. The double curvy brackets implies url encoded so you can create a Apple shortcut for it.

due:///add?title={{Scheduled SMS - launch://messaging?to={{+1234567890123}}&body={{Test}}}}&hourslater={{2}}&x-success={{launch:}}

1 Like

I’ve created this concept with DataJar and Shortcuts, though I’m sure you could store it in JSON and keep it somewhere on the cloud.

TLDR: I’ve created three shortcuts

  1. Plan delayed texts: schedules messages to go out on some day the next week
  2. Delayed texts report: previews any texts to go out the next day in case I need to make changes.
  3. Send Delayed texts: sends any scheduled messages for today and deletes it from DataJar

Here are a few more details:

  • I wanted to schedule only for the next week; to me, if I think of a text I need to send next month, it’s more email territory.
  • I have a dictionary called “delated_texts” in DataJar that holds 7 internal dicts named “Sunday” “Monday” etc. for the upcoming days.
  • I wrote a shortcut called “Plan Delayed Texts” that asks three questions: 1) what contact do I want to send it to (it grabs the contacts cell number), 2) what message I want to send, and 3) what day I want the text to go out. It stores a dictionary with two text items (“number” and “message”) in the proper day.
  • Each day, I run a report that 1) reports any planned messages for the next day (in case I need to adjust something in the message or remove it) and 2) sends out any messages for the day before deleting the them from DataJar. This reporting feature ensures I don’t send out any messages when they no longer make sense.
  • I send it at 8:01 am each day automatically (iOS 14 automation) so it looks slightly less planned than 8:00am sharp. Also, it’s unlikely that something would have changed that early to make sending the message out no longer necessary.

Anyhow, that’s a bit stream of consciousness, but hope it’s helpful.

I like the idea of having it send when I open Messages…need to give this some thought :slight_smile:

I just created two Shortcuts:

This uses Data Jar. I decided that sending a message after X hour was good enough for me, but you could change the date picker to date and time and remove my Hours section altogether (along with other appropriate updates).

The second shortcut can be attached to whatever automation trigger you like. Or, if like me you have a spare iPhone running the Pushcut Automation Server, you can schedule it regularly through that.

2 Likes

I created a Shortcut using Data Jar and Pushcut but wrote about it in a new thread as this initially seemed a macOS based need (and it is tagged macOS). As others are linking their Shortcut solutions, I thought I’d drop a link to my version:

Also @RosemaryOrchard, the Scheduled Messages link is broken for me (iOS Public Beta 7):

Let’s try another link, this is sadly a beta problem.

https://www.icloud.com/shortcuts/c6f8eff1beee43c5997120071beed414

2 Likes

That worked, thanks.

Wrote up the process with plug-and-play Shortcuts if anyone is interested in scheduling delayed texts.

3 Likes

@RosemaryOrchard I know this is a little late, but I only now got around to trying out that “send delayed messages” shortcut.

I found the following issue.

If there are multiple messages sent in one session and the script needs to delete multiple entries in the Data Jar dictionary, the script runs into the problem of incorrect messages being deleted from the Data Jar dictionary.

The script is deleting “Send Later.1” first then “Send Later.2” second etc.
The problem is that after the first message is deleted from Data Jar, everything shifts up one index.

I’ve made the following changes to the script:
Send Delayed Messages (Please let me know if there’s a more elegant way of doing this)

  • instead of deleting the message during the repeat loop, I have the index number of each message added to the variable, “Index to delete”
  • after all the messages have been sent, this list of indexes are reversed (largest number first)
  • the script then deletes the messages using this reversed list of indexes
1 Like

I really appreciate everyone’s work here, but I keep running into a problem. I’ve tried all of the methods above, but they all lead me to having no value for the phone number in data jar. Or I get a message in shortcuts after Push Cut has done its thing that says “Send Message failed because Shortcuts couldn’t convert from Text to Contact, Phone number, or Email address”. I know I must have something set up wrong, but I can’t figure it out. Any help is appreciated.

Any chance you can share exactly what you have set up so that others can try it out and analyse it? Otherwise it’s like being a CSI trying to process a room from outside, with the door closed.

I’ve just tried running my Scheduled Messages Shortcut (re-downloaded from above to make sure it was the same one) and it is no longer working… One of the iOS updates seems to have broken something. I will try to have a look at it when I get home.

My apologies. I am not sure of the best way to share the shortcut I have been trying. Here is a screenshot of 72 steps.

Here is a screenshot of the resulting entry in Data Jar.

I have confirmed that the intended recipient does have a phone number and have tried it on multiple recipients.

I believe this was Tony’s shortcut. Giving credit, not blame.

And to be clear, I am getting the same problem with each of the solutions I have found. I suspect it is a fault in an update.

Thank you all for any advice you can offer

Unfortunately, a screenshot isn’t something that can be debugged when magic variables can reference different actions of the same name, etc.

If you use the share menu for the shortcut, you’ll see an option to share an iCloud link to your Shortcut - this is the standard way to share shortcuts. Just be sure to duplicate and remove any personally identifiable information before any sharing a link.

Here (try again) is an updated version of the Shortcut. There are a couple of minor issues that I have come across over a couple of iOS updates:

  1. Get Details from Contact seems to get changed to look for Groups instead of the Phone Numbers that it should be using – reset to look up the phone nuber.

  2. At times, using Shortcut Input during the Shourtcut fails to have the correct value (any value?) – Shortcut Input assigned to a variable at the very start of the Shortcut and the variable used further down the Shortcut to mitigate.

Ensure that the latest versions of the Shortcuts are imported into Pushcut. There is also an issue with Shortcuts on iOS 15.2 that are in folders; All Shortcuts only lists Shortcuts that are not in another folder, causing only a limited set of Shortcuts to be impoted into Pushcut. As a workaround, move the Shortcut to the All Shortcuts folder before running the Pushcut import.

The Shortcut is now working for me; hopefully this will iron out your issues as well.

Hope this helps.

I think that link’s a bit broken…

Just noticed that as it posted… it seems to work atill, but I will try to get it to format better…

Updated the link – initially created the link on macOS and it didn’t seem to like it!

Thank you for your help on this. I thing it gets me to where I need to be.