246x0w.jpg

iThoughts can be 'driven' by other apps using a technique called x-callback-url (see here for the techie details.) An x-callback-url is like any other URL in that it provides a way to launch an app and pass it some information.

This means that iThoughts can be ‘controlled’ by the Shortcuts app for iOS (and have those actions invoked by Siri or placed as icons on the home screen.)

The following video demonstrates how we can create a shortcut that opens a specific map and adds a new topic to an ‘Inbox’ topic.

The key points in the video are:

  • The target map/topic is selected and the required x-callback-url URL is copied to the clipboard.

  • A shortcut is created which launches that URL

NB: We are not limited to Shortcuts - other apps (Editorial, Drafts, Launch Center Pro etc) can all invoke the iThoughts x-callback-url.

The x-callback-url for iThoughts supports a number of options - as below.

Turn Markdown/Text into a mind map 

You can send Markdown/text and have it turned into a new mind map.

The basic URL to CREATE a map is as follows:

ithoughts://x-callback-url/makeMap

 

Then the following parameters are supported:

text=<text to convert - if [[clipboard]] then contents of clipboard are used>

note=<text appended to the notes field of the first topic created by this call>

link=<text appended to the link field of the first topic created by this call>

format=<md or text - will attempt to auto detect if not supplied>

path=<path to map - will generate one if not supplied - will OVERWRITE existing map>

style=<name of style to use when creating map - will use system default if not supplied>

 

NB: Assume everything is case sensitive and remember to 'percent encode' the parameters.

Below you can see some Markdown text in Editorial which has been selected and the 'Send to iThoughts' workflow tapped. The workflow sends the text over into iThoughts to be converted into a map. Notice how (in addition to the text) the path to the map and the style settings are passed as parameters.

Click to expand

 

Amending an existing map

It is also possible to amend an existing map. This requires the original app to supply a path to an existing map and a 'target' to identify where (under which topic) the amendment should apply.

The basic URL to AMEND a map is as follows:

ithoughts://x-callback-url/amendMap

 

Then the following parameters are supported:

text=<text to convert - if [[clipboard]] then contents of clipboard are used>

note=<text appended to the notes field of the first topic created by this call>

link=<text appended to the link field of the first topic created by this call>

format=<md or text - will attempt to auto detect if not supplied>

path=<path to map - must exist already>

target=<string to match - first topic with this substring will be used - can be a regex>

edit=<YES or NO - YES will select the new topic and edit it>

 

A good use for this is to create a shortcut in 'Launch Center Pro' to add a new topic to a '/tasks' map under the 'newtasks' topic. Notice how (in the following example) we don't even pass in any text - thus we get a new blank topic.

Click to expand


NB: You can also send a link to the current page from Safari using a Bookmarklet - see here