# Importing multiple modules from same package

**URL:** <https://discourse.nodered.org/t/importing-multiple-modules-from-same-package/52966>\
**Category:** General\
**Created:** [30 October 2021 07:32 UTC](https://discourse.nodered.org/t/importing-multiple-modules-from-same-package/52966 "2021-10-30T07:32:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 October 2021 08:28 UTC](https://discourse.nodered.org/t/importing-multiple-modules-from-same-package/52966/2 "2021-10-30T08:28:47Z")

</div>

> [@hoolahoous](#):
>
> Second question (which is my real goal). I have a buffer object which contains a screenshot from my camera. I am trying to post it to telegram using their sendphoto rest endpoint

Why dont you just use the telegram nodes?

Here is a working demo : [Taking a picture and sending it via telegram - #4 by Steve-Mcl](https://discourse.nodered.org/t/taking-a-picture-and-sending-it-via-telegram/27905/4)

* * *

> [@hoolahoous](#):
>
> in function node's setup, i tried this
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5a6763aef8bae817831dedd10469638402a094d.png)

This does work. Did you wait long enough for the modules to download and install? Does your node-red server have internet access?

Proof it works...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/33fe8ac0337fe1b2f840757108c24148359d1c07.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3964136192271fd7fc3943b085d8de486fb319e.png)

* * *

Lastly, why are you trying to import `got`? The http-request node uses got - you can simply use the http nodes to visually create your flow instead of trying to write everything in a function.

---

_[View the full topic](https://discourse.nodered.org/t/importing-multiple-modules-from-same-package/52966)._
