{
  "meta": {
    "instanceId": "workflow-291615d9",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:51.620676",
    "updatedAt": "2025-09-29T07:07:51.620687",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "nodes": [
    {
      "id": "b165115d-5505-4e03-bf41-c21320cb8b09",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        40
      ],
      "parameters": {
        "color": 7,
        "width": 681.8337349708484,
        "height": 843.1482165886073,
        "content": "## Workflow: Text automations using Apple Shortcuts\n\n**Overview**\n- This workflow answers user requests sent via Apple Shortcuts\n- Several Shortcuts call the same webhook, with a query and a type of query\n- Types of query are:\n  - translate to english\n  - translate to spanish\n  - correct grammar (without changing the actual content)\n  - make content shorter\n  - make content longer\n\n\n**How it works**\n- Select a text you are writing\n- Launch the shortcut\n- The text is sent to the webhook\n- Depending on the type of request, a different prompt is used\n- Each request is sent to an OpenAI node\n- The workflow responds to the request with the response from GPT\n- Shortcut replace the selected text with the new one\n\n**How to use it**\n- Activate the workflow\n- Download [this Shortcut template]({{ $env.WEBHOOK_URL }}\n- Install the shortcut\n- In step 2 of the shortcut, change the url of the Webhook\n- In Shortcut details, \"add Keyboard Shortcut\" with the key you want to use to launch the shortcut\n- Go to settings, advanced, check \"Allow running scripts\"\n- You are ready to use the shortcut. Select a text and hit the keyboard shortcut you just defined\n\n\n**Notes**\n- If you use rich formatting, you'll have to test multiple ways to replace characters in the output. For example, you might use `{{ $json.message.content.output.replaceAll('\\n', \"<br/>\") }}` in the \"Respond to Shortcut\" node depending on the app you use most.\n- This is a basic example that you can extend and modify at your will\n- You can duplicate and modify the example shortcut based on your need, as well as making new automations in this workflow."
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "c45400b8-d3b8-47f7-81c6-d791bce4c266",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1020,
        380
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.type }}",
                    "rightValue": "spanish"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "bedb302f-646c-4dcd-8246-1fcfecfe3f2e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.type }}",
                    "rightValue": "english"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "94e6cf7d-576d-4ad9-85b0-c6b945eb41b7",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.type }}",
                    "rightValue": "grammar"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1ed0d1e1-2df0-4f8d-b102-4004a25919ed",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.type }}",
                    "rightValue": "shorter"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "YOUR_CREDENTIAL_HERE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4756df03-7e7c-4e28-9b37-14684326b083",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.type }}",
                    "rightValue": "longer"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2,
      "notes": "This switch node performs automated tasks as part of the workflow."
    },
    {
      "id": "48e0e58e-6293-4e11-a488-ca9943b53484",
      "name": "Respond to Shortcut",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1840,
        400
      ],
      "parameters": {
        "options": {},
        "respondWith": "text",
        "responseBody": "={{ $json.message.content.output.replaceAll('\\n', '<br/>') }}"
      },
      "typeVersion": 1.1,
      "notes": "This respondToWebhook node performs automated tasks as part of the workflow."
    },
    {
      "id": "2655b782-9538-416c-ae65-35f8c77889c7",
      "name": "Webhook from Shortcut",
      "type": "n8n-nodes-base.webhook",
      "position": [
        840,
        400
      ],
      "webhookId": "e4ddadd2-a127-4690-98ca-e9ee75c1bdd6",
      "parameters": {
        "path": "shortcut-global-as",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2,
      "notes": "This webhook node performs automated tasks as part of the workflow."
    },
    {
      "id": "880ed4a2-0756-4943-a51f-368678e22273",
      "name": "OpenAI - Make Shorter",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        540
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Summarize this content a little bit (5% shorter)\nOutput a JSON with a single field: output"
            },
            {
              "content": "={{ $json.body.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "WqzqjezKh8VtxdqA",
          "name": "OpenAi account - Baptiste"
        }
      },
      "typeVersion": 1.4,
      "notes": "This openAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "c6c6d988-7aab-4677-af1f-880d05691ec3",
      "name": "OpenAI - Make Longer",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        680
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Make this content a little longer (5% longer)\nOutput a JSON with a single field: output"
            },
            {
              "content": "={{ $json.body.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "WqzqjezKh8VtxdqA",
          "name": "OpenAi account - Baptiste"
        }
      },
      "typeVersion": 1.4,
      "notes": "This openAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "8e6de4b7-22c3-45c9-a8d7-d498cf829b6f",
      "name": "OpenAI - Correct Grammar",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        400
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Correct grammar only, don't change the actual contents.\nOutput a JSON with a single field: output"
            },
            {
              "content": "={{ $json.body.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "WqzqjezKh8VtxdqA",
          "name": "OpenAi account - Baptiste"
        }
      },
      "typeVersion": 1.4,
      "notes": "This openAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "bc006b36-5a96-4c3a-9a28-2778a6c49f10",
      "name": "OpenAI - To Spanish",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        120
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Translate this message to Spanish.\nOutput a JSON with a single field: output"
            },
            {
              "content": "={{ $json.body.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "WqzqjezKh8VtxdqA",
          "name": "OpenAi account - Baptiste"
        }
      },
      "typeVersion": 1.4,
      "notes": "This openAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "330d2e40-1e52-4517-94e0-ce96226697fa",
      "name": "OpenAI - To English",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1300,
        260
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Translate this message to English.\nOutput a JSON with a single field: output"
            },
            {
              "content": "={{ $json.body.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "WqzqjezKh8VtxdqA",
          "name": "OpenAi account - Baptiste"
        }
      },
      "typeVersion": 1.4,
      "notes": "This openAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "925e4b55-ac26-4c16-941f-66d17b6794ab",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        900
      ],
      "parameters": {
        "color": 7,
        "width": 469.15174499329123,
        "height": 341.88919758842485,
        "content": "### Check these explanations [< 3 min]\n\n[![Check the explanations]({{ $env.WEBHOOK_URL }}]({{ $env.WEBHOOK_URL }}"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    }
  ],
  "pinData": {},
  "connections": {
    "48e0e58e-6293-4e11-a488-ca9943b53484": {
      "main": [
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-0c0eeb03",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-110bdba0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-5a47a712",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-4be2d47d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-8573af5b",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-878c39aa",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-e7d47e7d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-48e0e58e-6293-4e11-a488-ca9943b53484-14017685",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2655b782-9538-416c-ae65-35f8c77889c7": {
      "main": [
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-e5dab2f0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-84313026",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-889cd982",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-44f80f4f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-9b37ae5c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-07949470",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-3c51d1e9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-2655b782-9538-416c-ae65-35f8c77889c7-d3ffc86a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "880ed4a2-0756-4943-a51f-368678e22273": {
      "main": [
        [
          {
            "node": "error-handler-880ed4a2-0756-4943-a51f-368678e22273-944927a5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c6c6d988-7aab-4677-af1f-880d05691ec3": {
      "main": [
        [
          {
            "node": "error-handler-c6c6d988-7aab-4677-af1f-880d05691ec3-e55a6629",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e6de4b7-22c3-45c9-a8d7-d498cf829b6f": {
      "main": [
        [
          {
            "node": "error-handler-8e6de4b7-22c3-45c9-a8d7-d498cf829b6f-f9632057",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc006b36-5a96-4c3a-9a28-2778a6c49f10": {
      "main": [
        [
          {
            "node": "error-handler-bc006b36-5a96-4c3a-9a28-2778a6c49f10-09f2cf2c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "330d2e40-1e52-4517-94e0-ce96226697fa": {
      "main": [
        [
          {
            "node": "error-handler-330d2e40-1e52-4517-94e0-ce96226697fa-ab7d372e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "name": "Stickynote Workflow",
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "description": "Automated workflow: Stickynote Workflow. This workflow integrates 6 different services: webhook, stickyNote, switch, respondToWebhook, stopAndError. It contains 19 nodes and follows best practices for error handling and security.",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "notes": "Excellent quality workflow: Stickynote Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}