mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fixes encoding for sending templates
This commit is contained in:
parent
f7abb1b637
commit
487aa0822f
|
@ -1081,16 +1081,11 @@ export class AwsSes implements INodeType {
|
||||||
|
|
||||||
if (operation === 'sendTemplate') {
|
if (operation === 'sendTemplate') {
|
||||||
const toAddresses = this.getNodeParameter('toAddresses', i) as string[];
|
const toAddresses = this.getNodeParameter('toAddresses', i) as string[];
|
||||||
|
|
||||||
const template = this.getNodeParameter('templateName', i) as string;
|
const template = this.getNodeParameter('templateName', i) as string;
|
||||||
|
|
||||||
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
|
|
||||||
const templateDataUi = this.getNodeParameter('templateDataUi', i) as IDataObject;
|
const templateDataUi = this.getNodeParameter('templateDataUi', i) as IDataObject;
|
||||||
|
const params = [`Template=${template}`, `Source=${encodeURIComponent(fromEmail)}`];
|
||||||
const params = [`Template=${template}`, `Source=${fromEmail}`];
|
|
||||||
|
|
||||||
if (toAddresses.length) {
|
if (toAddresses.length) {
|
||||||
setParameter(params, 'Destination.ToAddresses.member', toAddresses);
|
setParameter(params, 'Destination.ToAddresses.member', toAddresses);
|
||||||
|
@ -1150,7 +1145,7 @@ export class AwsSes implements INodeType {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
templateData[templateDataValue.key] = templateDataValue.value;
|
templateData[templateDataValue.key] = templateDataValue.value;
|
||||||
}
|
}
|
||||||
params.push(`TemplateData=${JSON.stringify(templateData)}`);
|
params.push(`TemplateData=${encodeURIComponent(JSON.stringify(templateData))}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue