Giter Club home page Giter Club logo

telegroam's Introduction

Telegroam: a bridge between Roam and Telegram

Send messages and photos to your own Telegram bot and have them appear in the Daily Notes page of your Roam graph.

You don't need to run any software or servers other than this JavaScript plugin for your Roam graph.

⚠️ Warning!

If you use the default proxy URL as in the instructions below, your media files will get passed through a trusted middleman.

You can run your own proxy easily using Heroku's free tier. This is how I run my proxy.

Click the button below and Heroku will guide you through the whole thing with zero configuration or coding. You will end up with your very own proxy URL.

Deploy

Why is a proxy necessary?

A proxy is necessary because of how Telegram's API works.

When Telegroam receives a photo, video, or audio, it has to download that file from Telegram in order to upload it to Roam's file storage.

But Telegram doesn't allow the browser to download its files, probably because of a bug. Instead we have to download via the proxy server.

Installation

I will make this more convenient later.

  1. In Telegram, talk to @BotFather to create a new bot and get an API key for it.

  2. Send something to your bot in a private message.

  3. Make a page in your Roam called [[Telegram Bot]].

  4. Paste these nodes somewhere on the [[Telegram Bot]] page:

    • Inbox Name:: [[Inbox]]
    • API Key:: insert key you get from Telegram's bot system
      • {{[[TODO]]}} update the Telegram API key above
    • Trusted Media Proxy:: https://telegram-cors-proxy.herokuapp.com
    • Latest Update ID::
  5. Make a block with the text {{[[roam/js]]}}.

  6. Nested in that block, make a code block and paste the full contents of telegroam.js inside.

  7. Reload Roam.

telegroam's People

Contributors

8bitgentleman avatar mbrock avatar tfiers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

telegroam's Issues

not working?

I just tried installing a telegroam bot. Followed the instruction but it didn't work. - What might have gone wrong?

Multi-block notes?

I would like to be able to send myself notes that include nested sub-blocks. Like this:

  • top line
    • second line
    • third line

Right now, it seems like each message is a single block and they can't be nested. Any chance this could change?

Media URLs from Telegram are not stable

The URLs we get from Telegram’s getLink method are not persistent. I don’t know how long they actually last.

Supposedly the files themselves and the file IDs are persistent. But it seems that we would need to download the files and upload them somewhere else.

Can we upload to Roam’s Firebase storage? I don’t know.

Only create inbox parent block if a message is received

Right now the inbox block in created on every single daily notes pages regardless of whether or not you sent a message. This clogs up the graph a bit with empty and useless mentions. Would it be possible to only create that inbox parent block if a message has been sent to telegroam?

Default Inbox

Feature request: Right now notes get sent to the top level of the current Daily Notes Page (DNP). I would prefer them to be grouped under a header "Inbox" - either creating that section if it doesn't exist, or if it does then adding them at the bottom of that section.

Telegroam: TypeError: Failed to fetch

The script works well mostly, but sometimes there is a popup showing this message.
Don't know how to mute it, since disable the notification doesn't work.

Did this stop working?

I was using it fine till yesterday. And now the messages have stopped appearing in Roam. Any ideas?

Block format

This is amazing. It is wonderfully fast and great with files.

It is possible to change the formatting of the blocks. I don't need user name or time signature.

Also, is it possible to send emails to the Telegram bot? This would open new possibilities.

Many thanks.

Photo/File upload seems to be broken

Has something to do with the proxy I believe. It's returning a 404 for the image and file even though the file can be accessed from the direct telegram link. Also seeing some Cross-Origin Read Blocking (CORB) warnings

API Key = "Authorization Token"?

When I launch @Botfather an "API key" is not one of the default options. Is it the same as an "authorization token" or is there an additional step that is necessary. I see something to create a bot, is that what I should be doing instead?

telegroam cannot be disabled or removed

Ever since installing the latest updated I am unable to remove telegroam from my graph. Deleting the code block does not stop it and even using the ?disablejs=true roam flag does not stop it. While I do love telegroam this seems like an issue

How to run own Proxy in Heroku?

Hello,

this works great! I'll probably go back to Roam due to this 🗡️
Any instructions on running the proxy on Heroku?

I thought the "Deploy" button would start with some kind of template, but that doesn't seem to be the case.

Thanks for this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.