Animated data flow diagram

AI-Powered Text Manipulation Agent for Apple Shortcuts via n8n & OpenAI

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

OpenAI Apple Shortcuts

Overview

Unlock Effortless AI Text Editing with this Apple Shortcuts Agent

This AI Agent transforms your Apple device into a powerful text manipulation hub. By integrating Apple Shortcuts with n8n and OpenAI (specifically gpt-4o-mini), you can select text anywhere on your Mac, iPhone, or iPad and instantly perform actions like translation, grammar correction, summarization, or expansion.

The workflow listens for requests from an Apple Shortcut. When you trigger the shortcut with selected text, it sends the text and your desired action (e.g., 'translate to Spanish', 'make shorter') to an n8n webhook. A Switch node then routes the request to the appropriate OpenAI prompt, which processes the text and returns the AI-enhanced version. This result is sent back to your Apple Shortcut, which replaces your original selected text.

Key Features & Benefits

  • AI-Powered Text Transformations:
    • Translate text to English or Spanish.
    • Correct grammar and spelling mistakes (without altering core content).
    • Summarize content to make it concise.
    • Expand on text to add more detail.
  • Seamless Apple Ecosystem Integration: Works directly within any app on your Mac, iPhone, or iPad via Apple Shortcuts for system-wide text processing.
  • OpenAI Powered: Leverages OpenAI's gpt-4o-mini model for intelligent and context-aware text processing, ensuring high-quality results.
  • Customizable & Extensible: Easily modify existing prompts in the OpenAI nodes or duplicate and adapt them to add new text transformation capabilities tailored to your needs.
  • Increased Productivity: Automate common text editing tasks, saving you significant time and effort in your daily writing and communication workflows.
  • Flexible Output Handling: The agent is designed to return text that can be immediately used, with considerations for formatting (e.g., replacing newlines with <br/> for rich text environments).

Use Cases

  • Solopreneurs: Quickly translate customer communications or draft social media posts in multiple languages directly from any app.
  • Founders & Content Creators: Effortlessly refine pitch decks, emails, or blog content for clarity, conciseness, or expansion on the fly.
  • CTOs & Heads of Automation: Equip your team with a personal productivity tool to correct, summarize, or expand text for documentation, code comments, or internal communications.
  • Marketing Teams: Instantly adapt ad copy or product descriptions by making them shorter, longer, or translating them for different channels or audiences.
  • Anyone writing text: Get instant AI assistance for correcting, rephrasing, or translating text without switching context or apps.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • OpenAI API Key with access to a suitable model (e.g., gpt-4o-mini or newer).
  • An Apple device (Mac, iPhone, or iPad) with the Shortcuts app installed.
  • In Apple Shortcuts settings (Settings > Shortcuts > Advanced), ensure "Allow Running Scripts" is enabled.

Setup Instructions

  1. Download the n8n workflow JSON file (ai-apple-shortcuts-text-agent-v1.0.0.json).
  2. Import the workflow into your n8n instance.
  3. Configure each of the 'OpenAI' nodes (e.g., 'OpenAI - To Spanish', 'OpenAI - Correct Grammar') with your OpenAI API Key. Ensure the selected model (e.g., gpt-4o-mini) is available to your key.
  4. Activate the n8n workflow. Copy the Webhook URL from the 'Webhook from Shortcut' node (Test URL for initial setup, then Production URL).
  5. Download the Apple Shortcut template from this link.
  6. Install the downloaded Shortcut on your Apple device(s).
  7. Edit the imported Apple Shortcut: in the 'Get Contents of URL' action (usually step 2), replace the placeholder URL with your n8n webhook URL copied in step 4.
  8. Customize the Apple Shortcut: You can assign a keyboard shortcut (on Mac), add it to your Share Sheet, or place it on your Home Screen for quick access.
  9. Test the integration: Select some text in any application, run your configured Apple Shortcut, choose a transformation, and verify the text is replaced with the AI-modified output from n8n.
  10. You can duplicate and modify the example Apple Shortcut to create new ones for different needs, or expand this n8n workflow with more automations.

Tags:

AI AgentAutomationOpenAIApple ShortcutsText ManipulationNLPProductivityTranslationSummarization

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation