• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Slack Plugin issue

    Scheduled Pinned Locked Moved
    General Problems
    4
    9
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • xZ77777777777ZxX
      xZ77777777777Zx
      last edited by

      Re: Slack Plugin

      Hello!

      Having issues with the slack plug-in, Does anyone have it working? Im getting a invalid user and/or Channel passed error and I assume I have the format wrong.

      0_1531073979327_Screen Shot 2018-07-08 at 11.11.17 AM.png
      0_1531074279156_Screen Shot 2018-07-08 at 11.23.15 AM.png

      Same issue as this post from 9 months ago
      https://forums.fogproject.org/topic/10916/slack-plugin

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        When you enter the channel, you must have the # in front, and for a user you must have the @ in front.

        So you must have your token, and the user/channel you’re trying to send the messages to.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • J
          JGallo
          last edited by

          @Tom-Elliott when trying to enter user/channel format, the plug in states invalid user/channel passed. So if my user is called fogbot and channel is fogimaging, wouldn’t the format be @fogbot/#fogimaging or are there spaces in between? I even reset API token and generated a new one just in case that could have been it.

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @JGallo
            last edited by

            @jgallo It’s an Either OR, not both. You can only send to one user, or one channel, per slack account added.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              So you would do:

              User

              Access Token: xoxp-sometokenfromslack
              User/Channel to post to: @someuser

              Channel

              Access Token: xoxp-sometokenfromslack
              User/Channel to post to: #somechannel

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              J 1 Reply Last reply Reply Quote 0
              • J
                JGallo @Tom Elliott
                last edited by JGallo

                @tom-elliott That’s the thing, on the plug-in, it only has a field for access token and user/channel. So when using the format of @someuser/#somechannel under one field, the plugin returns an error stating that it’s invalid. Are you saying there should be two parts to linking a new account?

                Also xoxb is the token assigned by Slack now and I just noticed that you stated xoxp. Could that make a difference?

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • J
                  JGallo
                  last edited by

                  0_1531240747364_Untitled.jpeg

                  JJ FullmerJ 1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @JGallo
                    last edited by

                    @jgallo One account can link to either a user, or a channel. Not both.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 1
                    • JJ FullmerJ
                      JJ Fullmer Testers @JGallo
                      last edited by

                      @jgallo
                      in User/Channel to post to you either choose to sent it to a user or a channel.
                      You are setting the destination, the access token is going to make it send from your user. This integration doesn’t create a bot like other slack integrations. You could create a separate slack user called fogbot to connect this integration and that would make it send as a different user.
                      But lets say you don’t do that, here’s what will happen in 2 different fixes

                      So if you change User/Channel to post to to @fogbot

                      then it will send updates from your slack user in a direct message to fogbot in slack.

                      If you change User/Channel to post to to #fogimaging then updates of imaging actions will send from your slack user to the #fogimaging channel.

                      Hopefully that helps as I’m guessing that you’re thinking that you’re setting a user to post as because many other slack integrations require that. This one is a bit more basic as it just uses the user in the access token and sends it to a choice of destination.

                      So think of access token as the source and User/Channel to post to as the destination

                      Have you tried the FogApi powershell module? It's pretty cool IMHO
                      https://github.com/darksidemilk/FogApi
                      https://fogapi.readthedocs.io/en/latest/
                      https://www.powershellgallery.com/packages/FogApi
                      https://forums.fogproject.org/topic/12026/powershell-api-module

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      189

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project