<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sarp Efe</title>
    <description>The latest articles on DEV Community by Sarp Efe (@sarpefe).</description>
    <link>https://dev.to/sarpefe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3874658%2F246ddb31-7c6c-4217-aa38-08fe4dd2df98.jpg</url>
      <title>DEV Community: Sarp Efe</title>
      <link>https://dev.to/sarpefe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sarpefe"/>
    <language>en</language>
    <item>
      <title>I Replaced a $30/Month Live Chat Tool with a Telegram Bot on WordPress</title>
      <dc:creator>Sarp Efe</dc:creator>
      <pubDate>Sun, 12 Apr 2026 09:33:23 +0000</pubDate>
      <link>https://dev.to/sarpefe/i-replaced-a-30month-live-chat-tool-with-a-telegram-bot-on-wordpress-bpk</link>
      <guid>https://dev.to/sarpefe/i-replaced-a-30month-live-chat-tool-with-a-telegram-bot-on-wordpress-bpk</guid>
      <description>&lt;p&gt;Every WordPress live chat tool I looked at cost money. A lot of it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tidio: $29/month&lt;/li&gt;
&lt;li&gt;LiveChat: $24/month per agent
&lt;/li&gt;
&lt;li&gt;Crisp: $25/month&lt;/li&gt;
&lt;li&gt;Intercom: don't even ask&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a solo developer just launching a WordPress plugin shop, I was going to spend more on the chat tool than I'd make in my first month of sales.&lt;/p&gt;

&lt;p&gt;So I looked at what these tools actually do.&lt;/p&gt;

&lt;p&gt;A visitor types a message → it goes to their server → their server pings my phone → I reply → it goes back through their server → visitor sees it.&lt;/p&gt;

&lt;p&gt;That's it. That's the whole service. $300/year for a relay.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Alternative
&lt;/h2&gt;

&lt;p&gt;Telegram's Bot API does the same thing. For free.&lt;/p&gt;

&lt;p&gt;So I built a WordPress plugin that connects directly to it — no relay server, no third-party storage, no monthly fee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visitor sends a message on your WordPress site&lt;/li&gt;
&lt;li&gt;Plugin sends it to your Telegram bot via Bot API&lt;/li&gt;
&lt;li&gt;You get an instant Telegram notification on your phone&lt;/li&gt;
&lt;li&gt;You reply in Telegram&lt;/li&gt;
&lt;li&gt;Visitor sees your reply on the site in real time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's the whole flow. Nothing in between.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Implementation
&lt;/h2&gt;

&lt;p&gt;For anyone curious about the internals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Webhook-based&lt;/strong&gt; — not polling. Telegram sends events to your server instantly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encrypted token storage&lt;/strong&gt; — bot token encrypted with AES-256-CBC using your WordPress secret key before database storage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local conversation history&lt;/strong&gt; — all chats stored in your own WordPress database, full history in WP admin&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited agents&lt;/strong&gt; — add your whole team to a Telegram group, no per-seat pricing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No external dependency&lt;/strong&gt; except Telegram API itself
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified webhook handler&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;handle_webhook&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;json_decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nb"&gt;file_get_contents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'php://input'&lt;/span&gt; &lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'message'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$chat_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'message'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'chat'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
        &lt;span class="nv"&gt;$text&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'message'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s1"&gt;'text'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

        &lt;span class="c1"&gt;// Store message, notify admin via Telegram&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;store_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$chat_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;notify_admin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$chat_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What It Can't Do
&lt;/h2&gt;

&lt;p&gt;Being honest here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No AI chatbot or automated responses&lt;/li&gt;
&lt;li&gt;No proactive messaging (you can't initiate conversations)&lt;/li&gt;
&lt;li&gt;Requires a Telegram account&lt;/li&gt;
&lt;li&gt;No fancy analytics dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you need AI responses or have a large support team with complex routing, a dedicated tool is worth the cost.&lt;/p&gt;

&lt;p&gt;But if you're a solo developer or small team who just needs to answer customer questions quickly — Telegram is already on your phone, notifications are instant, and the setup takes 5 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;I've been running this on my own site for months. It works. The notification is faster than most dedicated tools. I haven't paid a single monthly fee.&lt;/p&gt;

&lt;p&gt;I packaged it as a plugin called WP-TG Live Support Chat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="https://tglivechat.for-wordpress.org" rel="noopener noreferrer"&gt;https://tglivechat.for-wordpress.org&lt;/a&gt; — you can actually send a message and see the flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Product page:&lt;/strong&gt; &lt;a href="https://for-wordpress.org/product/wp-tg-live-support-chat-plugin-turn-telegram-into-your-free-live-chat-helpdesk/" rel="noopener noreferrer"&gt;https://for-wordpress.org/product/wp-tg-live-support-chat-plugin-turn-telegram-into-your-free-live-chat-helpdesk/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Broader Point
&lt;/h2&gt;

&lt;p&gt;Before paying for any SaaS tool, ask what it's actually doing.&lt;/p&gt;

&lt;p&gt;A lot of them are sitting between two free APIs, charging you monthly for the connection. Sometimes the middleware is worth it — great UI, reliability guarantees, dedicated support. &lt;/p&gt;

&lt;p&gt;But sometimes you can build the connection yourself in a weekend and own it forever.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have you replaced a SaaS tool with something you built yourself? What was it?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>telegram</category>
      <category>webdev</category>
      <category>php</category>
    </item>
  </channel>
</rss>
