# Send picture telegram - NO USB CAMERA

**URL:** https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656
**Category:** General
**Created:** [25 February 2021 22:49 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656 "2021-02-25T22:49:05Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [25 February 2021 22:49 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/1 "2021-02-25T22:49:05Z")

</div>

Is it possible to send a local stored picture from my phone to the Telegram APP and then see it in Node-red?.  
I know that we can do that with an usb camera but i want to do it another way.

The idea is to work with some tensorflow, now i have some flows but i need to select manually the picture that i want to process. The main idea is to send the picture through Telegram and then node-red to process it.

I have this by far...

```auto
[{"id":"28cdadc8.e454e2","type":"tab","label":"TensorFlow","disabled":false,"info":""},{"id":"fd2a033b.71ad2","type":"fileinject","z":"28cdadc8.e454e2","name":"","x":180,"y":120,"wires":[["ff61bbb2.6de208","9b2fdae2.c3fda8"]]},{"id":"9b2fdae2.c3fda8","type":"cocossd","z":"28cdadc8.e454e2","name":"","x":440,"y":120,"wires":[["bd78d3b7.3cf9c","cb45eb12.edfe58"]]},{"id":"bd78d3b7.3cf9c","type":"debug","z":"28cdadc8.e454e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"ff61bbb2.6de208","type":"image","z":"28cdadc8.e454e2","name":"Original image","width":"160","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":310,"y":200,"wires":[]},{"id":"cb45eb12.edfe58","type":"image","z":"28cdadc8.e454e2","name":"","width":"160","data":"annotatedInput","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":600,"y":200,"wires":[]}]

```

If i connect a Telegram Node and debug it i can see that the API stores the picture, so maybe i can capture that and send it to the COCOSSD node.

Look:

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

Thanks in advance.

---

<div class="post-metadata">

### Author: ![henrycosta05](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henrycosta05/32/36350_2.png) [@henrycosta05](https://discourse.nodered.org/u/henrycosta05)
#### Post date: [26 February 2021 02:48 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/2 "2021-02-26T02:48:32Z")

</div>

hi @Marty1982,  
You've tried this?

> [@Saving images from URL to folder](https://discourse.nodered.org/t/saving-images-from-url-to-folder/21246/2):
>
> Send in in payload to a file out node.

OR

> [@Saving images from URL to folder](https://discourse.nodered.org/t/saving-images-from-url-to-folder/21246/3):
>
> Ah wait you need to convert to jpeg. Use node-red-contrib-image-tools There is an example in the demos under Import-exaples

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [26 February 2021 04:42 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/3 "2021-02-26T04:42:42Z")

</div>

This is a flow that works. Using the weblink in the message from the Telegram node

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

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [1 March 2021 14:04 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/4 "2021-03-01T14:04:00Z")

</div>

Cool! @krambriw

do you have the complete code flow?

Thanks a lot!!

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [1 March 2021 15:04 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/5 "2021-03-01T15:04:21Z")

</div>

Unfortunately not. Where does it create problems for you? It's pretty straight forward, you have almost everything in already except that you have to add node-red-contrib-image-tools via the palette manager if you want a viewer in the flow

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [1 March 2021 15:06 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/6 "2021-03-01T15:06:00Z")

</div>

Yes i know is very simple.

What URL should i need to add?.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/202c22b4b8fdbbdd7e7b701522f2f26db7ff51f6.png)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [1 March 2021 15:10 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/7 "2021-03-01T15:10:39Z")

</div>

You move the msg.payload.weblink to msg.url, then it should work

Also check that the output from the http request node is set as "a binary buffer"

Sorry I could not share the complete flow, unfortunately stupid reason not worth mentioninig 😉

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

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [1 March 2021 15:13 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/8 "2021-03-01T15:13:15Z")

</div>

Great! it works!  
Now i will make a message catching so i can get the Telegram ouput.

thanks a lot!!

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 13:06 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/9 "2021-03-02T13:06:35Z")

</div>

Hi!,

The flow works perfectly, now i need to output the cocossd result because it has to detect what kind of image im sending ( a car, a dog, a human, etc...). I can do that manually and the cocossd flow detects what is the content of the image.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 March 2021 14:46 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/10 "2021-03-02T14:46:26Z")

</div>

> [@Marty1982](#):
>
> now i need to output

You should get that info in the msg received from the coco ssd node??? Have you studied what you get in the msg?  
When you say output, what is it you would like to achieve? Present text somewhere or how? Ring a bell 😉

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 16:35 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/11 "2021-03-02T16:35:09Z")

</div>

Uh, ok, let's split the questions.  
First, i need to use the COCOSSD to analize the picture and get the image result.

Import this flow so you can understand the main goal and how the COCOSSD works.

```auto
[{"id":"fad9a160.c0d7e","type":"fileinject","z":"28cdadc8.e454e2","name":"","x":200,"y":580,"wires":[["cbc38d20.b0301","a21e4670.6b0778","6fff50b.444e4b"]]},{"id":"a21e4670.6b0778","type":"cocossd","z":"28cdadc8.e454e2","name":"","x":620,"y":640,"wires":[["f9e01f42.55c81","85f78770.2220c8"]]},{"id":"f9e01f42.55c81","type":"debug","z":"28cdadc8.e454e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":640,"wires":[]},{"id":"cbc38d20.b0301","type":"image","z":"28cdadc8.e454e2","name":"Original image","width":"160","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":490,"y":720,"wires":[]},{"id":"85f78770.2220c8","type":"image","z":"28cdadc8.e454e2","name":"","width":"160","data":"annotatedInput","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":780,"y":720,"wires":[]},{"id":"6fff50b.444e4b","type":"debug","z":"28cdadc8.e454e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":470,"y":540,"wires":[]}]

```

Second, i've worked the same flow modified with a telegram flow so i can send the picture and obtain a message with the result.  
Somehow that doesn't work, in the picture you can see that is got stuck in the COCOSSD.

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

Thanks a lot!

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 March 2021 17:17 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/12 "2021-03-02T17:17:11Z")

</div>

Yes, works fine here! Did you check the documentation for the node?

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

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 17:30 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/13 "2021-03-02T17:30:18Z")

</div>

Uhm is weird because the documentation doesn't say too much. I think the COCOSSD cannot process the image or something is failing during the process that i cannot see it.

I will keep looking...

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 18:08 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/14 "2021-03-02T18:08:44Z")

</div>

I dont get how does it work for you....

Are you setting the Viewer Node like this?.

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

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 March 2021 18:28 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/15 "2021-03-02T18:28:02Z")

</div>

No, see below. You did not read the help instruction for the node??

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/6/56da4bf31b6ad90d4745d222c0f9a0e0c7fdbf05.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b39cd169c091a1654c071c62f9c120f7cd2c5ba1.png)

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 18:53 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/16 "2021-03-02T18:53:32Z")

</div>

Yes i did...but it still doesn't work.

Maybe i have something misunderstood or not configured propperly.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 March 2021 19:06 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/17 "2021-03-02T19:06:53Z")

</div>

Yes, strange, is the analyze never finishing? How does the complete msg look like that you send to the coco ssd?

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 19:12 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/18 "2021-03-02T19:12:46Z")

</div>

The analyze message never ends...maybe it waits for somethig more or so.

And another strange thing is that i cannot get the complete debug msg. So maybe the COCOSSD not even process anything and the issue is a little before than that node.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 March 2021 19:22 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/19 "2021-03-02T19:22:11Z")

</div>

I would change the coco node. Try this one instead, much better and I think it is faster

# node-red-contrib-tfjs-coco-ssd

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

---

<div class="post-metadata">

### Author: ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)
#### Post date: [2 March 2021 20:07 UTC](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656/20 "2021-03-02T20:07:02Z")

</div>

Ok, what does the function node do?

[Next page](https://discourse.nodered.org/t/send-picture-telegram-no-usb-camera/41656.md?page=2)
