<?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: Pavithran M</title>
    <description>The latest articles on DEV Community by Pavithran M (@pavithranp12).</description>
    <link>https://dev.to/pavithranp12</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%2F3421862%2F8507e667-aea3-4626-9e2f-1dae9c7ab27d.png</url>
      <title>DEV Community: Pavithran M</title>
      <link>https://dev.to/pavithranp12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pavithranp12"/>
    <language>en</language>
    <item>
      <title>📬 Automate Email Attachments to Telegram with Python + Render.com</title>
      <dc:creator>Pavithran M</dc:creator>
      <pubDate>Sun, 10 Aug 2025 13:00:11 +0000</pubDate>
      <link>https://dev.to/pavithranp12/automate-email-attachments-to-telegram-with-python-rendercom-3p7j</link>
      <guid>https://dev.to/pavithranp12/automate-email-attachments-to-telegram-with-python-rendercom-3p7j</guid>
      <description>&lt;p&gt;Ever wished you could automatically forward email attachments to your Telegram chat or group? Whether it's invoices, reports, or alerts—this Python script does exactly that. And the best part? You can deploy it as a scheduled cron job on &lt;a href="https://render.com" rel="noopener noreferrer"&gt;Render.com&lt;/a&gt; with zero hassle.&lt;/p&gt;

&lt;p&gt;Let’s walk through the features, setup, and deployment steps to get this automation running in minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What This App Does
&lt;/h2&gt;

