# Telegramグループの投稿からトピックを作成する

**URL:** https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319
**Category:** Administrators
**Tags:** how-to
**Created:** [2016 年 12 月 15 日午後 11:36 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319 "2016-12-15T23:36:08Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![nukeador](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nukeador/32/107477_2.png) [@nukeador](https://meta.discourse.org/u/nukeador)
#### Post date: [2016 年 12 月 15 日午後 11:36 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/1 "2016-12-15T23:36:08Z")

</div>

With the new [IFTTT Telegram channel](http://ifttt.com/telegram) I’ve managed to set up an applet so everyone in a Telegram group can create new topics in a discourse category just by texting on the Telegram group.

## Why?

Because real time communications are noisy and most of the times you forget about the interesting stuff you share there. We wanted a way to “store” the relevant messages so we can elaborate or discuss asynchronously later.

## What would you need?

- An [IFTTT](http://ifttt.com/) account.
- A Telegram account and group (obviously)
- A discourse category with [incoming email](https://meta.discourse.org/t/setup-incoming-emails-e-mail/42026) and create topics by email enabled.
- A Gmail account linked to your IFTTT and to a discourse user.

## How?

1. Create a [new IFTTT applet](https://ifttt.com/create),
2. Choose **this** and then **Telegram**
3. Then “New message with key phrase in a group” (recommended) and then “Connect new groups”. You will be redirected to Telegram to add the bot to your group.
4. For key phrase select something like #discourse For the reply use something like: “Done! Your topic will be created in the next 5 minutes [https://yoursite/c/yourcategory](https://yoursite/c/yourcategory) (please just one message per user and minute)” and click _Create a trigger_
5. Choose **that** and select Gmail and then “Send an email” (make sure you have an user on discourse using this gmail address)
6. The destination email should be the category [incoming email](https://meta.discourse.org/t/setup-incoming-emails-e-mail/42026).
7. Fill the subject and body.

This is what I use:

**Subject** : `[Telegram] {{AuthorName}} - {{TriggeredAt}}`

**Body** :

```
<p>{{AuthorName}} (@{{AuthorUsername}}) wrote:</p>
{{Text}}
<p>_Message sent from Telegram_</p>

```

That’s all, everyone in your group will be able now to create new topics with a message by doing:

`/ifttt #discourse This is the message I want to send to discourse`

Your category will start populating the incoming messages each 5 minutes (depending on your pop polling setting) and will look like this:

![](https://global.discourse-cdn.com/meta/optimized/3X/5/0/504ab08bb4d4045c0a69b837a741873d72658523_2_690x32.png)

## Tips

- Create a new category just for these messages to avoid noise on the rest.
- Maybe create a new user just for this (I create one called Telegram-bot).
- You can set this category permissions so only the user you are using is able to create topics (I use a bots group)
- You can have a few mods in charge of monitoring this category, renaming titles and moving topics to other categories if needed.

---

<div class="post-metadata">

### Author: ![justeat](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@justeat](https://meta.discourse.org/u/justeat)
#### Post date: [2016 年 12 月 19 日午後 9:13 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/2 "2016-12-19T21:13:11Z")

</div>

Hi! it´s a nice way to improve the conversation on a forum. But a have random problems with the messages. Sometimes works and others not:

We’re sorry, but your email message to [“[xxxxxxxxxxx@gmail.com](mailto:xxxxxxxxxxx@gmail.com)”] (titled [Telegram] xxxxxxx - December 19, 2016 at 08:44PM) didn’t work.

Reason:

title is in use

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2016 年 12 月 19 日午後 9:28 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/3 "2016-12-19T21:28:39Z")

</div>

> [@justeat](#):
>
> Reason:
> 
> title is in use

Seems like a pretty clear reason to me…you tried to use the same title as an existing topic. Either chose a different title or enable `allow duplicate topic titles` in site settings.

---

<div class="post-metadata">

### Author: ![justeat](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@justeat](https://meta.discourse.org/u/justeat)
#### Post date: [2016 年 12 月 19 日午後 9:36 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/4 "2016-12-19T21:36:17Z")

</div>

> [@jomaxro](#):
>
> Seems like a pretty clear reason to me…you tried to use the same title as an existing topic. Either chose a different title or enable allow duplicate topic titles in site settings.

I will try that, but the tittle is the same for each message (subject is the same on applet).

Thanks!

---

<div class="post-metadata">

### Author: ![justeat](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@justeat](https://meta.discourse.org/u/justeat)
#### Post date: [2016 年 12 月 19 日午後 9:43 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/5 "2016-12-19T21:43:18Z")

</div>

I´m looking trough administration panel and get this:

Error  
RateLimiter::LimitExceeded

any idea?

---

<div class="post-metadata">

### Author: ![justeat](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@justeat](https://meta.discourse.org/u/justeat)
#### Post date: [2016 年 12 月 19 日午後 9:53 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/6 "2016-12-19T21:53:43Z")

</div>

Solved! the problem was the bot don´t have enough privileges.Set level 3 and make a group for it, works licke a charm.

---

<div class="post-metadata">

### Author: ![nukeador](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nukeador/32/107477_2.png) [@nukeador](https://meta.discourse.org/u/nukeador)
#### Post date: [2016 年 12 月 19 日午後 10:37 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/7 "2016-12-19T22:37:54Z")

</div>

> [@justeat](#):
>
> I will try that, but the tittle is the same for each message (subject is the same on applet).

The implementation of the topic title I used just have the username + date, so you won’t be able to have the same (telegram) username posting at the same minute (a limitation in order to have unique titles)

---

<div class="post-metadata">

### Author: ![justeat](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@justeat](https://meta.discourse.org/u/justeat)
#### Post date: [2016 年 12 月 19 日午後 11:01 UTC](https://meta.discourse.org/t/create-topics-from-a-posts-to-telegram-group/54319/8 "2016-12-19T23:01:31Z")

</div>

Can bypass that with specific permissions. A private group for example.
