The hard part of AI automation isn't the AI — it's knowing what to do with the output. Generating a dataflow description with an LLM is the easy part. Getting that description to actually appear in Domo's ETL field, consistently, across every dataflow in your datacenter? That requires you to write the plumbing yourself.
Why It Matters
LLMs are good at text generation. They are not good at knowing where that text needs to go in your data platform. Most AI automation tutorials stop at "look, it generated something cool" — but production automation requires a repeatable, deterministic handoff layer between the LLM output and the system you're writing back to. Without that layer, you end up running a script by hand every time someone asks "can we update the descriptions?" This tutorial closes that gap by showing exactly how to wire the two halves together for Domo Magic ETL dataflows.
What You'll Learn
- Distinguish which parts of an automation pipeline are LLM-driven vs. manually defined — and why that distinction matters for reliability
- Authenticate against the Domo API and retrieve the full dataflow definition (name, existing description, and transform actions)
- Extract only the fields that are actually useful for prompt construction, rather than dumping raw API responses into the LLM
- Write the generated description back to the dataflow's description field programmatically
- Structure automation scripts in a format closer to production code — synchronous but organized around a clear extract → generate → write pattern
Wiring LLM Output Back Into Domo: The Extract → Generate → Write Pattern
The script centers on a single dataflow ID as its input parameter. The first call authenticates via a reusable auth object — this is intentionally separated from the logic so the same pattern works across customer environments. From there, the extract step pulls three specific fields from the dataflow definition: the name, the existing description (if any), and the list of actions defined in the ETL. These three fields are what get passed into the LLM prompt — not the full API response, which would bloat the context and add noise.
The generation step is where the LLM lives, but notice how small that surface area is: it receives structured inputs and returns a string. Everything before and after it is deterministic Python. This is the architectural point the tutorial is most deliberate about — when you're building automation that runs repeatedly, the LLM should be a narrow function call, not the orchestrator.
The write step patches the description field back to the dataflow using the Domo API. Once this works for one dataflow ID, the outer loop to apply it across every dataflow in the datacenter is just iteration. The tutorial closes by running that bulk update, which is the payoff: every Magic ETL dataflow gets an LLM-generated description written into Domo automatically, with no manual copy-paste.
If you're building similar pipelines, the reusable pattern here is: extract only what the LLM needs, keep the LLM call narrow and stateless, and write results back through the same API client you used to read.



