# Dynamically importing canisters with Motoko

**URL:** <https://forum.dfinity.org/t/dynamically-importing-canisters-with-motoko/10483>\
**Category:** Developers\
**Created:** [January 25, 2022, 4:45pm UTC](https://forum.dfinity.org/t/dynamically-importing-canisters-with-motoko/10483 "2022-01-25T16:45:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Maithreya](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/maithreya/32/4433_2.png) [@Maithreya](https://forum.dfinity.org/u/Maithreya)\
**Post date:** [January 25, 2022, 5:09pm UTC](https://forum.dfinity.org/t/dynamically-importing-canisters-with-motoko/10483/2 "2022-01-25T17:09:12Z")

</div>

I think I can adapt this answer [Programmatic import in Motoko - #3 by gilbert](https://forum.dfinity.org/t/programmatic-import-in-motoko/7681/3) to solve my problem. Basically, creating a type in the format if your actor and then creating a function that outputs that type should do the trick (as long as all your canisters you wish to choose from to return are of the same type).

If it works, I will post again and let you all know.

Update: This solution works like a charm!

---

_[View the full topic](https://forum.dfinity.org/t/dynamically-importing-canisters-with-motoko/10483)._
