Skip to main content

Shortcuts on iOS and Mac

You can use Shortcuts to create tasks on your Apple devices.

tip

Upon setting up the shortcut, you can trigger it on your Mac using Spotlight. On iOS, shortcuts can be pinned to your homescreen as widgets. On Apple Watch, you can create new tasks easily using dictation. Shortcuts can also be triggered using Siri, allowing you to, for example, create new tasks just by talking to your Homepod.

Set up using our pre-made template

We already created a shortcut template, so you don't need to go through the tedious process of setting up the shortcut yourself. If you still want to create the shortcut manually, follow the tutorial in the next section.

To get started with our shortcut template, download the shortcut file by clicking here on your iOS or macOS device and install the shortcut by opening the file. Once installed, we now have to modify the shortcut to enter a few things specific to your Lunatask account.

First, rename the shortcut and replace the <ENTER AREA NAME HERE> placeholder in the shortcut name with the name of the area where you want new tasks to be created. You can name the shortcut however you want. The name is there for you to know what the shortcut does. You can remove the placeholder and name the shortcut just "Add Task" if you want.

Now we need to replace the <ENTER TOKEN HERE> placeholder with the real token in the second step of the shortcut. To create an access token in our desktop app, head to the settings, "Access tokens" section, create a new access token naming it "Shortcuts", and press "Copy to clipboard". Now, paste the access token as the value for "Authorization" key.

tip

Thanks to Apple's Universal Clipboard feature, you can paste what you copied into the clipboard on Mac on your iOS device. This might come handy here.

Lastly, tell Shortcuts in which list the task should go in Lunatask. Replace the <ENTER AREA ID HERE> placeholder with Area ID of the list where the task should be created. You can find Area ID for each list by opening the area settings in our desktop or mobile app and hitting the "Copy Area ID" button – the ID will now be copied into the clipboard.

info

Using Area ID instead of area name is inconvenient but required as names of your areas are end-to-end encrypted (therefore, Lunatask API does not know the names of your areas) and names can also change over time.

That's it. Now, try running the shortcut.

tip

To make it available on Apple Watch, press the info icon in the bottom toolbar and enable "Show on Apple Watch".

Manually creating a shortcut

In this tutorial, we will manually create a shortcut from scratch on iOS or Mac to add new tasks to your lists.

Get started by opening the Shortcuts app. Usually, the Shortcuts app is already preinstalled on your iOS or macOS device. If not, install it from the App Store.

On the main screen listing all available shortcuts, click the plus button in the header to create a new shortcut. Name your shortcut any way you like, and pick an icon for it.

Now, we configure actions. The first action taking place when running the shortcut will prompt you to enter the name of a newly created task. Press "Add Action", select "Scripting" actions, and find "Ask for Input". Once added, you can set the prompt (e.g. "Enter task name").

Next, we configure another action to send this information into Lunatask. Slide up the list of available "Scripting" actions from the bottom of the screen and press the "X" icon to close "Scripting" section, returning you to the list of all available actions. Select "Web" actions and find "Get Contents of URL".

Now, we configure where the task should be sent – tell Shortcuts to call Lunatask API. This is be somewhat technical, but following this tutorial exactly will get us there without too much effort.

Fill in https://api.lunatask.app/v1/tasks so the action says "Get contents of https://api.lunatask.app/v1/tasks" instead of "Get contents of Provided Input".

Press the arrow icon to reveal more details – there, change the method from GET to POST.

Open "Headers" section and press "Add new header". Into the field for "Key", type "Authorization" and into the field named "Text", paste an access token.

To create an access token in our desktop app, head to the settings, "Access tokens" section, create a new access token naming it "Shortcuts", and press "Copy to clipboard".

tip

Thanks to Apple's Universal Clipboard feature, you can paste what you copied into the clipboard on Mac on your iOS device. This might come handy here.

Now, paste the access token as the value for "Authorization" key.

Next, tell Shortcuts in which list the task should go in Lunatask. Under "Request Body" section, press "Add new field" and select Text type. As "Key", fill in "area_id", and as value, fill in the ID of the list where the task should be created.

You can find Area ID for each list by opening the area settings in our desktop or mobile app and hitting "Copy Area ID" – the ID will now be copied into the clipboard. Then, paste it to "Text" field on your iOS device.

info

Using Area ID instead of area name is inconvenient but required as names of your areas are end-to-end encrypted (therefore, Lunatask API does not know the names of your areas) and names can also change over time.

tip

If you do not wish to hardcode a single list in the shortcut, you can add a prompt into your shortcut and select where the task should be created for each of your new tasks. Use "Scripting" > "Choose from List" action for that. We will not cover it here, but once you finish this tutorial, you should know enough about setting up shortcuts to be able to set this up.

Next, add another field, name it "name" and upon focusing into "Text" field, select "Provided Input" from the toolbar.

The shortcut will now look like this:

Now, press the play icon in the bottom toolbar to test your shortcut – a popup should appear, prompting you to enter the task name, and upon clicking "Done" and if we did everything right, the task should be created in the chosen list.