// Get the input text from the 'output' field const inputText = $input.first().json.output; // Remove \n and clean up bullet points const cleanedText = inputText.replace(/\n/g, " ").replace(/\*/g, " "); // Return valid JSON for Telegram return [{ json: { text: cleanedText } }];