UTF8 characters in "From Email" field in AWS SES node

Describe the issue/error/question

Hello, I’m trying to add a display name to AWS SES From Email field.

I managed to do this with this format:
{{from_name}} <{{from_email}}>

It works fine until the {{from_name}} contains UTF8 characters.

To use UTF8 characters I found here that I should use MIME encoded-word syntax.

So firstly in Code node I encode my {{from_name}} to base64 and then in AWS SES node I fill the From Email field with that expression:
?UTF-8?B?{{ $json[“from_name”] }}<{{ $json[“from_email”] }}>?=

When I do that the following error appears:

Is there any solution?

What is the error message (if any)?

NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.awsApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/GenericFunctions.js:24:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.awsApiRequestSOAP (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/GenericFunctions.js:39:22)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/AwsSes.node.js:934:40)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:53

Please share the workflow

Information on your n8n setup

  • n8n version: 0.206.1
  • Running n8n via: n8n.cloud

Hey @jakubw,

Welcome to the community :cake:

Looking at the node we send it as a URL param so it could be that you need to urlEncode it. Looking at the example on the Github issue though they have a bit more going on so instead of…

?UTF-8?B?{{ $json["from_name"] }}<{{ $json["from_email"] }}>?=

Maybe something like the below would work.

=?UTF-8?B?{{ $json["from_name"] }}= <{{ $json["from_email"] }}>

Hey @Jon,

Thanks for the reply!

Unfortunately it also doesn’t work. This is the error I got this time:

NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.awsApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/GenericFunctions.js:24:15)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.awsApiRequestSOAP (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/GenericFunctions.js:39:22)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/SES/AwsSes.node.js:934:40)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:53

Hey @jakubw,

Have you tried uri encoding to see if that works?

Yes, with uri encoding I still get the same error.

Did you encode the entire string? I will have to set up an SES account to give it a test as I am not sure why it wouldn’t work. I assume it is just an encoding thing on the URL at some point.

Yes, I encoded the entire string:

Hey @Jon,

did you manage to set up an SES account?

I tried encoding URL in many ways and unfortunately it doesn’t work.

Hey @jakubw,

Not yet, it is on my list of things to do still.

Hey @Jon,

I can send you my API key to AWS SES so you won’t have to set up a new account.

Can I send it through email at [email protected]?

Hey @jakubw,

I set up an AWS account yesterday to test another SES issue so I have the bits I need, I just need to find a bit of time to test it and see if I can find a workaround.

Hi @Jon,

did you manage to find any solution?

Hey @jakubw,

Not yet, It is on my list of things to fix I just need to find the time for it. I wanted to put out a few fixes this week but they might be next week now. I will let you know when the fix is in.