UTF8 issue with agent and iOS shortcut

I created an agent to help me with writing and translating on my iPhone.
I followed tutorials to connect my workflow with an iOS shortcut.
I send my text from my iPhone via the shortcut. The agent processes it and sends it back to my iPhone.

THE PROBLEM:
Since it’s text in French, special characters need to be handled. The output doesn’t handle special characters, and it seems like UTF-8 isn’t being properly managed.
No issues occur with other shortcuts or workflows.

For your information: My N8N instance is hosted on a VPS server, and I’ve created tons of workflows and agents without ever encountering this issue.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hey @Julien_Ducerf

that screenshot is from your iPhone sending a message to n8n correct? Do you have an example of a raw POST coming from shortcut?

Hi @gualter
Let me rephrase my problem (my screenshot isn’t the right one, so don’t take it into account):
On my N8N workflow there is no problem with special characters. The output is fine.
However, as soon as the content arrives on my iOS shortcut, special characters are not recognized.
I regularly use shortcuts (with other agents who are not N8N) and I’ve never had this problem.

So if I understood correctly:

  • content leaves n8n container correctly formated (how are you confirming this?)
  • content arrives in iOS malformatted (how are you confirming this?)

how is the data going from n8n to your iOS? I’m wondering how the data can change after n8n, How are you hosting n8n on that VPS server?

Yes, you have understood both points correctly.
I get the output of n8n via a shortcut as I learned from the various tutorials.
My n8n is hosted on a classic vps server via docker.
I have several automations with outputs on various services and I never had the problem.
As I have various IOS shortcuts without this problem.

Still no solution? :frowning:
I’m surprised the problem hasn’t happened to others.

I’ve just stumbled upon the same issues, only with German umlauts.

For example my “Respond to Apple Shortcut” node returns the following text: “Ich heiße Horst.”:

But this is the final result on my iPhone:

Instead of “ß” it’s showing “ß” which are both no German characters. So the speak breaks there and sounds funny. Because of that the iOS shortcut integration doesn’t seem to be useful for other languages than English, at least if they have special characters.

I have the exact same problem. Everything works fine using the shortcut with my MacBook, but when I use Siri and the shortcut with my iPhone, the shortcut execution includes some characters that are not in the n8n flow. In other words, the entire n8n flow is fine, but the iPhone does something when receiving the response that includes strange characters, and as a result, when Siri speaks it, those characters are included, and it sounds awful. As I mentioned, this doesn’t happen on the MacBook, so it must be something with the iPhone. Spanish is the language btw so must have some utf codification problem somewhere.

EDIT: Fixed with:

I have finally found the solution. I’m posting it here for those who have the same problem. The steps to configure the node are:

In your workflow, select the “Respond to Webhook” node.

In the “Response Headers” section, add two new headers:

First header:

Name: Content-Type

Value: application/json; charset=utf-8

Second header:

Name: Accept-Charset

Value: utf-8

1 Like

Excellent! That did help, thanks a lot @mercuryin :+1:

Thank you very much.
Finally a problem solved.