Automate Text Edits with n8n & Apple Shortcuts Using OpenAI

This n8n workflow automates text modifications triggered via Apple Shortcuts, leveraging OpenAI to seamlessly translate, grammar-correct, and adjust text length. Save time and eliminate manual editing errors with instant AI-powered responses directly replacing your selected text.
stickyNote
switch
openAi
+2
Workflow Identifier: 2284
NODES in Use: Sticky Note, Switch, Respond to Webhook, Webhook, OpenAI
Automate text edits with n8n and OpenAI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow edits text automatically using AI. It fixes grammar, translates to English or Spanish, and changes text length slightly. It works when you select text and trigger a shortcut on Mac or iOS. The changed text replaces what was selected right away.

The problem it solves is slow manual editing and switching apps. The user saves time and gets consistent results.


Who should use this workflow

This is for writers or anyone editing text fast and often. It fits users who want quick fixes without leaving their writing app.

No deep tech skills needed, just basic use of shortcuts and n8n.


Tools and services used

  • n8n: Runs automation workflows.
  • OpenAI API: Processes text edits using GPT-4o-mini.
  • Apple Shortcuts app: Triggers the workflow from Mac or iOS.
  • Webhook URL: Receives requests from shortcuts.

Beginner step-by-step: How to build this in n8n

Importing the workflow

  1. Download the workflow JSON file using the Download button on this page.
  2. Open the n8n editor. Inside, choose “Import from File” to upload the downloaded JSON.

Configuring the workflow

  1. After import, add your OpenAI API Key in the OpenAI nodes credentials.
  2. Replace placeholder values like webhook URLs if any appear, using your own live webhook URL from the Webhook from Shortcut node.
  3. If there are IDs, emails, or folder names in the workflow related to your text or app, update those as needed.
  4. Look inside the OpenAI nodes for system prompts and copy that exact prompt if you want to customize or store it elsewhere.

Testing and activating

  1. Use a tool like Postman or Curl to send a test JSON payload with “content” and “type” fields to your webhook URL.
  2. Check the output for errors or expected rewritten text.
  3. Once tests pass, activate your workflow in n8n so the webhook accepts live requests.
  4. Make sure your webhook URL is accessible publicly or at least by the device running the Apple Shortcut.

You can now connect your Apple Shortcut on Mac or iOS to this webhook to run text edits quickly.


Workflow inputs, processing, and outputs

Input

The workflow input is JSON sent from the Apple Shortcut. It has two fields:

  • content: The selected text to edit.
  • type: The edit type like “translate to English”, “correct grammar”, “make shorter”, etc.

Processing steps

The Webhook from Shortcut node receives the input.

A Switch node checks the type field to decide which OpenAI node handles the text.

There are five OpenAI nodes. Each has a system prompt designed for a task:

  • Translate to Spanish
  • Translate to English
  • Fix grammar without changing meaning
  • Make the text about 5% shorter
  • Make the text about 5% longer

OpenAI returns JSON with the edited text in the “output” field.

Output

The Respond to Shortcut node sends the edited text back as plain text.

The Apple Shortcut replaces the original selected text in the user’s app.


Edge cases and failures to watch for

  • If the workflow is not activated, the webhook will not respond. Always check activation before going live.
  • OpenAI may return errors if API keys are wrong or usage limits exceeded.
  • Large text input can cause delays or API cost increases. Consider splitting big text into smaller parts.
  • The Apple Shortcut won’t trigger if no keyboard shortcut is assigned or if “Allow running scripts” is off.
  • Webhook URL must be correct and publicly accessible or accessible on the local network.

Customization ideas

  • Add more languages by copying OpenAI nodes and changing system prompts.
  • Change the amount of shortening or lengthening by editing OpenAI prompts.
  • Include formal or informal tones by adding parameters and adjusting prompts.
  • Add new text features like summarizing or keyword extraction using new OpenAI nodes.
  • Modify output formatting with HTML inside the Respond to Shortcut node for richer text.
  • For hosting, consider self-host n8n for better control and privacy.

Summary of benefits and outcomes

✓ Save many hours by automating text editing tasks.

✓ Keep your writing workflow focused with keyboard shortcut triggers.

✓ Maintain consistent grammar, translations, and text length easily.

→ Replace manual copy-paste editing with fast AI corrections.

→ Adapt or extend workflow for many language and text needs.


Automate text edits with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Download the workflow JSON file, open n8n editor, use “Import from File” to upload. Add OpenAI API key and update webhook URL. Test with a sample payload, then activate the workflow.
The webhook expects JSON with two fields: ‘content’ (the text to edit) and ‘type’ (the type of edit like translation or grammar fix).
The webhook will not respond and text editing requests will fail. Activating the workflow is required for it to work.
No, the workflow is built specifically for OpenAI API. Using other providers needs customizing the nodes and prompts.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.