Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Chatwoot
  3. Has anyone deployed an agent/bot with Chatwoot?

Has anyone deployed an agent/bot with Chatwoot?

Scheduled Pinned Locked Moved Solved Chatwoot
chatwootagentbot
5 Posts 2 Posters 1.4k Views 2 Watching
  • 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.
  • M Offline
    M Offline
    msbt
    App Dev
    wrote on last edited by
    #1

    Hey there, I'm trying to add a bot to Chatwoot but I'm stuck at the rails command to do so. Tried to follow the description from https://www.chatwoot.com/docs/product/others/agent-bots where you should enter

    # pass account_id attribute to create an account bot instead of global bot
    bot = AgentBot.create!(name: "Your Bot", outgoing_url: "http://localhost:8000")
    

    But none of the outgoing_url that I tried worked (localhost/127.0.0.1/container ip/actual domain), any idea what to put there?

    Reply/errormessage is

    /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "::1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
            Is the server running on that host and accepting TCP/IP connections?
    
    connection to server at "127.0.0.1", port 5432 failed: Connection refused
            Is the server running on that host and accepting TCP/IP connections?
    /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/pg-1.4.1/lib/pg/connection.rb:740:in `connect_to_hosts': connection to server at "::1", port 5432 failed: Connection refused (PG::ConnectionBad)
            Is the server running on that host and accepting TCP/IP connections?
    
    connection to server at "127.0.0.1", port 5432 failed: Connection refused
            Is the server running on that host and accepting TCP/IP connections?
    
    girishG 1 Reply Last reply
    0
    • M msbt

      Hey there, I'm trying to add a bot to Chatwoot but I'm stuck at the rails command to do so. Tried to follow the description from https://www.chatwoot.com/docs/product/others/agent-bots where you should enter

      # pass account_id attribute to create an account bot instead of global bot
      bot = AgentBot.create!(name: "Your Bot", outgoing_url: "http://localhost:8000")
      

      But none of the outgoing_url that I tried worked (localhost/127.0.0.1/container ip/actual domain), any idea what to put there?

      Reply/errormessage is

      /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "::1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
              Is the server running on that host and accepting TCP/IP connections?
      
      connection to server at "127.0.0.1", port 5432 failed: Connection refused
              Is the server running on that host and accepting TCP/IP connections?
      /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/pg-1.4.1/lib/pg/connection.rb:740:in `connect_to_hosts': connection to server at "::1", port 5432 failed: Connection refused (PG::ConnectionBad)
              Is the server running on that host and accepting TCP/IP connections?
      
      connection to server at "127.0.0.1", port 5432 failed: Connection refused
              Is the server running on that host and accepting TCP/IP connections?
      
      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @msbt Did you figure this out? This looks like the bot code is not getting the correct environment variables to connect to postgresql.

      M 1 Reply Last reply
      0
      • girishG girish

        @msbt Did you figure this out? This looks like the bot code is not getting the correct environment variables to connect to postgresql.

        M Offline
        M Offline
        msbt
        App Dev
        wrote on last edited by msbt
        #3

        @girish not yet I'm afraid, but if you have any ideas for me to try, I'll give it another go. I thought maybe other people deployed bots and knew how 😉

        girishG 1 Reply Last reply
        0
        • M msbt

          @girish not yet I'm afraid, but if you have any ideas for me to try, I'll give it another go. I thought maybe other people deployed bots and knew how 😉

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @msbt I could reproduce it. Can you update to latest chatwoot and try the commands here - https://docs.cloudron.io/apps/chatwoot/#rails-console . It source the DB environment variables as well and after that it works for me.

          M 1 Reply Last reply
          2
          • girishG girish

            @msbt I could reproduce it. Can you update to latest chatwoot and try the commands here - https://docs.cloudron.io/apps/chatwoot/#rails-console . It source the DB environment variables as well and after that it works for me.

            M Offline
            M Offline
            msbt
            App Dev
            wrote on last edited by
            #5

            @girish thanks, that seemed to work now! Hope I find time to set up the rest of it soon 🙂

            1 Reply Last reply
            1
            • M msbt marked this topic as a question on
            • M msbt has marked this topic as solved on
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search