Sending Messages (iMessage/SMS) with Drafts

app-icon

Screencast

Messages Basics

Drafts can send messages using Apple’s Messages app with the Message action step. The Message step works by opening a Message window pre-filled with information configured in the action step – which can include the text of the message, and also it’s recipients.

Since the app uses the Message app’s own interfaces, Message will be sent exactly as they would if you opened the Messages app to send them. Recipients can be iMessage or SMS/MMS and messages initiated in Drafts will go into the same conversation history as if they were sent in Messages.

Drafts ships with a default Message action which takes the full text of the current draft and pre-fills it ready to send in the Messages window. You then add one or more recipients, and tap the send button.

Customizing Message Actions

Message action steps can be configured to include one or more pre-defined recipients. Recipients can be added by selecting from contacts or simply entering valid phone numbers or iMessage-enabled email addresses separated by commas.

Message action steps also have a template that defines the text to be inserted. This template typically defaults to [[draft]] which inserts the content of the current draft, but can contain other boilerplate text or template tags.

Messages App

In addition to being use to send messages, Drafts offers an iMessages app which allow text from drafts to be inserted into conversations from the Message app. You can find details about using Drafts as a snippet library in the Messages app on our documentation site.

Scripting

Note that the functionality of the Messages action step can also be used from scripted actions using the Message object. Details and example code at the scripting reference.

7 Likes

If I want to send the same message to multiple people, iOS forms a group and sends it, thereby creating a group. That isn’t as useful as it would be if I want the message to go independently and individually to a list of contacts. Can that be done? Is there an action for the same?

You can use the Message object look here and send the same message to a list of numbers in a loop. I think this will be very anoying because you would have to manually click the send button everytime.
The better option would be to use a iOS Shortcut wit the Run Shortcut Action - there you can define the receipients statically or choose them from a list and then loop through them and send every message in background.

That was useful, but could you direct me to the actual shortcut?

Just create One with „Send Message“, insert your receipients and Save it. then you can use it with the Run Shortcut Action.