&lt;p&gt;This Python application:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Connects securely to Yahoo Mail via IMAP
&lt;/li&gt;
&lt;li&gt;📂 Downloads the latest attachment from a specific folder (&lt;code&gt;B2b&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;📤 Sends the attachment to a Telegram chat or group using the Telegram Bot API
&lt;/li&gt;
&lt;li&gt;🧾 Logs each step for easy debugging
&lt;/li&gt;
&lt;li&gt;🕒 Runs automatically on a schedule using Render.com’s cron job feature
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Perfect for automating workflows that rely on email-based file delivery.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Tech Stack
&lt;/h2&gt;

&lt;p&gt;Here’s what powers the app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imaplib&lt;/code&gt; – for accessing email via IMAP
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;email&lt;/code&gt; – for parsing MIME messages
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;requests&lt;/code&gt; – for sending files to Telegram
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dotenv&lt;/code&gt; – for managing environment variables locally
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Clone the Repository
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/your-username/email-to-telegram.git
&lt;span class="nb"&gt;cd &lt;/span&gt;email-to-telegram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Create a &lt;code&gt;.env&lt;/code&gt; File (for local testing)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;EMAIL_USER&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your_yahoo_email@example.com&lt;/span&gt;
&lt;span class="py"&gt;EMAIL_PASS&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your_yahoo_app_password&lt;/span&gt;
&lt;span class="py"&gt;TELEGRAM_TOKEN&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your_telegram_bot_token&lt;/span&gt;
&lt;span class="py"&gt;TELEGRAM_CHAT_ID&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your_chat_id_or_group_id&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ Use a Yahoo &lt;strong&gt;App Password&lt;/strong&gt; instead of your regular password for IMAP access.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧑‍💻 Local Testing
&lt;/h2&gt;

&lt;p&gt;Run the script manually to verify everything works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python script.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see logs showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connection to Yahoo Mail
&lt;/li&gt;
&lt;li&gt;Attachment download
&lt;/li&gt;
&lt;li&gt;Telegram API response
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ☁️ Deploying on Render.com
&lt;/h2&gt;

&lt;p&gt;Render makes it super easy to automate this with a cron job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create a New Cron Job
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://dashboard.render.com/new/cron" rel="noopener noreferrer"&gt;Render Cron Jobs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Python&lt;/strong&gt; as the runtime
&lt;/li&gt;
&lt;li&gt;Set your schedule using cron syntax (e.g., &lt;code&gt;0 * * * *&lt;/code&gt; for hourly)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Upload Your Code
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Upload your script (&lt;code&gt;script.py&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Include a &lt;code&gt;requirements.txt&lt;/code&gt; with:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  requests
  python-dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Set Environment Variables
&lt;/h3&gt;

&lt;p&gt;In the &lt;strong&gt;Environment&lt;/strong&gt; section of the cron job setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;EMAIL_USER&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EMAIL_PASS&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TELEGRAM_TOKEN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TELEGRAM_CHAT_ID&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;You don’t need the &lt;code&gt;.env&lt;/code&gt; file on Render—just set the variables directly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 4: Confirm and Deploy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Save and deploy the cron job
&lt;/li&gt;
&lt;li&gt;Check logs after the first scheduled run to confirm success
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 Troubleshooting Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No logs?&lt;/strong&gt; Add &lt;code&gt;print()&lt;/code&gt; statements to trace execution.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No attachment sent?&lt;/strong&gt; Double-check the folder name (&lt;code&gt;B2b&lt;/code&gt;) and email structure.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram error?&lt;/strong&gt; Make sure the bot isn’t blocked and has permission to send messages.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧾 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This setup is ideal for automating repetitive email-based workflows and keeping your Telegram feed updated with important files. You can easily extend it to support multiple folders, file types, or even filter by subject lines.&lt;/p&gt;

&lt;p&gt;If you found this helpful, drop a ❤️ or share your own automation ideas in the comments!&lt;/p&gt;




&lt;p&gt;Take a look at &lt;a href="https://pavithran.tech" rel="noopener noreferrer"&gt;me!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>python</category>
    </item>
    <item>
      <title>🎮 Turning My GitHub into a Game — My First Step Toward Showcasing My Skills!</title>
      <dc:creator>Pavithran M</dc:creator>
      <pubDate>Fri, 08 Aug 2025 17:28:12 +0000</pubDate>
      <link>https://dev.to/pavithranp12/turning-my-github-into-a-game-my-first-step-toward-showcasing-my-skills-400e</link>
      <guid>https://dev.to/pavithranp12/turning-my-github-into-a-game-my-first-step-toward-showcasing-my-skills-400e</guid>
      <description>&lt;p&gt;Hey everyone 👋,&lt;/p&gt;

&lt;p&gt;I've been working in the tech industry for almost 5 years, gaining hands-on experience in various technologies — particularly in .NET, SQL, application development, and database engineering.&lt;/p&gt;

&lt;p&gt;But until now, I never really showcased my work, projects, or progress publicly.&lt;br&gt;
Well... better late than never, right? 😄&lt;/p&gt;

&lt;p&gt;🚀 What Sparked the Change?&lt;br&gt;
Big shoutout to this amazing post by &lt;a class="mentioned-user" href="https://dev.to/vidakhoshpey22"&gt;@vidakhoshpey22&lt;/a&gt; &lt;br&gt;
It inspired me to transform my GitHub profile into a gamified contribution graph — featuring Pac-Man!&lt;/p&gt;

&lt;p&gt;This was a fun and rewarding project that not only added visual flair to my profile but also kickstarted my journey into consistently recording and sharing my professional milestones.&lt;/p&gt;

&lt;p&gt;🛠️ What I've Done So Far&lt;br&gt;
✅ Setup a Pac-Man-themed contribution graph on my GitHub&lt;br&gt;
✅ Created a dedicated Milestones repo to track all my achievements&lt;br&gt;
✅ Committed to logging everything I learn or build going forward&lt;/p&gt;

&lt;p&gt;🔗 Check out my GitHub: github.com/Pavithran-P12&lt;/p&gt;

&lt;p&gt;✨ What’s Next?&lt;br&gt;
This is just the beginning.&lt;br&gt;
I'll be documenting more tasks, sharing bite-sized accomplishments, and contributing to open-source wherever I can.&lt;/p&gt;

&lt;p&gt;If you're like me — experienced but haven't showcased much — this is your sign to start now. Share, track, and celebrate your journey 🎉&lt;/p&gt;

&lt;p&gt;Happy coding everyone!&lt;br&gt;
Happy developing! 💻🚀&lt;/p&gt;

</description>
      <category>github</category>
      <category>portfolio</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
