Homey SHS - Trigger WebHooks locally?

Just note that the GET webhook cannot pass #, end of lines and icons like :fire: in the text.

MQTT would do it, but I do not have the memory to install it :slight_smile:

Solved with a Gemini HomeyScript encodeURL as per below (there is no need to decode on the receiving side).

// EncodeURL
// Script Version: 2.0
// Purpose: URL Encode text and return as a LOCAL tag

// 1. Get the argument (safely handle empty input)
let inputString = args[0];
if (inputString == null) {
    inputString = "";
}

// 2. Encode the string (newlines -> %0A, spaces -> %20)
let encodedString = encodeURIComponent(inputString);

// 3. RETURN the string
// This places the value into the local "Result" tag of the flow card.
// We explicitly wrap it in String() to ensure the type is correct.
return String(encodedString);