Skip to main content

routine_folder_id

Function routine_folder_id 

Source
pub fn routine_folder_id(name: &str) -> Option<String>
Expand description

Folder id the Grok Bot routine store gives a routine named name.

Same rule as the host’s routine slug, used both by the bot’s own UpdateRoutine and by the gateway’s createAgentAutomation: lowercase, every run of characters outside [a-z0-9] becomes one -, leading and trailing - are trimmed, then the result is cut to 48 characters. So a routine named chief_bob would live in folder chief-bob; wake routines avoid the mismatch by using the hyphen nick as the name. The host falls back to a timestamped name when the slug is empty; that is not reproducible, so this returns None instead. A second routine with the same name gets -2, -3, …; callers treat that as a mismatch, not as the bot’s routine.

For a nick from nick_from_display_name this returns the nick unchanged: nick, routine name, and folder id are one string.