Hook
Getting Domo CodeEngine to do something as basic as print a URL shouldn't require reverse-engineering the runtime — but it does, and the documentation won't save you.
Why It Matters
CodeEngine is Domo's serverless function layer, and it's the bridge between your backend logic and custom Domo apps. Without understanding how the runtime actually behaves — how output works, which function signatures are valid, how authentication flows through Accounts — you'll waste hours writing functions that silently do nothing. Getting this foundation right unlocks the ability to make authenticated API calls from inside Domo without exposing credentials in app code.
What You'll Learn
- Understand why Python functions in CodeEngine must be synchronous — and why async silently fails
- Debug the stdout/print confusion that swallows all your output
- Properly define function inputs, outputs, and types in the CodeEngine UI
- Structure a minimal working function before layering in complexity
- Set up Domo Account-based authentication to avoid hardcoding credentials
Surviving CodeEngine's Undocumented Gotchas
The video opens with a real debugging session, not a polished demo — and that's exactly why it's useful. The first landmine: print() does nothing in CodeEngine. Standard Python output isn't captured. You have to explicitly write to sys.stdout and import sys to get any feedback at all. The documentation doesn't mention this.
The second, more consequential discovery: CodeEngine does not support async Python functions. If you define a function with async def, it won't run — it won't error, it just quietly does nothing. JavaScript functions in CodeEngine are all async by default, so the assumption carries over. It's wrong. Every Python function needs to be a plain synchronous def.
The third friction point is the UI itself. After writing a function, you have to manually define typed inputs and outputs in the CodeEngine interface, then hit Rescan to register the function signature. Skipping the rescan or missing the output type definition results in validation errors that aren't obviously connected to the actual problem.
Once those three things click into place — synchronous functions, explicit stdout, and a properly rescanned signature — a basic passthrough function works. From there, the video pivots toward the real goal: wiring in Domo Accounts for API authentication. Rather than embedding credentials directly in function code, Accounts lets you reference stored OAuth or API key configurations by name, keeping secrets out of your codebase and manageable through Domo's admin layer.
This first video establishes the working baseline. Part 2 picks up with loop handling once the auth pattern is solid.


