Adrien Besnard
06/10/2026, 1:19 PMcreate_markdown_artifact(key="dbt-build-tests", markdown=tests_markdown) , but I don't see the artifact in the UI. What am I missing?Marvin
06/10/2026, 1:19 PMMarvin
06/10/2026, 1:22 PMkey only affects where it appears, not whether it gets persisted
You’re already passing key="dbt-build-tests", which is correct if you want it on the main Artifacts page.
2. It must run in a Prefect flow/task context
Make sure this is being called inside a @flow or @task, not just in a plain Python script.
Example:
python
from prefect import flow
from prefect.artifacts import create_markdown_artifact
@flow
def my_flow():
create_markdown_artifact(
key="dbt-build-tests",
markdown="# dbt test results\n\nAll good"
)
if __name__ == "__main__":
my_flow()
3. You need to be connected to Prefect Cloud or a persistent Prefect server
If you’re just running locally without a configured API, the artifact may not end up somewhere you can browse in the UI you’re looking at.
Check:
bash
prefect config view
Look for PREFECT_API_URL.
If you’re using Cloud, it should point to Cloud.
If you’re using self-hosted server, it should point to that server.
4. Check the right UI location
With a key, the artifact should appear on the Artifacts page, and also be associated with the run.
Without a key, it only appears on the run’s Artifacts tab.
5. Reusing the same key updates/version-tracks that artifact
If you keep writing to dbt-build-tests, you may not see multiple separate artifacts — you may be updating the same keyed artifact lineage.
6. The flow run must actually execute successfully far enough to create it
If the run fails before create_markdown_artifact(...) is reached, nothing will appear.
If you want, I can help you debug this quickly. The most useful next info would be:
- are you using Prefect Cloud or self-hosted server?
- are you calling this inside a flow/task?
- do you see the flow run in the UI, just not the artifact?
Docs:
- Artifacts concept docs
- Artifacts how-to
- `prefect.artifacts` API referenceNate
06/10/2026, 3:26 PMAdrien Besnard
06/22/2026, 3:57 PMNate
06/22/2026, 3:58 PM