Python Slack Bot Tutorial #1 - Setup & Sending Messages

Sdílet
Vložit
  • čas přidán 18. 10. 2020
  • This python slack bot tutorial covers how to setup a slack bot and send messages with a slack bot using python. We will learn how to setup a slack bot using the slack api and then create a python script that will allow your slack bot to send messages.
    📖 Full Series Code: github.com/techwithtim/Slack-...
    📕 Slack API Website: api.slack.com/
    📗 Slack Website: slack.com/intl/en-ca/
    ▪️ How to Fix Pip ▪️
    📙 Windows: • How to Install Pygame ...
    📘 Mac: • How to Install Pygame ...
    📚 Playlist: • Python Slack Bot
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    🔊 Subscribe to my second channel for weekly podcasts! / @timeoutwithtim
    💰 Courses & Merch 💰
    💻 The Fundamentals of Programming w/ Python: tech-with-tim.teachable.com/p...
    👕 Merchandise: teespring.com/stores/tech-wit...
    🔗 Social Medias 🔗
    📸 Instagram: / tech_with_tim
    📱 Twitter: / techwithtimm
    ⭐ Discord: / discord
    📝 LinkedIn: / tim-ruscica-82631b179
    🌎 Website: techwithtim.net
    📂 GitHub: github.com/techwithtim
    🔊 Podcast: anchor.fm/tech-with-tim
    🎬 My CZcams Gear 🎬
    🎥 Main Camera (EOS Canon 90D): amzn.to/3cY23y9
    🎥 Secondary Camera (Panasonic Lumix G7): amzn.to/3fl2iEV
    📹 Main Lens (EFS 24mm f/2.8): amzn.to/2Yuol5r
    🕹 Tripod: amzn.to/3hpSprv
    🎤 Main Microphone (Rode VideoMic Pro): amzn.to/3d0KKMG
    🎤 Secondary Microphone (Synco Wireless Lapel System): amzn.to/3e07Swl
    🎤 Third Microphone (Blue Yeti USB Mic): amzn.to/3hoD625
    ☀️ Lights: amzn.to/2ApeiXr
    ⌨ Keyboard (Daskeyboard 4Q): amzn.to/2YpN5vm
    🖱 Mouse (Steelseries Rival 300): amzn.to/3cVTqnD
    📸 Webcam (Logitech 1080p Pro): amzn.to/2B2IXcQ
    📢 Speaker (Beats Pill): amzn.to/2XYc5ef
    🎧 Headphones (Bose Quiet Comfort 35): amzn.to/2MWbl3e
    🌞 Lamp (BenQ E-reading Lamp): amzn.to/3e0UCr8
    🌞 Secondary Lamp (BenQ Screenbar Plus): amzn.to/30Dtafi
    💻 Main Monitor (LG 4K): amzn.to/37ybtiH
    💻 Secondary Monitor (Thinkvision 1080p): amzn.to/2AyHR8H
    🎤 XLR Microphone (Rode NT1): Not available
    🎙 Mic Boom Arm (Rode PSA 1): amzn.to/30EZw9m
    🎚 Audio Interface (Behringer 4 Channel): amzn.to/3fqm4z3
    💾 Recorder (Zoom H6): amzn.to/2UIihVJ
    ◾ 💸 Donations 💸 ◾
    💵 One-Time Donations: www.paypal.com/donate/?token=...
    💰 Patreon: / techwithtim
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    ⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
    ⭐ Tags ⭐
    - Tech With Tim
    - Slack Bot
    - Slack Bot Tutorial
    - Python Slack Bot Tutorial
    - Slack Bot Tutorial Python
    - Slack Bot Setup Python
    - Python Slack Bot
    - Slack Bot Python
    ⭐ Hashtags ⭐
    #Python #Slack

