Send An Email With Gmail Using Service Account In Python (Gmail API)

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 35

  • @productivetarik
    @productivetarik 7 месяцев назад

    Thank you for the thorough clarification. I've successfully configured domain-wide delegation, yet I'm encountering the error 'Precondition check failed.' It appears that there might be a delay in being able to impersonate users. Could this be the cause, or is there another issue at play?

  • @caliosd1836
    @caliosd1836 Год назад

    thanks for your admin console part in the video. that saves me a lot!

  • @elricho72
    @elricho72 6 месяцев назад

    Great video, Could you make an example to see how to list the users of the google admin directory, I follow all your steps, I enable the scopes but I always get an access error, even though I have access to the account as an administrator, I don't understand what permission is missing, for example this video with the created account if you run it without problems. Thank you.

    • @jiejenn
      @jiejenn  6 месяцев назад

      I will look into it.

  • @bee_dmytro
    @bee_dmytro Год назад +2

    Tell me please what should I do if I want to get emails from my own gmail? I do not have google admin. But service account does not have access to my gmail, I do not know how give it to him.

  • @Moist_yet_Crispy
    @Moist_yet_Crispy 2 года назад

    Hey I love you videos, I've noticed that gmail api has changed a bit since you did this tut, Would you be willing to do another tutorial on gmail api since things have changed. No one else has one and I've tried the other videos as well and keep getting stuck. Thanks in advance!

    • @jiejenn
      @jiejenn  2 года назад +1

      Thanks for the comment Corey. Can you tell me what have changed with Gmail API?

    • @Moist_yet_Crispy
      @Moist_yet_Crispy 2 года назад

      @@jiejenn I apologize that I can't at the moment. About 2-3 months ago there was an update to gmail api and my project broke. It was a project I was working on for a start up and I've since walked away from it as larger issues called me away. I was working on automating email order totals to be put into a spread sheet and it went belly up and I wasn't able to figure out why. Is your project still working?

    • @jiejenn
      @jiejenn  2 года назад +1

      @@Moist_yet_Crispy yup. My Gmail automations are still running fine.

    • @Moist_yet_Crispy
      @Moist_yet_Crispy 2 года назад

      @@jiejenn ! Thank you for this!

  • @danielleivy8180
    @danielleivy8180 5 месяцев назад

    I see some comments about using regular gmail. To my knowledge Google took that bit away. You can no longer "allow third party access" and need an actual workspace account to do this.

    • @jiejenn
      @jiejenn  5 месяцев назад

      I don't think that information is correct as of today.

    • @danielleivy8180
      @danielleivy8180 5 месяцев назад

      ​@@jiejenn Sorry I meant 'less secure apps".

  • @ericweiss2210
    @ericweiss2210 2 года назад

    Thank you for a very informative video. I apologize in advance for this silly question but I have only been working with python and google API's for a few months, total newbie. I recently created a script with access to google sheets API. I want to include email access within the same script. What is the easiest way to do this? Any recommendations would be greatly appreciated.

    • @jiejenn
      @jiejenn  2 года назад

      Hey Eric, can you be more specific?

    • @ericweiss2210
      @ericweiss2210 2 года назад

      @@jiejenn I want to create an application that will access the google sheets, docs , calendar, and drive API within the same python script. How would you go about creating this type of application? I used your video to create an application that performs functions across google sheets API and it worked perfectly thanks to your videos. Any help would be greatly appreciated.

    • @disguisedfox7491
      @disguisedfox7491 Год назад

      Hi there, very late but i think i might have your answer if you still need it!
      Ex:
      class DocsAPI():
      def send(params):
      # do stuff
      class SheetsAPI:
      def send(params):
      # do stuff
      class CalenderAPI::
      def send(params):
      # do stuff
      So on and so on, include these in there own seperate .py file for better code management and easier use of the APIs
      also to import these to the main file:
      import SheetsAPI
      sheet = SheetsAPI()
      ect.

  • @kiritosharma
    @kiritosharma 2 года назад

    Thanks a lot, you explained it really well !

  • @shekhar436
    @shekhar436 2 года назад +2

    The code link is not there in description text ?

  • @hugh_dancy
    @hugh_dancy Год назад

    hello mr jenn i am unable to follow the part about delegating. is there an extra step to get access to it? i do not know my admin account email and its apparently not the same as the project email?

  • @MartínSepúlveda-q7y
    @MartínSepúlveda-q7y Год назад

    Excelent!!!

  • @juniordeveloper1754
    @juniordeveloper1754 2 года назад

    Currently at the moment Google that's not support third party to send emails with other apps like Pycharm. I have tried multiple times. Can anyone help me

  • @farangisranandehgar3355
    @farangisranandehgar3355 2 года назад

    Thank you

  • @IronHelpsUsPlay
    @IronHelpsUsPlay 2 года назад +5

    Man Google's docs are absolutely terrible

  • @full_bearfull_bear4783
    @full_bearfull_bear4783 2 года назад

    What is a "workspace account" ? How do we create one? .....

    • @jiejenn
      @jiejenn  2 года назад

      A workspace is basically Google Suite. Maybe this link will provide more information workspace.google.com/?Workspace-APAC-TW-en-BKWS-EXA-Regular&DEV_m-CRE_525364223903-ADGP_Hybrid+%7C+BKWS+-+EXA+%7C+Txt+~+Workspace+-+Temporary-KWID_43700064150896639-kwd-346911454270&userloc_9040379-network_g&KW_google%20workspace&gclid=Cj0KCQjwkruVBhCHARIsACVIiOxlpqyHmbCXhr0P8O-FUGhSk_olALAMgB0uyXqtCj4Hr_9JoJ_WHMMaAonREALw_wcB&gclsrc=aw.ds

  • @serychristianrenaud
    @serychristianrenaud 2 года назад

    Thanks

  • @Najumulsaqib
    @Najumulsaqib Год назад

    Isnt this supported with normal Gmail accounts that are not on workspace?

    • @jiejenn
      @jiejenn  Год назад

      Not sure if I understand your question.

    • @bee_dmytro
      @bee_dmytro Год назад

      @@jiejenn He said that there is a problem with delegation process if you want to work with private gmail, without google admin access.

  • @productivetarik
    @productivetarik 7 месяцев назад

    Thank you for the thorough clarification. I've successfully configured domain-wide delegation, yet I'm encountering the error 'Precondition check failed.' It appears that there might be a delay in being able to impersonate users. Could this be the cause, or is there another issue at play?

    • @jiejenn
      @jiejenn  7 месяцев назад +1

      This may help stackoverflow.com/questions/77300161/getting-precondition-check-failed-when-using-gmail-api-with-a-service-account

    • @productivetarik
      @productivetarik 7 месяцев назад

      ​@@jiejennthanks for replying, the problem was that i was creating the credentials object using the way in the documentation and this seems to raise the issue, but i used the way you mentioned in the video and it worked fine