Using Gmail's API To Search & Display Emails Using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 84

  • @lovecoco9950
    @lovecoco9950 3 ปีที่แล้ว +1

    After what seems ages of digging, this video helped me to finally work things out. Thank you!

  • @quentinfitzgerald3305
    @quentinfitzgerald3305 3 ปีที่แล้ว

    Excellent - I could never have worked that out and have been searching youtube for weeks- this is the only video I could find that makes sense.

  • @championssoftware4106
    @championssoftware4106 3 ปีที่แล้ว +2

    Thanks for your helpful video, good to see that I am not the only person who makes errors. Many Thanks

  • @Jennyfuz69
    @Jennyfuz69 2 ปีที่แล้ว +1

    You literally SAVED me with this video!! you are 100 percent right, the google API documentation is NOT very friendly. Thank you so much for making this content, I look forward to seeing more of your videos

  • @gautamgoel2024
    @gautamgoel2024 ปีที่แล้ว +1

    Thank you sir, I would play a major role, in my future mega project.

  • @zjhabib
    @zjhabib 3 ปีที่แล้ว +2

    Dude this is the exact demo video i needed! Thank you so much!! (i'm actually starting a company out of my garage and this helps out a lot with getting the starter code needed for my data science. Also taught me a lot of pointers I would have had to figure out on my own.

  • @ankitpatel1769
    @ankitpatel1769 3 ปีที่แล้ว

    Bro,
    your code and way of explanation is super helpful. stuck with this since long.

  • @saishubhamray9729
    @saishubhamray9729 3 ปีที่แล้ว

    Thanks Man! It helped me a Lot. After ages of digging. I am very much grateful to you

  • @MrRahul15937
    @MrRahul15937 3 ปีที่แล้ว

    Thank you very much for showing errors too.
    It gives me better insight about the api.
    The best video on Gmail api and the quite comprehensive.
    👍

  • @tomchambers9787
    @tomchambers9787 3 ปีที่แล้ว +1

    Norman great presentation... and thank u so much for the code.... Several others have done a similar tutorial but NOT ONE has provided the code.. Super thank you.

  • @mukil_saravanan
    @mukil_saravanan 4 ปีที่แล้ว +1

    Thanks for teaching us.
    It really helps 😊

  • @nana-zh3eh
    @nana-zh3eh 3 ปีที่แล้ว +1

    is it possible to set the messages' label from unread to read if the program has gone through it? awesome tutorial btw!

    • @normanbenbrahim3742
      @normanbenbrahim3742  3 ปีที่แล้ว

      I think so, you can loop through all email labels so this functionality should be possible. Just make sure to change the access level (the API URL will be diferent)

  • @elibennun2103
    @elibennun2103 3 ปีที่แล้ว

    You really helped me out thank you

  • @benjamins8582
    @benjamins8582 5 หลายเดือนก่อน

    bro you are freaking brain!!

  • @kabileshg6732
    @kabileshg6732 3 ปีที่แล้ว

    thanks a lot man! you saved me a lot of time

  • @ravirajansivakumar1713
    @ravirajansivakumar1713 2 ปีที่แล้ว

    Hey man i am also doing a similar project using the gmail api but i am only able to get last 100 mails what should i do?

  • @srijayadhikari
    @srijayadhikari 2 ปีที่แล้ว

    Thanks a lot man

  • @hassananwer9222
    @hassananwer9222 3 ปีที่แล้ว

    Amazing Video, i am using Domain-wide delegation mechanism to access my user's email boxes , but if we want to access other accounts, i need to add my client id to their domain wide delegation just like i did for my own domain ?

    • @normanbenbrahim3742
      @normanbenbrahim3742  3 ปีที่แล้ว

      Are you trying to access multiple accounts in the same session? I’m not sure if that’s possible, as each session has its own client id

  • @michaeltuccillo2937
    @michaeltuccillo2937 4 ปีที่แล้ว

    Very helpful. Is there a way to add the date of the Gmail to the search criteria?

  • @ticketingSystem-zb6qi
    @ticketingSystem-zb6qi ปีที่แล้ว

    you are the best

  • @Ayahalom123
    @Ayahalom123 4 ปีที่แล้ว

    Very nice video!

  • @harpritkaur-1392
    @harpritkaur-1392 3 ปีที่แล้ว

    Hey Norman, Great video! I was stuck at trying to reply to a specific mail using the API. Have you figured that out by any chance?

  • @Nitsujcm2600
    @Nitsujcm2600 3 ปีที่แล้ว

    Super helpful; Google should hire you to update the documentation.

  • @marjorieroswell
    @marjorieroswell 9 หลายเดือนก่อน

    I know this is old. Unfortunately, I got
    Access blocked: This app’s request is invalid
    You can’t sign in because this app sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
    If you are a developer of this app, see error details.
    Error 400: redirect_uri_mismatch
    I've gone into the console and added the redirect uri, but when I retry it wants a new uri, and I get the same Access blocked error. Is there current demo code available? Or any guidance on how to override this error?

    • @marjorieroswell
      @marjorieroswell 9 หลายเดือนก่อน

      somehow the second (okay, fourth) time's the charm.

    • @Aloaloaloaloalo12580
      @Aloaloaloaloalo12580 8 หลายเดือนก่อน

      ​@@marjorieroswelli am having same issue in django did you solve it

  • @decodingmachines8416
    @decodingmachines8416 4 ปีที่แล้ว

    Hi Norman, thanks for your time in putting this video ,It was really great .I can able to take the body of the mail and I also need the time when it was sent(for eg :at what time and day the mail was sent) ,can you help me in this? Thank You

  • @kaelabbott
    @kaelabbott 4 ปีที่แล้ว +1

    Hey, really helpful video, thank you a lot!
    Have you tried to use it with django? I was trying to use it with the django-allauth library. I was able to Grant permission to the Gmail with the scope but i couldnt Create the token file with the credentials to connect to the service and use the Gmail api.

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว

      Kael Abbott thanks dude! Yeah django is cool, started learning it but it’s a lot you know. So you feel like django makes it easier to use gmails api?

    • @Aloaloaloaloalo12580
      @Aloaloaloaloalo12580 8 หลายเดือนก่อน

      I am doing a project on django which need it to acces mail,using gmail api send read and search but i was getting an eroor saying acces denied do you know why or can you share your code on how to get gmail acces on django please its for my my college project

  • @elementtestdianhua1292
    @elementtestdianhua1292 4 ปีที่แล้ว

    Any resources on how to learn google api with python? I feel like everything I've found is way too advanced

  • @FRIENDSofCAP
    @FRIENDSofCAP 4 ปีที่แล้ว

    Hi Norman, so far, you tutorials have been very helpful. I do have a question on one thing I would like to know how to do in my Python program. That is... connect / login to the gmail account and just sit there until a new message event occurs. I don't want to do checks every 5 seconds but I need to know immediately if a new mail message arrives in the inbox. This is because, if it is from our FD dispatcher, I want to take action, by downloading the payload, parsing the payload and then storing the parsed elements in a DB & coma delimeted file . I'll then send myself a notification via text to know when a new message has come in and it has been processed. Any thoughts on how to monitor the inbox for new messages??? Thanks. TIm

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว

      Sorry for the late reply! I would look into the watchdog library instead. You can have an application "watch" a folder and it'll be more instantaneous then scheduling it with cron

  • @Benetheburrito
    @Benetheburrito 5 ปีที่แล้ว +2

    good video, really appreciate the help as I have been struggling with this for a while
    I have a few suggestions though
    1. Please upload the code somewhere so we can modify it
    2. The video is a little bit unorganized, but it is still enjoyable to watch. Consider cleaning up your thoughts a little and the video will improve drastically
    Again, thanks so much for the tutorial, and good luck to your youtube career

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว

      beanburrito thanks so much for the feedback (and sorry for the late response). I’ll do better in future videos🙂 as for the code, I got a new laptop so I lost the code for this sorry!!😅 I’ll make sure to always add the two going forward. Thank you again!!

  • @fatrushaikh5990
    @fatrushaikh5990 7 หลายเดือนก่อน

    one that most liked about this video is your mistakes, because it was like i am doing on my system. with your mistakes i am learning a lot. otherwise correct code would not gave me practical way of doing it. Thanks record all those mistakes as well
    thank you sir........................

  • @TechySatvik
    @TechySatvik 4 หลายเดือนก่อน

    what's that noise at 0:00

  • @godsonUnderscoreY
    @godsonUnderscoreY 4 ปีที่แล้ว

    Your error is due to the except clause. Great video

  • @FRIENDSofCAP
    @FRIENDSofCAP 4 ปีที่แล้ว

    Hello Norman, It is now Jan 28, 2020 (about a little over 3 months0 sinc you posted this video. I got it to the point where you are copying the quickstart.py code, but when I go to the site, that is not there anymore. Any ideas how I can get the .py file?

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว +1

      Tim Curtin so if you go to developers.google.com/gmail/api/quickstart/python you’ll see in Step 3 it’s there. Just copy the contents of what’s inside and save it to a file called quickstart.py and you should be good to go!

  • @fatrushaikh5990
    @fatrushaikh5990 7 หลายเดือนก่อน

    i think error is at the except code
    where you have like % error:
    that shouldn't be

  • @zaintayab1898
    @zaintayab1898 4 ปีที่แล้ว

    absolutely fantastic video. thanks a butt-tonne

  • @viktork7246
    @viktork7246 4 ปีที่แล้ว +1

    I changed that lines like this:
    except errors.HttpError as error:
    print('An error occurred: %s' % error)
    After that it started

  • @bombastic_side_eye_007
    @bombastic_side_eye_007 7 หลายเดือนก่อน

    That API documentation is even worse now, with even fewer example codes

  • @TheSyafiqahs
    @TheSyafiqahs 4 ปีที่แล้ว

    How do I get the recipient's email using the thread?

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว

      It should be accessible as an entry in the dictionary response

  • @luisbarbosa5597
    @luisbarbosa5597 ปีที่แล้ว

    nice

  • @MrRahul15937
    @MrRahul15937 3 ปีที่แล้ว

    You have not teach about gmail api, but how to write code in a professional way..

  • @kushgrandhi3708
    @kushgrandhi3708 4 ปีที่แล้ว

    i keep getting the following error after 22:16
    'Got an unexpected keyword argument "userID" '.

    • @tomifg
      @tomifg 4 ปีที่แล้ว +1

      I guess it's too late by now but from what you wrote here, it would seem like you passed the argument "userID" with a uppercase D. You need to write "userId". Just change the uppercase D to lowercase.. that's most likely it

    • @kushgrandhi3708
      @kushgrandhi3708 4 ปีที่แล้ว +1

      @@tomifg thank you! That seems to work!

  • @anuragsingla9359
    @anuragsingla9359 4 ปีที่แล้ว

    Really cool stuff
    Can you post the link to the code. It will be really helpful

  • @inDevineLove
    @inDevineLove 4 ปีที่แล้ว

    not worked for me

  • @TheMangz1611
    @TheMangz1611 4 ปีที่แล้ว

    great!

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว +1

      Umang Mahant glad you found it useful🙂

    • @TheMangz1611
      @TheMangz1611 4 ปีที่แล้ว +1

      @@normanbenbrahim3742 it's the best video related to this topic on internet.
      Actually when I saw it first I dint like it as i was just looking for the code that would simply do my job... But your video made me actually learn about it explore it deeply..
      You are awesome!

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว

      Umang Mahant thank you so much! Let me know if you have any video requests🙂

  • @BrandonJacobson
    @BrandonJacobson 4 ปีที่แล้ว

    I also have a Python Gmail API series on my channel. My first video has similar views and I only a little more than 1K subscribers. You have 20 subscribers and that's super impressive. How are you promoting your videos?

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว +1

      Brandon Jacobson no promotions my dude, just do keyword research and place it correctly in your video titles

    • @BrandonJacobson
      @BrandonJacobson 4 ปีที่แล้ว

      @@normanbenbrahim3742 dang, that's what's up then. I need to automate some SEO to help me with my channel.

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว +1

      Brandon Jacobson 😂automate everything! You got one new sub

    • @BrandonJacobson
      @BrandonJacobson 4 ปีที่แล้ว

      @@normanbenbrahim3742 as do you.

  • @simpleman7171
    @simpleman7171 4 ปีที่แล้ว

    Calendar API To Search with JAVA Script Please

  • @davidp1282
    @davidp1282 4 ปีที่แล้ว

    Hi Norman, it looks like a very interesting and helpful video, appreciate the time and effort you put into to provide some good content, though like you said to a degree it's not really beginner friendly working with this sort of stuff and Gmail.
    Quick question I have from a novices point of view; when you paste in the except block th-cam.com/video/vgk7Yio-GQw/w-d-xo.htmlm25s with the variable 'error' in and pasted on line 17, 18 why is there no error flagged since 'error' is not previously defined, is this something to do with Sublime Text settings or ? I'm using PyCharm on Mac and get a significant error.
    I'll try and continue following as much as I can to see if I can get it to work as I really need something like this and this is the most in depth and decently narrated video. Believe it or not I especially like when you make mistakes and are talking out loud to going through the though process no matter how seemingly chaotic. You (meaning me) learn alot when you are mentally walking through a problem exploring options.
    Look forward to some feedback soon I hope and fingers crossed it will work for me.
    PS: I also copy pasted Cody Quist code from below into a Py file and got a bunch of errors, not saying it was wrong, but certainly don't undersand the cause of that...??

    • @normanbenbrahim3742
      @normanbenbrahim3742  4 ปีที่แล้ว +1

      Thanks for the love! The error is from Gmail's error classes, you can check it out here: github.com/googleapis/google-api-python-client/blob/master/googleapiclient/errors.py
      As for the PS, which below code are you talking about?

    • @davidp1282
      @davidp1282 4 ปีที่แล้ว

      @@normanbenbrahim3742 not a problem for sharing the love :D but being the newb I am (for Python that is) I just grabbed the errors.py and dropped it into the same directory and nothing changed.
      So I'm going to go back to the start or at least check my code matches up until the point where the error occurrs.
      Also looking at the github repo for googleapis is quite thorough, maybe I have to get in there and read the docs etc and work through it a bit more.... :) because this is something I really need to get working (searching for a new job etc you know gives you alot of motivation) so thanks for the reply, appreciate that and keep it up, the video is really good - I just figure there are more intricacies in Python, Google API coding than I can get straight in my head just yet ;)

  • @mixalismcgamer3188
    @mixalismcgamer3188 4 ปีที่แล้ว

    2 subs ONLY?now 3 :)

  • @Dipankar00789
    @Dipankar00789 ปีที่แล้ว

    Bhai

  • @nochnoy_kot
    @nochnoy_kot 4 ปีที่แล้ว

    Useful but hard too_long non_logic horrible video