The Content Graph engine in Shortcuts
Much of the magic of Shortcuts comes from its Content Graph engine, which intelligently converts data from iOS features and apps into shortcut actions on the fly. When an action expects one type of content and you pass it another type of content, the Content Graph automatically converts that content to the appropriate type.
This smart data conversion lets Shortcuts integrate apps and services. The following example contains a Get Upcoming Events action followed by a Show Directions action. The first action outputs a Calendar event, which can include scheduling data as well as location data. Because the second action requires location data as input, the Content Graph extracts only the Maps data from the Calendar event, to produce driving directions.
The Content Graph also allows advanced, multistep content detection. This lets Shortcuts integrate with apps and services that seem unrelated, such as Music and Mail. For example, you can create a shortcut that contains a Get Current Song action, a Get Details of Music action, and a Send Email action. When run, this series of actions automatically extracts the album artwork from the song that’s currently playing in your music library and emails the artwork to the recipient specified in the Send Email action.
With the Content Graph, you rarely have to consider whether you’re passing the right type of content from one action to another. Shortcuts assumes what you want to accomplish, and determines how to get there.