I've long wanted a notes app with an optional chat style interface for append-only notes. The idea is that I'll use the simpler append-only interface while on the go, and then use full-featured interface to review, edit, and organize those notes when I'm back at my computer.

I realized recently that a combination of Telegram + Logseq will do exactly what I want! I jot down notes in a Telegram channel, and when I return to my computer, I find them in a single Logseq note called quick notes. It's a dream. 🥰

I figured this might be useful to others, so I wrote down the steps I took to set this up. To get a sense of what you're getting yourself into, here's a demo of how it will work in the end if you follow the directions:

Heads up, it takes several seconds for the message to show up in (a) your quick notes page Logseq and (b) the quick notes.md file that backs it in Dropbox. Here's a video with a full res version of this demo.



What to expect from this tutorial
Result: When you send a message to a particular Telegram channel, it will append the message to a file in Dropbox and will also show up in iCloud and in your Logseq notes.

Requirements: You will need accounts on Telegram, IFTTT, Dropbox, and iCloud. I also assume that you already have a Logseq graph set up and stored in iCloud.



Step 1: Link Telegram to Dropbox
  1. Create a new channel in Telegram. I called my channel quick notes.
    • Note that a channel is not the same as a group!
    • Make sure you say allow forwarding, as this will be a requirement for step 4.
  2. Create a new applet in IFTTT, and select Telegram as the Trigger.
  3. Now you'll connect your channel to IFTTT. Click connect new channels, which will direct you to a chat with the IFTTT bot in the Telegram app. Click the start button at the bottom of the chat.
    Follow the steps the IFTTT bot shares with you: (a) add the bot as an admin in your quick notes channel and then (b) forward a message from the quick notes channel to the bot.
  4. Go back to the IFTTT trigger screen and select quick notes for the which channel? field.
  5. Now you'll create the Then action. Select Dropbox and use the Append to a text file action. Here are the values I put in the fields (below). This will append messages you send to your quick notes channel to a file in your dropbox titled Dropbox/telegram/quick notes.txt.
filename:
{{ChannelTitle}}
content:
- {{PostText}}
collapsed:: true
-
date:: {{PostedAt}} ET
telegram-link:: {{PostUrl}}
Dropbox folder path:
telegram

  1. Save the applet. (Note that you have to click the "update" button twice... no, I don't know why IFTTT made the UI that way...)

Before we move on, let's test to make sure it's working how you expect. Send yourself a message in the quick notes, and a few seconds later you should see it pop up at the bottom of Dropbox/telegram/quick notes.txt.



Step 2: Link Dropbox to iCloud
  1. Change the extension of the file in Dropbox from .txt to .md. Note that the Then part of the IFTTT applet is agnostic to the extension, so this shouldn't break anything. (That said, I'd test this again to make sure it works as expected.)
  2. Create a symlink of quick notes.md into wherever you have store your Logseq graph. Here's the command I used, as an example: ln -s "/Users/devonzuegel/Dropbox/telegram/quick notes.md" "/Users/devonzuegel/Library/Mobile Documents/iCloud~md~obsidian/Documents/logseq-db/pages"
  3. Search Logseq for your new quick notes page. It should show up just like any other page, and when you edit it, you should see the changes reflected in the file in the Dropbox folder and in your iCloud folder.

Let's test it now! Send a message from Telegram to the quick notes channel. After a few seconds, it should show up in Logseq in the quick notes file!



Step 3: Add support for images
For some reason the Telegram trigger we set up in Step 1 doesn't support images, so we have to set up a second trigger to handle that. This is very similar to Step 1, with a few minor tweaks to handle the specifics of images.
  1. Create a new applet in IFTTT, and select Telegram > New photo in your channel as the Trigger.
  2. Connect your existing quick notes channel to IFTTT (the which channel? field).
  3. Create the Then action. Select Dropbox and use the Append to a text file action. Here are the values I put in the fields (below). This will append photos and their captions you send to your quick notes channel to a file in your dropbox titled Dropbox/telegram/quick notes.txt.
filename:
{{ChannelTitle}}
content:
- ![]({{PhotoUrl}}){:width 350}
{{Caption}}
collapsed:: true
-
date:: {{PostedAt}} ET
telegram-link:: {{PostUrl}}
Dropbox folder path:
telegram


Now try sending yourself an image, both with and without the caption!



Step 4: Customization
Here's the icon for my quick notes channel 🙂
Time to nest!

One option is you can give your channel a cute icon. Or if you're boring, you can just leave it with the default.

You can also rename the channel if you want, but be careful because this might break the IFTTT connection. If you do so, make sure you also update the filename to match in the IFTTT "Then append to a text file" action.



Caveats to keep in mind
  • Emoji: If you send emoji, they won't show up in the file (e.g. a message like "hello 👋" will show up in the .md file as "hello "). I'm not sure why!
  • Forwarded messages: This setup won't work with forwarded messages. I'm working on it to see if there's a way to support those too.
  • Timezone: The date:: will be in whatever timezone you set in your IFTTT settings. It does not have the local time where you sent the message in Telegram. (For me, that's Eastern Time.)



FAQ
Q: Why use Dropbox at all if your Logseq notes are stored in iCloud?
  • Unfortunately, IFTTT doesn't support iCloud as a plugin, but it does support Dropbox. So the next best thing was to sync the document
  • I also checked Zapier, and it doesn't support iCloud OR Telegram as plugins, so it was a no-go.

Q: What are the limitations of this solution?
  • It doesn't work when the computer where you have the symlink isn't running.
  • Note that this may create merge conflicts. To me this is okay, because I'm treating my quick notes as purely append-only, so merge conflicts can't really happen.

Q: Why is this useful?