<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Binay kumar pradhan  on Medium]]></title>
        <description><![CDATA[Stories by Binay kumar pradhan  on Medium]]></description>
        <link>https://medium.com/@pbinay076?source=rss-ce238fe93f9d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zouY3R13CF9sN59f</url>
            <title>Stories by Binay kumar pradhan  on Medium</title>
            <link>https://medium.com/@pbinay076?source=rss-ce238fe93f9d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:08:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pbinay076/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automate Your Workflow: Save New Emails to Google Sheets Using Zapier]]></title>
            <link>https://medium.com/@pbinay076/automate-your-workflow-save-new-emails-to-google-sheets-using-zapier-0b53d973c0e3?source=rss-ce238fe93f9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b53d973c0e3</guid>
            <dc:creator><![CDATA[Binay kumar pradhan ]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 09:48:31 GMT</pubDate>
            <atom:updated>2025-04-03T09:50:59.567Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you tired of manually tracking important emails? With Zapier, you can automate the process and store all new emails in a Google Sheet effortlessly. This tutorial will guide you step by step to set up a Zap that automatically logs new emails from Gmail into a spreadsheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*-0trh3GW10YXxZdH.jpg" /></figure><h3>What You’ll Need</h3><ul><li>A Gmail account</li><li>A Google Sheets account</li><li>A Zapier account (Free or Paid)</li></ul><h3>Step 1: Prepare Your Google Sheet 📝</h3><p>Before setting up Zapier, create a structured Google Sheet where your email data will be stored.</p><ol><li>Open <strong>Google Sheets</strong> and create a new spreadsheet.</li><li>Name it <strong>“Email Tracker”</strong> or any relevant name.</li><li>Add the following column headers in the first row:</li></ol><ul><li><strong>Sender</strong> (Column A)</li><li><strong>Subject</strong> (Column B)</li><li><strong>Body </strong>(Column C)</li><li><strong>Timestamp</strong> (Column D)</li></ul><p>Your sheet should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCqTvReJbqjE9WoE0QaEfQ.png" /></figure><h3>Step 2: Create a New Zap in Zapier⚙️</h3><p>Now, let’s configure Zapier to automate the process.</p><ol><li><strong>Log into Zapier</strong> at <a href="https://zapier.com/">Zapier.com</a>.</li><li>Click <strong>“Create Zap”</strong> at the top left.</li><li>In the <strong>Trigger</strong> section, search for and select <strong>Gmail</strong>.</li><li>Choose <strong>“New Email”</strong> as the trigger event and click <strong>Continue</strong>.</li><li>Connect your Gmail account and grant the necessary permissions.</li><li>Set up trigger filters:</li></ol><ul><li>Choose your inbox.</li><li>(Optional) Filter emails by a specific sender or label.</li></ul><p>7. Click <strong>“Test Trigger”</strong> to check if Zapier retrieves an email correctly.</p><p>8. Zapier will display a list of sample emails (e.g., Email A, Email B, Email C). Select one that you want to use for testing and click <strong>Continue</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*yf1rHwJIRqItJSQ1b5QFLQ.png" /></figure><h3>Step 3: Configure Google Sheets as the Action 📊</h3><p>Once Gmail is connected, let’s set up Google Sheets to log email details.</p><ol><li>Click <strong>“+ Add Action”</strong>.</li><li>Search for and select <strong>Google Sheets</strong>.</li><li>Choose <strong>“Create Spreadsheet Row”</strong> as the event and click <strong>Continue</strong>.</li><li>Connect your Google account and grant the necessary permissions.</li><li>Select the correct <strong>Spreadsheet</strong> and <strong>Worksheet</strong>.</li><li>Map Gmail data fields to Google Sheet columns:</li></ol><ul><li><strong>Sender</strong> → From Email</li><li><strong>Subject</strong> → Email Subject</li><li><strong>Body</strong>→ Email Body</li><li><strong>Timestamp</strong> → Date/Time Received</li></ul><p>7. Click <strong>“Test Action”</strong> to send a sample email entry to Google Sheets.</p><p>8. Check your Google Sheet to confirm if the data is logged correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*HgZCM1Vk0BDF0my6ohg5BA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*7e_FCiDsFahNg1K0tLw5iA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lsskcdkJklEsyQccwLHC0Q.png" /></figure><h3>Step 4: Activate Your Zap 🚀</h3><p>Once everything is working correctly:</p><ol><li>Click <strong>“Publish Zap”</strong> to activate automation.</li><li>Your Zap is now live! Every new email will be automatically logged into the Google Sheet.</li></ol><p><strong>Trigger</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ERMnTELXpo0JKscczAZbXg.png" /></figure><p><strong>Action Result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_xZVzj6urDs3GkTi8fJkPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Ff87iQCOC1bMUIBI9qK1zg.jpeg" /></figure><h3>Bonus: Enhance Your Zap 🚀</h3><ul><li>📧 <strong>Filter Emails:</strong> Use filters to log only important emails (e.g., from specific senders or with attachments).</li><li>🔄 <strong>Multi-Step Zaps:</strong> Add another step to send Slack notifications whenever a new email is logged.</li><li>✨ <strong>Format Data:</strong> Use Zapier’s built-in formatting tools to clean up the subject line or extract key details</li></ul><h3>Final Thoughts 💡</h3><p>✅ This simple Zapier automation can save you hours of manual work and help you keep track of important emails in an organized way. Try it out and optimize your workflow today!</p><p>🤖 Do you have any other automation ideas? Let me know in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b53d973c0e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aws Lambda Function]]></title>
            <link>https://medium.com/@pbinay076/aws-lambda-function-25e37ac0c988?source=rss-ce238fe93f9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/25e37ac0c988</guid>
            <dc:creator><![CDATA[Binay kumar pradhan ]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 20:19:52 GMT</pubDate>
            <atom:updated>2022-09-26T20:19:52.601Z</atom:updated>
            <content:encoded><![CDATA[<p>It is a serverless compute service for running code without having to provision or manage servers. You pay only for the compute time you consume. Billing is very less for this service.</p><p>In this tutorial I am going to use s3 bucket as trigger and update data in DynamoDB.</p><h3>Setup Required</h3><ol><li>IAM Roles</li><li>S3 Bucket</li><li>DynamoDB</li><li>Lambda</li></ol><h3>IAM Roles</h3><p>Create a new role with below configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sq-Pop6IHrQGr5-sJheFNQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xIoZSfHgptAV5eaYi1hkJw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQ-s4qsM2j4kVdew8rUK8A.jpeg" /></figure><h3>S3 Bucket</h3><p>Create a new S3 bucket with this configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9Hk-A4RI6QDIccMml8pgQ.png" /></figure><h3>DynamoDB</h3><p>create DynamoDB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0eByU-G3V90H4KDED_aPw.jpeg" /></figure><h3>Lambda</h3><p>Create lambda function with your prefer language and version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_VS59UKqZwh07aMQ56ICQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJIVr_eWPs039vvKtFgwxQ.jpeg" /></figure><p>After create lambda function go to function dashboard click on add trigger.<br>choose s3 and then choose your bucket which you have created.<br><strong>mynewcdbuckettt</strong> for me and click add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BqH73cfSwJ0HLOvhGJsNiw.jpeg" /></figure><p>Finally we are going to finish setup</p><pre>import boto3<br>from uuid import uuid4<br>def lambda_handler(event, context):<br>    s3 = boto3.client(&quot;s3&quot;)<br>    dynamodb = boto3.resource(&#39;dynamodb&#39;)<br>    for record in event[&#39;Records&#39;]:<br>        bucket_name = record[&#39;s3&#39;][&#39;bucket&#39;][&#39;name&#39;]<br>        object_key = record[&#39;s3&#39;][&#39;object&#39;][&#39;key&#39;]<br>        size = record[&#39;s3&#39;][&#39;object&#39;].get(&#39;size&#39;, -1)<br>        event_name = record [&#39;eventName&#39;]<br>        event_time = record[&#39;eventTime&#39;]<br>        dynamoTable = dynamodb.Table(&#39;mynewtable&#39;)<br>        dynamoTable.put_item(<br>            Item={&#39;unique&#39;: str(uuid4()), &#39;Bucket&#39;: bucket_name, &#39;Object&#39;: object_key,&#39;Size&#39;: size, &#39;Event&#39;: event_name, &#39;EventTime&#39;: event_time})</pre><p>Replace default python code to with this. change dynamodb table name and click deploy. I am using python you can choose other language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xgFtoBIQqz2VmBGQVF128w.jpeg" /></figure><p>Finally setup completed add file in S3 bucket and check DynomaDB items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jisakibYmD6N7bCan9myPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*yMHVdyp4Yg4f2FqjzaoVvQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25e37ac0c988" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django Channels]]></title>
            <link>https://medium.com/@pbinay076/django-channels-6a2012591516?source=rss-ce238fe93f9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a2012591516</guid>
            <dc:creator><![CDATA[Binay kumar pradhan ]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 21:22:19 GMT</pubDate>
            <atom:updated>2022-08-08T21:22:19.239Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Channels!</p><h3>Installation</h3><p>python -m pip install -U channels</p><p>Once that’s done, you should add channels to your INSTALLED_APPS setting:</p><pre>INSTALLED_APPS = (</pre><pre>    &#39;channels&#39;,<br>    ...<br>    &#39;django.contrib.admin&#39;,<br>    &#39;django.contrib.auth&#39;,<br>    &#39;django.contrib.contenttypes&#39;,<br>    &#39;django.contrib.sessions&#39;,<br>    &#39;django.contrib.sites&#39;,<br>)</pre><p>Then, adjust your project’s asgi.py file, e.g. myproject/asgi.py, to wrap the Django ASGI application:</p><pre>import os<br>import django<br>from channels.routing import get_default_application<br>os.environ.setdefault(&#39;DJANGO_SETTINGS_MODULE&#39;, &#39;mysite.settings&#39;)<br>django.setup()<br>application = get_default_application()</pre><p>Create routing.py file in your project folder.</p><pre>from django.urls import path<br>from . import consumers<br>from channels.auth import AuthMiddlewareStack<br>from channels.routing import ProtocolTypeRouter, URLRouter<br>websocket_urlpaterns = [<br>    path(&#39;ws/&#39;, consumers.ChatConsumer.as_asgi()),<br>]<br><br>application = ProtocolTypeRouter(<br>    {<br>        &#39;websocket&#39;:AuthMiddlewareStack(URLRouter(websocket_urlpaterns))<br>    }<br>)</pre><p>Create consumers.py file in your project folder.</p><pre>from channels.generic.websocket import AsyncWebsocketConsumer<br><br>class ChatConsumer(AsyncWebsocketConsumer):<br>    async def connect(self):<br>        room_name = &#39;newroom&#39;<br>        self.group_name=room_name<br>        await self.channel_layer.group_add(<br>            self.group_name,<br>            self.channel_name<br>        )<br>        await self.accept()<br><br>    async def disconnect(self, code):<br>        pass<br><br>    async def receive(self, text_data=None, bytes_data=None):<br>        print(&#39;receive&#39;)<br>        await self.channel_layer.group_send(<br>            self.group_name,<br>            {<br>                &quot;type&quot;:&quot;process_chat_data&quot;,<br>                &quot;value&quot;:text_data,<br>            }<br>        )<br><br>    async def process_chat_data(self,event):<br>        print(event[&quot;value&quot;])<br>        message = event[&quot;value&quot;]<br><br>        await self.send(message)</pre><p>And finally, set your ASGI_APPLICATION setting to point to that routing object as your root application:</p><pre>ASGI_APPLICATION = &quot;myproject.routing.application&quot;</pre><p><strong>Add CHANNEL_LAYERS in setting</strong></p><p>For development you can use this.</p><pre>CHANNEL_LAYERS = {<br>    &quot;default&quot;: {<br>        &quot;BACKEND&quot;: &quot;channels.layers.InMemoryChannelLayer&quot;<br>    }<br>}</pre><p>For production Redis server is require</p><p>Install Redis on your system and run redis server</p><p><a href="https://redis.io/docs/getting-started/">Get started with Redis</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRLpXgXpdwALfWkHP6YcJA.png" /></figure><p>Then install channels-redis on your project.</p><p>pip install channels-redis</p><pre>redis_host = &quot;localhost&quot;<br>CHANNEL_LAYERS = {<br>      &quot;default&quot;: {<br>      &quot;CONFIG&quot;: {<br>         &quot;hosts&quot;: [(redis_host, 6379)],<br>    },<br>        &quot;BACKEND&quot;: &quot;channels_redis.core.RedisChannelLayer&quot;,<br>  },<br>}</pre><p><strong>Setup completed Now have to test.</strong></p><p>one more module have to install</p><p>pip install websockets</p><p>python -m websockets ws://127.0.0.1:8000/ws/</p><p>Now channel is connected , enter text and see the magic .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*mVFqEsbK3uEaWeJHLOJ6Kg.png" /></figure><p>Require Module With Version</p><pre>python == 3.10.2<br>channels==3.0.5<br>channels-redis==3.4.1<br>Django==4.1<br>websockets==10.3</pre><p>Thank You And Keep Learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a2012591516" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django Signals]]></title>
            <link>https://medium.com/@pbinay076/django-signals-dbe48ff6e8bf?source=rss-ce238fe93f9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe48ff6e8bf</guid>
            <dc:creator><![CDATA[Binay kumar pradhan ]]></dc:creator>
            <pubDate>Sun, 07 Aug 2022 21:12:37 GMT</pubDate>
            <atom:updated>2022-08-07T21:12:37.706Z</atom:updated>
            <content:encoded><![CDATA[<p>Signals are used to perform any action or modification of a model instance. The signals are utilities that help us to connect events with actions. We can develop a function that will run when a signal calls it. We can fire a function automatically if any action on model.</p><p>Very easy process to setup</p><p>my models.py file</p><pre>from django.db import models<br><br>class Product(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    name = models.CharField(max_length=55)</pre><p>add this in you app.py file</p><pre>.....<br>def ready(self):<br>    from . import signals</pre><p>Create signals.py file in your app folder</p><pre>from django.db.models.signals import post_save, pre_delete<br>from django.dispatch import receiver<br>from .models import Product<br><br>@receiver(post_save, sender=Product)<br>def create_product(sender, instance, created, **kwargs):<br>   print(instance.name)<br>   if created:<br>      print(&#39;new row created&#39;)<br>   #  write code after create<br>   else:<br>      print(&#39;row updated&#39;)<br>   #  write code after save<br><br>@receiver(pre_delete, sender=Product)<br>def create_product(sender, instance, **kwargs):<br>   print(instance.name)<br>   print(&#39;row deleted&#39;)<br>   # write code after delete</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe48ff6e8bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django Model Relationship]]></title>
            <link>https://medium.com/@pbinay076/django-model-relationship-78a04fb70817?source=rss-ce238fe93f9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/78a04fb70817</guid>
            <dc:creator><![CDATA[Binay kumar pradhan ]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 12:13:20 GMT</pubDate>
            <atom:updated>2022-08-04T12:13:20.652Z</atom:updated>
            <content:encoded><![CDATA[<p>Connect one model to other model by 3 method as per requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CssXAVnPYoDtdHeU0Nt70w.jpeg" /></figure><ul><li><a href="https://docs.djangoproject.com/en/4.0/topics/db/examples/one_to_one/">One-to-one relationships</a></li><li><a href="https://docs.djangoproject.com/en/4.0/topics/db/examples/many_to_one/">Many-to-one relationships</a></li><li><a href="https://docs.djangoproject.com/en/4.0/topics/db/examples/many_to_many/">Many-to-many relationships</a></li></ul><h3>One-to-one relationships</h3><p>A one-to-one relationship refers to a relationship between tables in a database when<strong> </strong>a <strong>record in one table is associated with exactly one record in another table</strong>.</p><pre>from django.db import models<br><br>class User(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    email = models.CharField(max_length=55)<br>    first_name = models.CharField(max_length=55)<br>    last_name = models.CharField(max_length=55)<br><br>class Student(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    user = models.OneToOneField(User, on_delete=models.CASCADE)<br>    dob = models.DateField()<br>    blood_group = models.CharField(max_length=3)</pre><h3>Many-to-one relationships</h3><p>To define a many-to-one relationship, use <a href="https://docs.djangoproject.com/en/4.0/ref/models/fields/#django.db.models.ForeignKey"><strong>ForeignKey</strong></a></p><p>A many-to-one relationship refers to a relationship between tables in a database when <strong>one recode of a table linked with many recode of other table</strong>.</p><pre>class Branch(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    name = models.CharField(max_length=100, db_index=True)<br>    <br>class Student(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    user = models.OneToOneField(User, on_delete=models.CASCADE)<br>    dob = models.DateField()<br>    blood_group = models.CharField(max_length=3)<br>    branch = models.ForeignKey(Branch,on_delete=models.CASCADE)</pre><h3>Many-to-many relationships</h3><p>A many-to-many relationship refers to a relationship between tables in a database when<strong> a parent row in one table contains several child rows in the other table.</strong></p><pre>from django.db import models</pre><pre>class Branch(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    name = models.CharField(max_length=100, db_index=True)<br>    <br>class Collage(models.Model):<br>    id = models.AutoField(primary_key=True)<br>    name = models.CharField(max_length=100,db_index=True)<br>    branches = models.ManyToManyField(Branch)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78a04fb70817" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>