H
Harvest
AI Summarized Content

Shortcuts Rewind: Linking Tricks Using Markdown and Rich Text - MacStories

MacStories is launching a brand-new series called "Shortcuts Rewind" to provide detailed, step-by-step breakdowns of helpful shortcuts featured in the MacStories Shortcuts Archive. This first installment explores a trio of beginner-friendly shortcuts—Clean Up Rich Text, Shortcut Rich Link, and Create Hyperlink—that demonstrate how to seamlessly transform plain text, rich text, and URLs. By leveraging Shortcuts' built-in Content Graph and combining Markdown conversion techniques, these tools help users clean up messy formatting, generate quick links, and handle complex text flows with ease.


1. Introduction to Shortcuts Rewind and Content Transformation

Over the past several years, Federico Viticci has built hundreds of shortcuts, leading to the creation of the MacStories Shortcuts Archive to help readers easily find and download them. Because downloading and tinkering with someone else's shortcuts is one of the best ways to learn, MacStories is introducing Shortcuts Rewind to add deeper context, explain best practices, and illustrate techniques across multiple automations.

This inaugural guide focuses on three relatively simple shortcuts found in the Text section of the Shortcuts Archive that highlight the power of transforming one content type into another. At the foundation of this process is the Content Graph, a core part of Shortcuts inherited from its origins as Workflow. The Content Graph handles data compatibility and conversion chores behind the scenes with little effort from the user, primarily focusing on transformations between plain text, rich text, and URLs.


2. Clean Up Rich Text

Have you ever copied text from a webpage and pasted it into an email, only for it to bring along unwanted fonts, text colors, and background colors? The Clean Up Rich Text shortcut solves this problem by stripping away unsightly formatting while preserving basic elements like bold text, italics, and hyperlinks.

The shortcut runs almost instantly in four simple steps:

  1. Get Clipboard: The shortcut begins by grabbing the contents of the iOS clipboard using the Get Clipboard action.
  2. Make Markdown from Clipboard: Step 2 converts the rich text into plain text using Markdown, a markup syntax created by John Gruber. Because Markdown supports basic formatting but not rich text styling like background colors, this conversion successfully leaves the unwanted baggage behind.
  3. Make Rich Text from Markdown: Step 3 takes the clean Markdown and converts it back into readable rich text using the Make Rich Text from Markdown action.
  4. Copy to Clipboard: Finally, the shortcut places the cleaned-up rich text back onto the clipboard using the Copy to Clipboard action, ready to be pasted cleanly into any app.

The result of Clean Up Rich Text is a much nicer, more readable version of the text copied from a webpage that preserves the link and bulleted list, but eliminates the blue background from the source text.

You can find and download this automation directly in the MacStories Shortcuts Archive.


3. Shortcut Rich Link

The Shortcut Rich Link shortcut combines Markdown and rich text to generate a tappable, rich link for any of your existing shortcuts. This allows you to place a direct link to a frequently used shortcut inside an Apple Notes project or a Reminders task, saving you from hunting for it inside the Shortcuts app.

Because this shortcut is a bit longer, it is broken down into two main parts.

Shortcut Rich Link, Part 1

Shortcuts uses a URL scheme starting with shortcuts://open-shortcut?name= to open specific shortcuts. Part 1 sets up the selection process:

  1. Get My Shortcuts: Uses the meta-action Get My Shortcuts to pull a list of all your personal shortcuts.
  2. Choose from List: Displays the list interactively so you can select the specific shortcut you want to link.
  3. Text: Uses a Text action containing the hard-coded URL base combined with a Magic Variable representing the chosen shortcut's name.

Shortcut Rich Link, Part 2

The remaining steps turn the text into a working hyperlink:

  1. URL: Converts the raw text from the previous step into an active URL object.
  2. Markdown: Builds a Markdown-formatted link using the shortcut name and its URL.
  3. Rich Text: Converts the Markdown link into rich text.
  4. Clipboard: Copies the final rich link to the clipboard.

What I love about Shortcut Rich Link is that the same link creation technique used in Clean Rich Link to strip formatting is used to build a tappable link. The shortcut is a terrific example of how remixing the same actions can result in very different shortcuts.


4. Create Hyperlink

The final tool, Create Hyperlink, takes link-creation logic a step further by incorporating branching flow logic to handle different clipboard contents dynamically. Whether your clipboard contains no URLs, a single raw URL, or multiple URLs, this shortcut handles the scenario intelligently.

Create Hyperlink, Part 1

  1. Get Clipboard & Get URLs from Input: Grabs the clipboard contents and extracts any embedded URLs using the Get URLs from Input action.
  2. Count: Passes the extracted URLs to a Count utility action to determine how many items are present.

Create Hyperlink, Part 2

To handle the three possible clipboard scenarios, the shortcut utilizes nested If actions combined with an Otherwise and End If structure:

  • No URLs (0 items): The shortcut displays an alert stating:

Your clipboard doesn't contain any URLs at the moment. Run this shortcut again after copying a link.

  • One URL (1 item): Automatically assigns the single URL to a variable named Link without bothering you with a selection list.
  • Multiple URLs (Greater than 1): Prompts you to pick the specific URL you want from a list using Choose from List and assigns your choice to the Link variable.

Create Hyperlink, Part 3

The final steps finish the hyperlinking process:

  1. Ask for Input: Prompts the user to enter the display text for the link (e.g., Enter Link Text).
  2. Markdown to Rich Text to Clipboard: Combines your custom text input and the selected URL into a Markdown link, converts it into rich text, and copies it straight to your clipboard.

Conclusion

These three versatile shortcuts demonstrate the incredible power and flexibility hidden within relatively simple automation designs. By understanding how data formats like plain text, Markdown, and rich text interact through the Content Graph, even beginners can build powerful time-saving tools while mastering techniques for more advanced projects. Stay tuned for future editions of Shortcuts Rewind!

Summary completed: 8/1/2026, 9:28:46 PM

Need a summary like this?

Get instant summaries with Harvest

5-second summaries
AI-powered analysis
📱
All devices
Web, iOS, Chrome
🔍
Smart search
Rediscover anytime
Start Summarizing
Try Harvest