Komentáře • 255

  • @TechWithTim
    @TechWithTim  Před 3 lety +36

    What do you want your slack bot to do?!

    • @soisauce364
      @soisauce364 Před 3 lety +3

      yes

    • @RohanKumar-zd3pc
      @RohanKumar-zd3pc Před 3 lety +1

      Prank my friends!

    • @ajdevz1067
      @ajdevz1067 Před 3 lety

      Yes

    • @Deadshot-sq5pc
      @Deadshot-sq5pc Před 3 lety +3

      Can you make a snake game in python without oop

    • @QuangNguyen-hh6rw
      @QuangNguyen-hh6rw Před 3 lety +5

      Ask slack bot to send the snippet code for a specific problem. For example, how to stack vertically/horizontally matrices in numpy, or how to convert RGB image to BGR in OpenCV, etc.

  • @patriks.8078
    @patriks.8078 Před 3 lety +10

    FINALLY someone explains the steps in detail! Thanks for your help!

  • @qureebhameed86
    @qureebhameed86 Před 11 měsíci

    This is beautiful. Simple and straightforward! Good job, Tim!

  • @kaushikiyer9470
    @kaushikiyer9470 Před 3 lety +2

    Loved it man..... I was just wondering about my next project and here you post it....👍👍👍

  • @alina_yurenko
    @alina_yurenko Před 2 lety +1

    This tutorial is extremely helpful. Thank you, Tim!

  • @samcodes2912
    @samcodes2912 Před 3 lety

    great vid Tim. love how create you are with your projects

  • @skanderredjel5044
    @skanderredjel5044 Před 3 lety

    Its incredible how you post vidéos about things that i always want to do, Big thanks !!

  • @nawid1687
    @nawid1687 Před 3 lety +1

    Thank you so so much for these amazing videos. Seriously you are awesome I've been a fan for a long time but I just joined the discord yesterday and its fantastic!

  • @blackhalo117
    @blackhalo117 Před 2 měsíci

    Great tutorial, quick to the point and with troubleshooting info. You love to see it.

  • @baryalen9669
    @baryalen9669 Před 3 lety +3

    Realy appreciate u posting such vedio bro keep going more power to u for people who cant afford to pay nd study python this is a massive massive help thnku

  • @galaxy_apollo13
    @galaxy_apollo13 Před 3 lety +10

    Thanks for making this great educational videos. They helped me a lot to learn python programming. Keep up the good work

  • @vera71443
    @vera71443 Před 3 lety

    great tutorial, just what I've been looking for, thanks

  • @abdullahe.8494
    @abdullahe.8494 Před 3 lety

    Hey Tim, Love ur tutorials, plz continue doing the software design series love this the most

  • @andypratt4094
    @andypratt4094 Před 2 lety

    This is a great start, thank you!

  • @viniciusribeiro3134
    @viniciusribeiro3134 Před rokem

    Thank you so much for the video man... This content helped a company that I work for

  • @mbmeweg293
    @mbmeweg293 Před 3 lety

    This is like a brand, Thanks Tim)

  • @romanqc
    @romanqc Před rokem

    Dope, thank you for this tutorial, it helped a lot!

  • @tospipdevelopment9793
    @tospipdevelopment9793 Před 3 lety

    I love you, you helped me so much with your videos!

  • @omarizhar3069
    @omarizhar3069 Před 3 lety

    Hey Tim, this is exactly what i needed for my work. TYSM man you are the best. Can the next part of this series explain how to respond to certain messages, e.g. if a colleague asks for a code, slack bot can take his message as input and then run a script and reply with the response to that. As always, you are amazing sensei.

  • @ChaseKeller-yi7gw
    @ChaseKeller-yi7gw Před rokem

    Thank you so much for this! Great video

  • @shahul111
    @shahul111 Před 3 lety

    Thanks Tim. Its great one to start with

  • @satvikreddy8662
    @satvikreddy8662 Před 3 lety +6

    Great video. Learning how to use api's is great for automation. Btw, you left your API key open at 10:19, so just watch out for that.

  • @LarpGothic
    @LarpGothic Před 2 lety

    Thank you. It was really helpfully.

  • @yanlyu1952
    @yanlyu1952 Před 3 lety

    it does help! Thanks, mate!

  • @arnelalpas1400
    @arnelalpas1400 Před rokem

    Finally my 1st running python script using slack API

  • @Sr.FawkesCH
    @Sr.FawkesCH Před 3 lety

    what a great video man ! hellos from México "compa" !

  • @usmanmir5663
    @usmanmir5663 Před 3 lety +26

    My boi used to say hes not artistic, (has one the most aesthetic thumbnails)

    • @eahere
      @eahere Před 3 lety +1

      He got vaccinated

  • @ricardopereira5397
    @ricardopereira5397 Před rokem

    Great content! Thank you!

  • @prashantsaxena133
    @prashantsaxena133 Před 3 lety

    Bruhh.... I was thinking about same in afternoon, today........... Thank you brother..... You play an important role in my life.... My weekend buddy......

  • @vedant6460
    @vedant6460 Před 6 měsíci

    thanks a lot man!

  • @ayushikannojia4082
    @ayushikannojia4082 Před 3 lety

    I really enjoyed ur video it's very knowledgeble

  • @bluesquare23
    @bluesquare23 Před 3 lety

    God bless Tim. I honestly don't think the world knows how much we own him.

  • @thelazycomputer99
    @thelazycomputer99 Před 10 měsíci

    Thank you so much

  • @IzzyBear27
    @IzzyBear27 Před 3 lety

    Thank you sooo much!!!

  • @rudro314
    @rudro314 Před 3 lety

    Awesome content

  • @UroojFatimaAmin
    @UroojFatimaAmin Před rokem

    Sooo helpful!

  • @alexmanuelrodriguesdemedei8691

    Você é o cara!!!
    You are the best !!

  • @propro8040
    @propro8040 Před rokem

    Thank you ♥

  • @plusk343
    @plusk343 Před 3 lety +1

    That is so damn cool!!!

  • @pythonperls
    @pythonperls Před rokem

    Hey Tim, This is really helpful and thank you for making such amazing and informative video. There is one more thing called "bolt framework for slack" can you also try to cover this in your next slack playlist please. It would be helpful. Thanks

  • @wakegary
    @wakegary Před 2 lety

    appreciate ya - subbed

  • @rangabharath4253
    @rangabharath4253 Před 3 lety

    awesome bro :)

  • @programming_hut
    @programming_hut Před 3 lety +1

    wow you are too good ❤️

  • @adeyemiakitoye
    @adeyemiakitoye Před 3 lety

    this was published on my birthday😁

  • @PedroTechnologies
    @PedroTechnologies Před 3 lety +1

    I was literally searching this right now and saw tim posted something!

  • @severlight
    @severlight Před 3 lety

    saw you on google interview video)

  • @davidb4020
    @davidb4020 Před 3 lety

    Just when I wanted to do that project.

  • @Tom-kg6qe
    @Tom-kg6qe Před 3 lety +2

    PIP - Python Installer Package, or Package Installer for Python! (Which makes sense for pip3 being Package Installer for Python 3.)
    Ideas for Slackbot:
    Can you get it to play Blackjack with you or something? Or Dice/light RPG mechanics like what they do with some of the discord bots?
    Tim: I'ma blur my slack token so you can't read it.
    Also Tim: 10:18

  • @samcode8311
    @samcode8311 Před 3 lety +5

    Hello, bro. Your fan from Algeria (North Of Africa).

  • @soisauce364
    @soisauce364 Před 3 lety

    nice bro

  • @patrikhenriksson7731
    @patrikhenriksson7731 Před 3 lety

    do more pythone
    pls
    this is what im bean waiting for

    • @nawid1687
      @nawid1687 Před 3 lety

      He is building a slack bot in Python tho 😆

  • @parthsinghrajput1062
    @parthsinghrajput1062 Před 3 lety

    Bro You are amazing dont know what number of comment

  • @InfamousKurutta
    @InfamousKurutta Před 3 lety

    Great video, early btw

  • @michaelelleby1371
    @michaelelleby1371 Před 2 lety

    This is great stuff... I had to subscribe to your channel.. You have me on my way with this slack bot I'm creating to do an API get and then pull the results into my Slack workspace/channel. Have you done one of those? Thanx..

  • @brunodavi8197
    @brunodavi8197 Před 3 lety

    Muito Obrigado

  • @michaelelleby1371
    @michaelelleby1371 Před 2 lety

    Tim, a question. Was able to build my first bot based on your video, and I used the block kit builder with a drop down menu to format the response in getting some data, but when I select an item in that drop down list, nothing happens. Im not sure if anything is happening. Any idea why the request is not being submitted/acted upon?

  • @adityachk2002
    @adityachk2002 Před 3 lety +1

    Good

  • @jananni123456789
    @jananni123456789 Před 3 lety

    Is this a good project to go from beginner to intermediate? What topic would you say you get to learn the most, e.g. i think event handling was mentioned in the intro?

  • @danielburt3749
    @danielburt3749 Před 11 měsíci

    One thing that really tripped me up was the fact that on MacOS, port 5000 is being used by something on the system - but it doesn't tell you. I spent a long time trying to understand why I would always get a 403 when hitting my local python server.

  • @sjkheart7396
    @sjkheart7396 Před 3 lety

    See me learning Django
    Hope I can do it ❇️

  • @pathseeker5439
    @pathseeker5439 Před 3 lety

    Can you do one for c++ ? I just started programming for my second semester and I want to learn more while I can

  • @mohamedlimam1310
    @mohamedlimam1310 Před 3 lety

    Hello, nice Intro but at 10:28 you didn't blur your token be careful next time :p

  • @psevdonim3899
    @psevdonim3899 Před 3 lety

    Still w8ing for ur Django course

  • @Tommy-jn9ps
    @Tommy-jn9ps Před 3 lety

    i just wanna ask. On the machine learning tutorial you were using pycharm and you set up the tenserflow package i believe nad all the others. How can you do that in python? i remember you went to file and then settings but in vs code theres no such as settings in file. I will appriciate any sort of help.

  • @sarahpurvis8833
    @sarahpurvis8833 Před 3 lety +1

    thank you for the tutorial! I'm just struggling a little with pathlib - i keep getting this message: ModuleNotFoundError: No module named 'Pathlib'. What do I do?

  • @devk5163
    @devk5163 Před 3 lety

    Woah I was very fast

  • @krishchauhan235
    @krishchauhan235 Před 3 lety +1

    Hey Tim, can you create a bot for flock team app, I use that with my team and it would be great if you could give me a basic tutorial?

  • @dannymoon1725
    @dannymoon1725 Před 3 lety +4

    Even if I uninstall and reinstall slackclient, I get No module names 'slack' error. Any ideas?

  • @noah77
    @noah77 Před 3 lety +1

    ayyy Tim. Ello ello

  • @yiminyan8911
    @yiminyan8911 Před rokem

    the latest way to add the bot to a channel is from the rot app itself not inside channel

  • @6L6Lcephas
    @6L6Lcephas Před 3 lety

    I think you should make a clone version of Braskeys Unity

  • @vedantsingh2621
    @vedantsingh2621 Před 3 lety +4

    Could You Make More Video Like {How To Master Python} On Different Languages, recommended ones of are c/c++,java,c#,javascript. And more videos like making a CHAT bot for instagram , or may be a flexible bot that could be used for all platforms.Thanks,Fan From India

    • @user-gt2th3wz9c
      @user-gt2th3wz9c Před 3 lety +2

      He posted his resume this June, had Java, JavaScript, C# with lower proficiency than in python, so maybe he's not master lvl

    • @samcodes2912
      @samcodes2912 Před 3 lety +1

      nice suggestion

    • @vedantsingh2621
      @vedantsingh2621 Před 3 lety +2

      @@user-gt2th3wz9c yeah man you are right...

    • @vedantsingh2621
      @vedantsingh2621 Před 3 lety

      @@user-gt2th3wz9c Hey I wonder that you are online.. so let me ask you a decent question that how can I make my bot live forever like I have a bot that can fetch prices from different E-commr. sites and mails me when the price is low but I is useless bcoz I have to run it again and again though cmd..so can you suggest me a way or a link to a doc or video solving my problem..please help

    • @user-gt2th3wz9c
      @user-gt2th3wz9c Před 3 lety

      @@vedantsingh2621 maybe this will help.
      docs.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-basic-deploy?view=azure-bot-service-4.0&tabs=csharp%2Cvs

  • @matasuki
    @matasuki Před 3 lety

    My boy uses conda! Data Science fam?

  • @gabrielceolatomuller2120

    For the slack error on python, just close and open vs code

  • @programmer4047
    @programmer4047 Před 3 lety

    Which Software Do You Use To Make Thumbnails?
    And, if possible, make a thumbnail tutorial too...

  • @AMWstyles
    @AMWstyles Před 2 lety

    Major amateur question - what type of “project” in VScode are we using? I’ve never set-up VScode before

  • @Sydney_Anuyah
    @Sydney_Anuyah Před 2 lety +1

    Nice. However, I saw the token. hehehe!

  • @user-mx2pg2kd1p
    @user-mx2pg2kd1p Před 3 lety

    Thank you for making great video!!
    Is it possible to connect with Direct Message?
    I want to connect with app to the Direct Message(sending message from someone to me , not channel )"

  • @bharathvaj2760
    @bharathvaj2760 Před 3 lety +1

    Bro we need the hosting video.. you made the django website building video... We need the free hosting video broo please 🙏🙏🙏

  • @ganeshdeshmukh8020
    @ganeshdeshmukh8020 Před 3 lety

    Hey Tim, could you please help me, as slack-client is in maintenance mode and version 3 has came, as slack-sdk, but not able to listen to events to it.

  • @milkokawaiidjiev5000
    @milkokawaiidjiev5000 Před 3 lety

    Can you make the Bot accept links from specific users and save them/send them to you ?

  • @mirageleung1575
    @mirageleung1575 Před rokem

    Thanks! 9:47 🤣🤣

  • @patriks.8078
    @patriks.8078 Před 3 lety

    Is it possible to send massages to slack with data from airtable? E.g. I want to send the number of the data entries of a hole table every week into slack as an update. (It is not possible with airtable automation)

  • @suryapoojary2179
    @suryapoojary2179 Před 3 lety

    What's the difference between using bolt framework and the slack api?

  • @sravanbathini4137
    @sravanbathini4137 Před 3 lety +3

    Hello... I Am probably getting the < import slack > ERROR, even after I uninstall and install it, it is showing like this down bellow
    [Running] python -u "c:\Users\---------\Desktop\Tutorial\bot.py"
    Traceback (most recent call last):
    File "c:\Users\----------\Desktop\Tutorial\bot.py", line 1, in
    import slack
    ModuleNotFoundError: No module named 'slack'
    [Done] exited with code=1 in 0.364 seconds
    This Is What I Am Getting Trouble With
    Hope you come up with a solution for this

  • @louisavrilleaud9931
    @louisavrilleaud9931 Před 7 měsíci

    I have a slack with a lot of channels that I want to add the bot to and adding it to each individual channel 1by1 is a very tedious task manually. Do you know a way to add the bot to multiple channels with code by any chance?

  • @modoulaminceesay9211
    @modoulaminceesay9211 Před 3 lety +4

    The slack keeps telling there no module found and I installed it again.

  • @evanderfrancis694
    @evanderfrancis694 Před 3 lety +1

    Does anyone know why I would not be able to see "connect an app" in my slack channel? I can see my App in the Apps section, but i am only able to add ppl to the channel.

  • @ahmedthegreat3973
    @ahmedthegreat3973 Před 3 lety

    I Suggested You This series In discord bot series

  • @clayhendrix9565
    @clayhendrix9565 Před 6 měsíci

    Now do one for Zoom!

  • @Liviathan
    @Liviathan Před 2 lety +1

    TY for this tutorial! I'm still receiving the "No module named 'slack'" error even after uninstalling and reinstalling - anyone have any other fixes?

    • @ayushmanchoudhary6975
      @ayushmanchoudhary6975 Před 2 lety

      try changing the python interpreter the vs code is using. Hit Ctrl+Shift+P and type interpreter to choose from several interpreters that your device has. Choose the one in which you installed the packages.

  • @maximiliankrug1011
    @maximiliankrug1011 Před 2 lety

    So if i understand that correctly i dont need the environment? You just used it so you do not need to blur out your toke, right?

  • @pedrosotomayor7603
    @pedrosotomayor7603 Před 3 lety

    Is there a way to do the same but for private messages instead of a channel?

  • @RohanKumar-zd3pc
    @RohanKumar-zd3pc Před 3 lety +1

    Pip stands for Python Install Packages

  • @shridumanish3506
    @shridumanish3506 Před 3 lety +2

    10:21 you forgot to blur it here lol

  • @aayanbaig6736
    @aayanbaig6736 Před 3 lety

    Can do a discord.js tutorial can be helpful

  • @stiljohny
    @stiljohny Před 3 lety +1

    dotenv module seem to have changed a bit
    I had to use
    import slack
    import os
    from pathlib import Path
    from dotenv import load
    env_path = Path('.') / '.env'
    load(filepath=env_path)

  • @DilipKumar-zo8mr
    @DilipKumar-zo8mr Před 2 lety

    When I type hello my bot is not responding, I have used signing secret and slack token in my code. What could be the possible reason. Could you please help.

  • @gustavprinsloo4645
    @gustavprinsloo4645 Před 3 lety

    I did everything but I still get the No Module Named error ... do i need to install a specific version of something or what?

  • @mayankvaswani5400
    @mayankvaswani5400 Před 3 lety

    Can someone pls help. When I say Install to workspace slack shows slack-bot doesn’t have a bot user to install