mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(AWS SQS Node): Fix issue preventing data from being sent correctly (#8382)
This commit is contained in:
parent
e606e841ee
commit
daba5bb250
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue