# \[APP\]\[Pro\] Telegram

**URL:** <https://community.homey.app/t/app-pro-telegram/66622>\
**Category:** Apps\
**Tags:** app, flow, homey-pro\
**Created:** [July 28, 2022, 1:34pm UTC](https://community.homey.app/t/app-pro-telegram/66622 "2022-07-28T13:34:36Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 23, 2022, 9:46am UTC](https://community.homey.app/t/app-pro-telegram/66622/163 "2022-12-23T09:46:16Z")

</div>

> [@Hamster](#):
>
> Is it possible to use HomeyScript to remove/add answers from a question defined in your app?
> 
> That would allow us to dynamically create the answers.

Not sure, never looked into it. Once I have my Homey I can take a look into it.

> [@Peter\_Kawa](#):
>
> I can’t find (after a quick search) a post about this function, which I like to share.

You’re the first one that did something like this 🙂 Thank you for sharing!

---

<div class="post-metadata">

**Author:** ![Hamster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hamster/32/16580_2.png) [@Hamster](https://community.homey.app/u/Hamster)\
**Post date:** [December 23, 2022, 6:31pm UTC](https://community.homey.app/t/app-pro-telegram/66622/164 "2022-12-23T18:31:43Z")

</div>

@spkesDE, you might have gotten a message or two from me for crashing my Telegram Notifications app 🤣

I was looking around in the settings of your app, and I noticed that you store the questions as part of the app settings.

```auto
let setting = await Homey.apps.getAppSetting({id:'com.spkes.telegramNotifications',name:'questions'});
console.log(setting);

```

It all went wrong when I tried to use the setAppSetting 😇

```auto
DONT USE THIS LINE OF CODE AS IT WILL CRASH TELEGRAM NOTIFICATIONS
await Homey.apps.setAppSetting({id:'com.spkes.telegramNotifications',name:'questions',value:[{"question":"Test","UUID":"The_UUID_as_shown_in_the_app_for_this_question","buttons":["A","B"],"keepButtons":false,"disable_notification":false}]})
DONT USE THIS LINE OF CODE AS IT WILL CRASH TELEGRAM NOTIFICATIONS

```

I re-installed the app and all is working again 😇

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 23, 2022, 6:47pm UTC](https://community.homey.app/t/app-pro-telegram/66622/165 "2022-12-23T18:47:46Z")

</div>

> [@Hamster](#):
>
> I was looking around in the settings of your app, and I noticed that you store the questions as part of the app settings.

Yes, i do as a JSON. You fucked up the Json 😃

```auto
Unable to initialize app SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse ()

```

Structure should be

```auto
    question: string = "";
    UUID: string = "";
    buttons: string[] = [];
    keepButtons: boolean = false;
    disable_notification: boolean = false;

```

```auto
[
  {
    "question": "test",
    "UUID": "asdata45arfsa",
    "buttons": [
      "Yes",
      "No",
      "Maybe"
    ],
    "keepButtons": false,
    "disable_notification": false
  },
  {
    "question": "test",
    "UUID": "asdata45arfsa",
    "buttons": [
      "Yes",
      "No",
      "Maybe"
    ],
    "keepButtons": false,
    "disable_notification": false
  }
]

```

---

<div class="post-metadata">

**Author:** ![Hamster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hamster/32/16580_2.png) [@Hamster](https://community.homey.app/u/Hamster)\
**Post date:** [December 23, 2022, 9:37pm UTC](https://community.homey.app/t/app-pro-telegram/66622/166 "2022-12-23T21:37:48Z")

</div>

> [@spkesDE](#):
>
> You fucked up the Json 😃

I know I did 🤣

---

<div class="post-metadata">

**Author:** ![Hamster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hamster/32/16580_2.png) [@Hamster](https://community.homey.app/u/Hamster)\
**Post date:** [December 24, 2022, 12:53pm UTC](https://community.homey.app/t/app-pro-telegram/66622/167 "2022-12-24T12:53:57Z")

</div>

After some more fiddling, I can now edit the answers of any question in the Telegram Notification app with a simple flow.

```auto
//Arguments {"question":"Test","answers":["A","B"]}
let myArgs = JSON.parse(args[0]);

let question = myArgs.question;
let answers = myArgs.answers;

let setting = await Homey.apps.getAppSetting({id:'com.spkes.telegramNotifications',name:'questions'});

let telegram_json = await JSON.parse(setting);
_.forEach(telegram_json, x => {
        if (x.question==question){
          x.buttons=answers
        }
    });

await Homey.apps.setAppSetting({
    id:'com.spkes.telegramNotifications',
    name:'questions',
    value:JSON.stringify(telegram_json)
    })

```

Please note, there’s zero error checking, I will add those later.

---

<div class="post-metadata">

**Author:** ![JMH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jmh/32/29230_2.png) [@JMH](https://community.homey.app/u/JMH)\
**Post date:** [December 24, 2022, 2:50pm UTC](https://community.homey.app/t/app-pro-telegram/66622/168 "2022-12-24T14:50:14Z")

</div>

Is it possible to use text-styling in messages? Like **bold** and _italic_?

In the app Telegram Bot I use it very often (stars for bold, underscores for italic) to mark important parts of my messages or make clear that is only information. Can’t find the option so far…

I was used to Telegram Bot, but liked the idea of questions of this app, so I installed it and now I f\*cked my Telegram Bot 🤣 🤣

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 24, 2022, 4:17pm UTC](https://community.homey.app/t/app-pro-telegram/66622/169 "2022-12-24T16:17:19Z")

</div>

If the default messages markdown is not working I would have to take a look into. Since I don’t have a Homey Pro currently, it has to wait till I have mine again. Also I have quite a bunch of stuff on my todo list.

```auto
Bold => <b>bold</b>, <strong>bold</strong>, **bold**
Italic => <i>italic</i>, <em>italic</em> *italic*
Code => <code>code</code>, `code`
Strike => <s>strike</s>, <strike>strike</strike>, <del>strike</del>, ~~strike~~
Underline => <u>underline</u>
Pre => <pre language="c++">code</pre>,

```

Edit: Markdown support should be added with the next version. already done, needs testing. (Can’t be done from someone else, since there are some big changes on the telegram api)

---

<div class="post-metadata">

**Author:** ![JMH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jmh/32/29230_2.png) [@JMH](https://community.homey.app/u/JMH)\
**Post date:** [December 24, 2022, 9:11pm UTC](https://community.homey.app/t/app-pro-telegram/66622/170 "2022-12-24T21:11:50Z")

</div>

Just tested the codes, none of them work, as you mentioned already.  
Is it in the test-version allready?

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 24, 2022, 9:28pm UTC](https://community.homey.app/t/app-pro-telegram/66622/171 "2022-12-24T21:28:21Z")

</div>

> [@JMH](#):
>
> Is it in the test-version allready?

No, local on my pc only since it has to be tested from my side first since it has huge changes on many bits. You have sadly to wait till I get my developer Homey Pro 2023. So hopefully mid/end January

---

<div class="post-metadata">

**Author:** ![Hamster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hamster/32/16580_2.png) [@Hamster](https://community.homey.app/u/Hamster)\
**Post date:** [December 28, 2022, 8:04pm UTC](https://community.homey.app/t/app-pro-telegram/66622/172 "2022-12-28T20:04:51Z")

</div>

@spkesDE,

How much control do we have on the text on the buttons? I have quite a bit of text, and the text is being truncated.

Can we force wordwrap or use large buttons (like the last button) for all the answers?

 ![Screenshot_20221228_205408_Telegram](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/0/30c5cc3e50ee49fcd3928243b8abce7fc91441fc.jpeg)

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 28, 2022, 8:09pm UTC](https://community.homey.app/t/app-pro-telegram/66622/173 "2022-12-28T20:09:27Z")

</div>

> [@Hamster](#):
>
> Can we force wordwrap or use large buttons (like the last button) for all the answers?

About Word warp I’m not quite sure. It can be possible but I would have to test it, but my guts says that telegram will not allow it.

What I could offer is to make a option to the questions, where you can select the columns. But I have a quite long todo list with the app, so it will take a couple of weeks.

Edit:  
Just a untested version of the change.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/e/3e16410fe005bf2924b6aebe1e2a992ab118c10b.png)

---

<div class="post-metadata">

**Author:** ![JP\_van\_den\_H](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jp_van_den_h/32/8007_2.png) [@JP\_van\_den\_H](https://community.homey.app/u/JP_van_den_H)\
**Post date:** [December 30, 2022, 12:22pm UTC](https://community.homey.app/t/app-pro-telegram/66622/174 "2022-12-30T12:22:45Z")

</div>

Hi, thanks for this app.  
I don’t know what I’m missing, but I seem not be able to start.  
I created a telegram bot and added the token, which lights up green. I wrote my bot /start, but there aren’t any instructions going further in the chat and I can’t find a user to send a message to.

It’s just me using it.  
What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 30, 2022, 12:37pm UTC](https://community.homey.app/t/app-pro-telegram/66622/175 "2022-12-30T12:37:50Z")

</div>

Are you writing the bot in private or in a group?  
Are you using the test version or the live version?  
Could you send me a diagnostic report?

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [February 4, 2023, 11:41am UTC](https://community.homey.app/t/app-pro-telegram/66622/176 "2023-02-04T11:41:29Z")

</div>

Making good progress to implement all the planned changes 🙂  
Running in some issues with Markdown but I’ll find a way

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [February 4, 2023, 4:19pm UTC](https://community.homey.app/t/app-pro-telegram/66622/177 "2023-02-04T16:19:47Z")

</div>

## A new test version is available!

> **[Telegram | Homey](https://homey.app/de-de/app/com.spkes.telegramNotifications/Telegram/)**
>
> Steuere mühelos dein Smart-Zuhause mit Telegram

Changes:

- New Design
- New Settings Page design
- BLL Support
- Custom ID’s for questions as @JB2K asked for it 🙂
- Delete messages by ID (Bot needs the permissions for it though if its a different message sender)
- The ability to change the columns of buttons for each question (@Hamster [requested this!](https://community.homey.app/t/app-pro-telegram/66622/172) Thank you for the great idea)
- Added Timestamp to the Message received cards
- Added a Message is received from chat card
- Code enhancements 🎉
- Updated dependencies

Planed:

- Support for topics
- MarkdownV2 support

Please report issues at the [issues section on Github](https://github.com/spkesDE/TelegramNotifications/issues) otherwise in this topic.

---

<div class="post-metadata">

**Author:** ![JB2K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jb2k/32/134070_2.png) [@JB2K](https://community.homey.app/u/JB2K)\
**Post date:** [February 4, 2023, 6:23pm UTC](https://community.homey.app/t/app-pro-telegram/66622/178 "2023-02-04T18:23:13Z")

</div>

Woop Woop

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [February 9, 2023, 10:25am UTC](https://community.homey.app/t/app-pro-telegram/66622/179 "2023-02-09T10:25:58Z")

</div>

# Telegram 2.2.0 is now live!

> **[Telegram | Homey](https://homey.app/en-us/app/com.spkes.telegramNotifications/Telegram/)**
>
> Effortlessly control your smart home with Telegram

## Changes

- New Design
- New Settings Page design
- Custom ID’s for questions
- Delete messages by ID (Bot needs the permissions for it though if its a different message sender)
- Delete messages by ID & ChatId
- The ability to change the columns of buttons for each question
- Added Timestamp to the Message received cards
- Added a Message is received from chat card
- Code improvements
- Updated dependencies

## Breaking Changes

- BLL support is currently deactivated. Will be reenabled once WebAPI is fixed on the Homey Pro 2023

---

<div class="post-metadata">

**Author:** ![basvanderploeg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/basvanderploeg/32/83556_2.png) [@basvanderploeg](https://community.homey.app/u/basvanderploeg)\
**Post date:** [February 11, 2023, 5:08pm UTC](https://community.homey.app/t/app-pro-telegram/66622/180 "2023-02-11T17:08:37Z")

</div>

@spkesDE **Homey Pro 2023** : I’m trying to send images from an image tag, but it doesn’t work.

Depending on the kind of image tag I’m using, these are the errors:

Image tag from the standard Homey Virtual Camera devices:

 ![Scherm­afbeelding 2023-02-11 om 17.56.20](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/9/3932a7eec1f00cf1524668a5f4ff3c8af06b118f.png)

Image tag from a Homey Gallery image:

 ![Scherm­afbeelding 2023-02-11 om 18.03.28](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cf61f2dfd9adcf8af14e7f50b5bb8c821ec64a95.png)

Any idea what the problem could be?

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [February 11, 2023, 5:12pm UTC](https://community.homey.app/t/app-pro-telegram/66622/181 "2023-02-11T17:12:11Z")

</div>

I’ll check this out. Most likely there is no cloud URL.

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [February 11, 2023, 5:20pm UTC](https://community.homey.app/t/app-pro-telegram/66622/182 "2023-02-11T17:20:07Z")

</div>

Could you use the latest test version?

> **[Telegram](https://homey.app/en-us/app/com.spkes.telegramNotifications/Telegram/)**
>
> Effortlessly control your smart home with Telegram

And send a Image Tag card **without** text! and create a diagnostic report?

I can’t get image tags to work on my HP2023 right now.

[Previous page](https://community.homey.app/t/app-pro-telegram/66622.md?page=8)

[Next page](https://community.homey.app/t/app-pro-telegram/66622.md?page=10)
