Code Node and Node Linking issue with RSS update workflow using SSH

Hej,

I have problems with the following workflow. It reads a couple of RSS feeds and gives me the Information Security news summary.

I want a different summary every day, which is the reason why I upload and download the prior summary via SSH.

  • The SSH1 node isn’t getting called by my Code node. This probably relates to Node linking.

  • The Code Node takes the binary structure and transforms it to a usable JSON structure.

I want to find a way to ensure that the Code Node calls the SSH1 node.

// First, check if the binary data exists
if ($input.first().binary) {
  // SSH1 output structure might be different from what you expected
  // Let's log the structure to understand it better
  console.log("SSH1 Binary Structure:", Object.keys($input.first().binary));
  
  // Try to find the correct binary property
  const binaryKeys = Object.keys($input.first().binary);
  if (binaryKeys.length > 0) {
    const firstBinaryKey = binaryKeys[0];
    const binaryData = $input.first().binary[firstBinaryKey];
    
    // Process the binary data as needed
    const textContent = Buffer.from(binaryData.data, 'base64').toString('utf8');
    
    // Return properly structured data
    return [{
      json: { 
        content: textContent 
      },
      // Maintain the pairedItem information
      pairedItem: {
        item: 0
      }
    }];
  }
}

// If we got here, binary data was not found or couldn't be processed
console.log("Available input:", JSON.stringify($input.first(), null, 2));
return [{
  json: { 
    error: "Binary data not found or couldn't be processed" 
  },
  pairedItem: {
    item: 0
  }
}];
  • as a workaround, I switched the execution order flow to the legacy v0

Thanks! :slight_smile: