Slack API Tutorial: Post Slack Messages Using Python!

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

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

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

    Your tutorials are awesome, thank you! It's great that they're super clear and concise.

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

      Thanks a lot for the feedback! I'm glad to hear they're helpful.

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

    This is the best, clearest, easiest-to-follow Video in the Universe! Thank you.

  • @carlossaldana8301
    @carlossaldana8301 3 года назад +2

    You are amazing bro! This helped me so much at work. I didn't have any idea how to start. Thank you

  • @Shawn-cr8ep
    @Shawn-cr8ep 3 года назад

    Worked for me, thanks so much! I'm using this to send notifications to my phone (slack app), the possibilities are endless, from custom weather alerts to investment/trading notifications

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

    Works like a charm! After I cleaned up a few typos...ugghh. Thanks for the great tutorial!

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

    This video just saved me SO MUCH TIME! Thanks!

  • @crazyhorse62166
    @crazyhorse62166 3 года назад

    Excellent video to teach quick start to using slack api and alert app creation

    • @crazyhorse62166
      @crazyhorse62166 3 года назад

      I am getting "Invalid_payload" using similar code? any ideas? using python 3.9.5.

  • @rewild.rewire
    @rewild.rewire 2 года назад

    Thank you so much! Very clear and easy to follow. Got it working the first try

  • @thej1091
    @thej1091 3 года назад

    Amazing tutorial! my G!. Got me through an interview! :)

    • @tech_with_moss
      @tech_with_moss  3 года назад

      That's awesome! I'm very glad that it helped.

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

    We use Service Now and Slack at my company. Is it possible to create slack commands to pull the basic information from a Service Now ticket into a slack channel? Example: If I created /getTicket and it would then go out to the Service Now ticket and pull into the channel the ticket title, description, priority color, created date, etc etc.

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

    Thank you for the tutorial, great work.

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

    thanks man! This tutorial helped so much !!

  • @vipinmon
    @vipinmon 3 года назад +1

    How do you send messages to an individual slack instead of a slack channel using the bash command line?

  • @alina_yurenko
    @alina_yurenko 3 года назад

    This is a great tutorial, thank you for sharing it:)

  • @michaelelleby1371
    @michaelelleby1371 3 года назад

    Very good video.. I was looking at this today, as I am looking at firing the script from within an AWS lambda to get to an external slack channel..

  • @ganeshdeshmukh8020
    @ganeshdeshmukh8020 3 года назад

    Thanks for the video and ideas at the start.

  • @thewebproject
    @thewebproject 11 месяцев назад

    hi, how about vise versa where I want to receive post from specific channel to my web app or website? Is it possible?

  • @lancebyrd6871
    @lancebyrd6871 3 года назад

    This was helpful. Thank you.

  • @anasalraddadi9455
    @anasalraddadi9455 3 года назад

    Hi Thank you for the video I kinda want to do the same app you mentioned at first that monitor a system and sends crash rates. Any idea how can I do that?

  • @karthikeyanarumugam8793
    @karthikeyanarumugam8793 3 года назад

    Wonderfull explanation. Thank you so much

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

    do you have video on how to get messages of a slack channel

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

    amazing its very helpful for me thanks a lot.. can u tell me how can I send a post message from logged in user ID??
    In this case its sending from our app name..

  • @TheScoobysteve
    @TheScoobysteve 3 года назад

    Subbed - super helpful, thanks!

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

    How to implement a command in xsoar to find the current status (offline/online) of slack user

  • @MrNkaliape
    @MrNkaliape 3 года назад

    can we send response to the incoming msg? one more qn: your script didnt cover on authentication? does free version of slack allow this?

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

    Can we mention/tag someone in a slack channel using the python script?

  • @erickmanuelbazansalinas9705
    @erickmanuelbazansalinas9705 4 года назад +1

    great video, thanks a lot!

  • @yogitagupta4674
    @yogitagupta4674 4 года назад

    Hi, thanks for the video. I've created a slack app that posts open SNOW tickets, i want to add the functionality which shows the live status of the ticket . Like when the message is posted, the ticket is in "open" state and when someone resolves it later , i want it to get updated to "Resolved". I saw this feature in PagerDuty slack app. Please help

  • @judithmishelparedesartica1832
    @judithmishelparedesartica1832 4 года назад

    thank you. It was a good video , helps me a lot.

  • @sumanchaubey3872
    @sumanchaubey3872 3 года назад

    Hey can we send multiples files (let say three images)via slack bot using python script.If yes please make a video on it ...thanks in advance

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

    q1.I fixed the correct code but not pops-up in slack message automatically ,cos of my Terminal is not Responding as OK! and its why?
    q2. i'm using python for slack messages and slack app should be integrated with Make i.e., integromat to trigger automation workflows/scenarios from OBS, Can I Use Python to Connect OBS Studio With Any App Using Integromat / Zapier ?

  • @shubhamjha5738
    @shubhamjha5738 3 года назад

    how can i logout another team member or delete his account as a sso/admin, may be when he had left the organisation. Means how to automate this thing

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

    How can I send file/attachments with messages?

  • @javitv454
    @javitv454 3 года назад

    Hey, any way to also send images ? I saw ways to send urls but can I directly send a file ?

    • @tech_with_moss
      @tech_with_moss  3 года назад +1

      Hi Javier! Yes, it is possible to send files via the API. Here is some documentation for uploading a file: api.slack.com/methods/files.upload/code

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

    Thanks for this!

  • @rampalchauhan5551
    @rampalchauhan5551 3 года назад +1

    Good Video and thanks - but the code could have been to the point. adding argument passing from command line made the otherwise simple code complex

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

    How to fetch status of an user from slack sdk?? Can anyone tell

  • @kiavashvani6310
    @kiavashvani6310 3 года назад

    Make a video showing how to delete a particular message sent with the API

  • @AndyD89
    @AndyD89 3 года назад

    Great video! Could you show us how to do this with Google Chat instead? That would be amazing!

    • @tech_with_moss
      @tech_with_moss  3 года назад

      Thanks for the suggestion! I'll consider doing this for a future video. I'd have to research the Google Chat API.

  • @sistemasautoluz7584
    @sistemasautoluz7584 3 года назад

    how the use whit php in the web page

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

    I believe that Webhooks are outdated and Slack can discontinue it anytime. Any video on consuming Slack's REST API?

  • @netdevgamer
    @netdevgamer 3 года назад

    Thanks this helped me

  • @dskitchen1386
    @dskitchen1386 3 года назад

    How to send content of file using webhook over slack?

    • @tech_with_moss
      @tech_with_moss  3 года назад

      In my most recent video I cover this topic but using Golang instead of python

  • @colleenblase7780
    @colleenblase7780 4 года назад

    Hi, how can I recover the past messages at slack?

    • @tech_with_moss
      @tech_with_moss  4 года назад

      Hello! I apologize I'm not entirely sure how to do this. I believe it depends on the plan that you have with slack though.

  • @denieltabirara1010
    @denieltabirara1010 4 года назад

    Hi can I my account do the auto reply instead of bot?

    • @tech_with_moss
      @tech_with_moss  4 года назад

      Hello! Apparently it is possible to "impersonate" a user: api.slack.com/messaging/sending#impersonation
      See the "sending message as other entities" section

  • @usmanmaqbool7758
    @usmanmaqbool7758 4 года назад

    hello ! can we post file with same script ?

    • @tech_with_moss
      @tech_with_moss  4 года назад

      Hi Usman! You could use most of the same script but with some modifications. Specifically, you'll want to utilize the following Slack API endpoint to upload a file (Documentation here): api.slack.com/methods/files.upload

    • @usmanmaqbool7758
      @usmanmaqbool7758 4 года назад

      @@tech_with_moss Thank You

  • @maxrobotics3703
    @maxrobotics3703 4 года назад

    hello, i am getting invalid payload in pycharm when i run it. plz help

    • @tech_with_moss
      @tech_with_moss  4 года назад +1

      Hello! Be sure to check that you're entering an argument at the command line and that the argument provided with the "-m" option is given in quotes. After grabbing the argument from the command line, you may want to print it out just to validate that you've saved it to a variable correctly. Also, if you use the "Play" button in pycharm to run the script, it won't run it with any options or arguments, so you would get a null value for your argument. Not sure if you're running it via the terminal or via the play button but I would also check that. If you confirm that you've done this and it's still not working, you could share your code here and the command you're using to run it and I can take a look!

    • @ganeshdeshmukh8020
      @ganeshdeshmukh8020 3 года назад

      @@tech_with_moss oh wow man, you are really engaged with the audiance.

    • @tech_with_moss
      @tech_with_moss  3 года назад +1

      @@ganeshdeshmukh8020 thank you! I try to be as much as time permits.

  • @mohammedajmal5009
    @mohammedajmal5009 4 года назад

    hello, how to get slack messages using python? like a chatbot.

    • @tech_with_moss
      @tech_with_moss  4 года назад

      Hi! I believe what you're looking for is this: api.slack.com/authentication/basics
      This documentation outlines how to create an app that will respond to users who invoke the bot-user commands. The legacy version of this documentation was here api.slack.com/bot-users, which discusses the process of creating a "bot-user" which is now replaced by the first link that I shared

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

    Thanks! :D

  • @jk19988
    @jk19988 4 года назад

    How to mention a user using python in a slack channel?

    • @tech_with_moss
      @tech_with_moss  4 года назад +1

      Although I don't have the python code, I believe the formatting you're looking for is documented on this page!
      api.slack.com/reference/surfaces/formatting#mentioning-users

    • @jk19988
      @jk19988 4 года назад

      @@tech_with_moss thanks:)

  • @AshutoshKumar-xz9hs
    @AshutoshKumar-xz9hs 3 года назад

    Save my day

  • @mcring543
    @mcring543 4 года назад

    Send in a blank message. I would show help on a blank message and exit. But that's just me.

    • @tech_with_moss
      @tech_with_moss  4 года назад

      I agree, I definitely think that would be a good improvement to the program. No use in sending a blank message.

  • @yaniaular
    @yaniaular 3 года назад

    GRACIAS!!!!!!!!!!!!!