n8n

How to Sync Telegram Links to Content Library?

Capture new links from a Telegram channel and file them into two reading and bookmarking apps on a schedule. The flow checks what is already saved and only adds the missing links. This is helpful for content teams and researchers who share links in chat and want a clean, searchable library.

A scheduled trigger calls a Telegram endpoint to pull recent channel messages. A code step scans each message and extracts the URLs. The flow then calls both bookmark services to get the current saved items. One split step unpacks a bookmarks array for easier handling. Two compare steps remove anything that already exists by matching URLs with a fast set lookup. The remaining links are posted to both services using HTTP requests with Authorization headers. Server URLs and keys are stored as environment variables, so nothing is hardcoded.

You will need API access for Telegram and both bookmark tools, plus server URLs and tokens. Once configured, daily link filing can drop from about 30 minutes to around 3 minutes, with far fewer duplicates. Teams that curate sources for blogs, newsletters, or research will see a steady, organized library in two systems without extra copy and paste. Adjust the schedule to control how often you collect new links, and use a small test run before enabling a full backfill.

What are the key features?

  • Scheduled collection of Telegram channel messages using a timer
  • Code step that extracts URLs from message text
  • HTTP requests that fetch existing bookmarks from two services
  • Split step that expands a bookmarks array for easier processing
  • Set steps that shape data to a simple id and url format
  • Deduplication logic that compares new URLs against saved sets
  • HTTP POST actions that create new bookmarks with API keys
  • Environment variables for server URLs and tokens so keys are not hardcoded

What are the benefits?

  • Reduce manual link filing from 30 minutes to about 3 minutes per day
  • Eliminate up to 90 percent of duplicate saves by checking both libraries first
  • Handle 5 to 10 times more shared links without extra staff effort
  • Keep two knowledge systems in sync from one chat source
  • Lower human error by using consistent parsing and posting rules

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Telegram, Readeck and Hoarder. See the Tools Required section above for links to create accounts with these services.
  3. In n8n Cloud, add environment variables for READECK_SERVER, READECK_API_KEY, HOARDER_SERVER, and HOARDER_API_KEY. Use full base URLs including https and the correct API path.
  4. Open the channel_items_tg node. Double click the node, then on the 'Credential to connect with' dropdown, click 'Create new credential' and follow the on screen instructions to integrate that service. Enter the Telegram API endpoint and any required token or headers.
  5. Open the channel_links_tg code node and confirm it extracts URLs from message text. Run a test with a few sample messages and check the output includes a clean list of links.
  6. Open get_links_rd and get_links_hd nodes. Confirm the URLs use your server variables and that Authorization headers reference the correct API keys. Click Execute Node to verify you get a 200 response with bookmark data.
  7. Check the Split Out node. Make sure the field name matches the bookmarks array returned by your hoarder API. If the API uses a different field, update the fieldToSplitOut setting.
  8. Inspect the saved_links_rd and saved_links_hd set nodes. Ensure they map id and url correctly from each API response so the compare step can work.
  9. Open the not_saved_links_rd and not_saved_links_hd code nodes. Confirm they compare incoming links to the saved sets and output only new URLs.
  10. Test the save_link_rd and save_link_hd nodes by executing them with one sample URL. Verify a new bookmark appears in both apps. If you get 401 or 403, recheck API keys and permissions.
  11. Set the Schedule Trigger to your desired interval in hours. Run the workflow once, review the execution log, and then enable it for continuous operation.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Hoarder

Sign up

Self-hosted: $0 / mo (open source), REST API included

Readeck

Sign up

Self-hosted: Free ($0)

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.