The Content Graph engine in Shortcuts
Much of the magic of Shortcuts comes from its Content Graph engine, which intelligently converts data from iOS and iPadOS 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, multi-step content conversion. 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 Save to Photo Album action. When run, this series of actions automatically extracts the album artwork from the song that’s currently playing in your music library and saves the artwork to a photo album.
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. If you would like to view the results of an action, add the View Content Graph action to your workflow.