feat(SendGrid Node): Add option to specify "reply to" email addresses (#14282)

This commit is contained in:
Uri Levitsky
2025-03-31 21:20:37 +11:00
committed by GitHub
parent bfe3d469ea
commit 68d9460f2a
4 changed files with 110 additions and 0 deletions

View File

@@ -524,6 +524,7 @@ export class SendGrid implements INodeType {
attachments,
categories,
ipPoolName,
replyToEmail,
} = this.getNodeParameter('additionalFields', i) as {
bccEmail: string;
ccEmail: string;
@@ -533,6 +534,7 @@ export class SendGrid implements INodeType {
attachments: string;
categories: string;
ipPoolName: string;
replyToEmail: string;
};
const body: SendMailBody = {
@@ -630,6 +632,12 @@ export class SendGrid implements INodeType {
body.personalizations[0].send_at = moment.tz(sendAt, timezone).unix();
}
if (replyToEmail) {
body.reply_to_list = replyToEmail
.split(',')
.map((entry) => ({ email: entry.trim() }));
}
const data = await sendGridApiRequest.call(this, '/mail/send', 'POST', body, qs, {
resolveWithFullResponse: true,
});