mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(AWS SQS Node): Fix issue preventing data from being sent correctly (#8382)
This commit is contained in:
@@ -296,10 +296,16 @@ export class AwsSqs implements INodeType {
|
||||
const options = this.getNodeParameter('options', i, {});
|
||||
const sendInputData = this.getNodeParameter('sendInputData', i) as boolean;
|
||||
|
||||
const message = sendInputData
|
||||
let message = sendInputData
|
||||
? JSON.stringify(items[i].json)
|
||||
: (this.getNodeParameter('message', i) as string);
|
||||
params.push(`MessageBody=${message}`);
|
||||
: this.getNodeParameter('message', i);
|
||||
|
||||
// This prevents [object Object] from being sent as message when sending json in an expression
|
||||
if (typeof message === 'object') {
|
||||
message = JSON.stringify(message);
|
||||
}
|
||||
|
||||
params.push(`MessageBody=${encodeURIComponent(message as string)}`);
|
||||
|
||||
if (options.delaySeconds) {
|
||||
params.push(`DelaySeconds=${options.delaySeconds}`);
|
||||
|
||||
Reference in New Issue
Block a user