mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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 options = this.getNodeParameter('options', i, {});
|
||||||
const sendInputData = this.getNodeParameter('sendInputData', i) as boolean;
|
const sendInputData = this.getNodeParameter('sendInputData', i) as boolean;
|
||||||
|
|
||||||
const message = sendInputData
|
let message = sendInputData
|
||||||
? JSON.stringify(items[i].json)
|
? JSON.stringify(items[i].json)
|
||||||
: (this.getNodeParameter('message', i) as string);
|
: this.getNodeParameter('message', i);
|
||||||
params.push(`MessageBody=${message}`);
|
|
||||||
|
// 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) {
|
if (options.delaySeconds) {
|
||||||
params.push(`DelaySeconds=${options.delaySeconds}`);
|
params.push(`DelaySeconds=${options.delaySeconds}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user