Menu

#2017 WebHooks to NodeRed - HowTo?

open
nobody
2026-06-20
2018-11-22
Anonymous
No

Originally created by: yeurplc

Issue

Can't receive webhook Messages from Wekan.

POST / GET / PUT from console are working.

curl -X POST -d 'Nick' -H "Content-type: text/plain" http://192.168.1.20:1880/hello-raw
curl -X POST -d 'Nick' -H "Content-type: text/plain" http://192.168.1.20:1880/wekan

Server Setup Information:

  • Did you test in newest Wekan?: YES
  • For new Wekan install, did you configure root-url correctly: YES , think so
  • Wekan version: v1.78.0

  • Operating System: Ubuntu 18.04.1 LTS

  • Deployment Method: Docker version 18.03.1-ce

  • ROOT_URL environment variable: http://192.168.1.20:3000/

Problem description:

2018-11-22_135147

2018-11-22_134102

Discussion

  • Anonymous

    Anonymous - 2018-11-23

    Originally posted by: xet7

    Wekan only has Outgoing Webhooks going from Wekan to other software like Slack/Rocket.Chat/etc.

    1) Is that Outgoing Webhook URL the address of NodeRed ?

    2) Does NodeRed have incoming webhook that supports incoming Wekan data in this format ?

    3) For getting data into Wekan, there is Wekan REST API. Does it work for you?

     
  • Anonymous

    Anonymous - 2018-11-27

    Originally posted by: andyprv

    1. Is that Outgoing Webhook URL the address of NodeRed ?

    Yes , I tryed with & without Port declaration

    1. Does NodeRed have incoming webhook that supports incoming Wekan data in this format ?

    It should be able to receive any kind of http POST / PUT Messages , I tested with
    curl command from different PC , worked

    1. For getting data into Wekan, there is Wekan REST API. Does it work for you?

    Puting Data into Wekan ,is not needed yet , first we like to Track all Card movements

     
  • Anonymous

    Anonymous - 2019-01-07

    Originally posted by: xet7

    @andyprv

    I added incoming HTTP POST to NodeRed:
    nodered-01-http-post

    Then I added debug:
    nodered-02-debug

    And Outgoing Wekan Webhook, that seems to send changes as seen above:
    nodered-03-wekan-outgoing

    I installed NodeRed like described here, also installing chatbot:
    https://flows.nodered.org/node/node-red-contrib-chatbot

     
  • Anonymous

    Anonymous - 2019-01-07

    Originally posted by: xet7

    Also, in NodeRed you need to click Deploy to deploy new HTTP Post etc changes.

     
  • Anonymous

    Anonymous - 2019-01-15

    Originally posted by: andyprv

    Hello ,

    my setup is not installed on the host, both are Containers, running on Docker.

    I fool'd arround and got sometimes Messages in NodeRed , when I open/close other connections .


    2019-01-15_133429

    2019-01-15_133401

     
  • Anonymous

    Anonymous - 2019-01-15

    Originally posted by: andyprv

    seems to work with v2.01

    If I reload wekan , after setup webhook !

    Just "SAVE" webhook settings or open/close the Board is not working ,
    give you that strange behavior , as I discriped obove ...

    2019-01-15_134753

     
  • Anonymous

    Anonymous - 2019-01-15

    Ticket changed by: xet7

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2019-01-15

    Originally posted by: defijesus

    @andyprv I'm also having troubles with webhooks when running with docker. Can you share your docker-compose.yml and how you are running it?

     
  • Anonymous

    Anonymous - 2019-01-15

    Ticket changed by: xet7

    • status: closed --> open
     
  • Anonymous

    Anonymous - 2019-01-15

    Originally posted by: xet7

    Here is all steps I did:

    1) Install Docker and docker-compose to Ubuntu 16.04 64bit

    2) Deleted and cleaned up all docker data, so that Wekan starts correctly:

    git clone https://github.com/wekan/docker-cleanup-volumes
    cd docker-cleanup-volumes
    ./start.sh
    

    3) Cloned wekan repo and started wekan

    git clone https://github.com/wekan/wekan
    cd wekan
    docker-compose up -d
    

    4) Installed Node 8.15.0

    sudo apt-get install npm build-essential
    sudo npm -g install npm
    sudo npm -g install n
    sudo n 8.15.0
    

    5) Installed node-red according to https://flows.nodered.org/node/node-red-contrib-chatbot

    sudo npm -g install node-red
    cd ~/.node-red
    npm install node-red-contrib-chatbot
    node-red
    

    6) Added node-red http-in /wekan and debug as above screenshot, added line between them, clicked deploy

    7) At wekan http://localhost registered new account and logged in with same credentials

    8) Created new board and added outgoing webhook to http://127.0.0.1:1880/wekan

    9) Docker does not send any changes of creating cards and lists, or moving cards

    10) Built from source and run

    cd wekan
    ./rebuild-wekan.sh
    

    And with 1 install dependencies, and 2 build from source

    11) Edit start-wekan.sh to have ROOT_URL=http://localhost and PORT=80

    12) Allowed wekan on port 80

    cd wekan
    ./releases/virtualbox/node-allow-port-80.sh
    

    13) Install MongoDB 3.2.21 according to Ubuntu MongoDB docs

    14) Start Wekan

    cd wekan
    ./start-wekan.sh
    

    15) Add new board and outgoing webhook to http://127.0.0.1:1880/wekan

    16) And from source it works.

    17) But docker does not work. Is it because some Docker network settings? Is there limited access in Docker to localhost ports? Or does nodered need to be in some docker container, defined to wekan network defined in docker-compose.yml ?

     
  • Anonymous

    Anonymous - 2019-01-16

    Originally posted by: xet7

    It seems that Wekan source/snap/docker on Linux outgoing webhooks to Rocket.Chat snap incoming webhook chat channel works with copying webhook url to Wekan board.

    But, it seems that:

    • Linux source/Docker/snap webhook to Discord does not work at all anymore, it did before
    • on Mac sending Wekan Docker outgoing Webhooks does not work, most likely because of Mac networking etc does not work well
    • on Linux sending from source Wekan to source NodeRed works on localhost to localhost, but from Docker to localhost needs some setup that I did not yet figure out https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
    • most likely if some other webhook code is included into same docker-compose.yml to use same docker internal wekan-tier network, outgoing webhook to that webhook receiving code would work

    These still need more testing, because it feels like sometimes some of the above works, and sometime not.

     
  • Anonymous

    Anonymous - 2019-01-16

    Originally posted by: andyprv

    @andyprv I'm also having troubles with webhooks when running with docker. Can you share your docker-compose.yml and how you are running it?

    I just pulled the Wekan 2.01 , and started with ....

    sudo docker run -d \
        --restart always \
        -p 8080:8080 \
        -e "MONGO_URL=mongodb://db" \
        -e "ROOT_URL=http://server:8080/dev/wekan" \
        -e "NODE_TLS_REJECT_UNAUTHORIZED=0" \
        -e "MAIL_FROM='Wekan Notifications <noreply.wekan@web.eu.com>'" \
        -e "WITH_API=true" \
        -e "LDAP_ENABLE=true" \
        -e "LDAP_PORT=389" \
        -e "LDAP_HOST=192.168.0.1" \
        -e "LDAP_BASEDN=dc=www,dc=loc" \
        -e "LDAP_LOGIN_FALLBACK=false" \
        -e "LDAP_RECONNECT=true" \
        -e "LDAP_ENCRYPTION=false" \
        -e "LDAP_REJECT_UNAUTHORIZED=true" \
        -e "LDAP_GROUP_FILTER_ENABLE=true" \
        -e "LDAP_GROUP_FILTER_OBJECTCLASS=group" \
        -e "LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=cn" \
        -e "LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=member" \
        -e "LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=dn" \
        -e "LDAP_GROUP_FILTER_GROUP_NAME=Europe" \
        -e "LDAP_UTF8_NAMES_SLUGIFY=false" \
        -e "LDAP_SYNC_USER_DATA=false" \
        -e "LDAP_SYNC_GROUP_ROLES=" \
        -e "LDAP_AUTHENTIFICATION=true" \
        -e "DEFAULT_AUTHENTICATION_METHOD=ldap" \
        -e "LDAP_AUTHENTIFICATION_USERDN=SERVICE-Wekan" \
        -e "LDAP_AUTHENTIFICATION_PASSWORD=password" \
        -e "LDAP_LOG_ENABLED=true" \
        -e "LDAP_Internal_Log_Level=debug" \
        -e "LDAP_MERGE_EXISTING_USERS=true" \
        -e "LDAP_DEFAULT_DOMAIN=aaaaaaaaaa.eu.com" \
        -e "LDAP_USER_SEARCH_FIELD=mail" \
        -e "OAUTH2_ENABLED=false" \
        -e "PASSWORD_LOGIN_ENABLED=false" \
        -e "LOGOUT_WITH_TIMER=true" \
        -e "LOGOUT_ON_HOURS=6" \
        --link "mongodb:db" \
        --name wekan \
        quay.io/wekan/wekan:v2.01
    
     
  • Anonymous

    Anonymous - 2019-01-16

    Originally posted by: xet7

    @andyprv

    You docker command above does not specify MongoDB version.

    quay.io/wekan/wekan:v2.01 is compatible with MongoDB 3.2.21 and
    quay.io/wekan/wekan:meteor-1.8 is with MongoDB 4.x

     
  • Anonymous

    Anonymous - 2019-01-17

    Originally posted by: andyprv

    Ohh , do I have to specify the MongoDB Version as enviroment variable on wekan run command ?

    Right now it's running ( accidentally ) on the Right Version

    sudo docker run -d \
        --restart always \
        -p 27017:27017 \
        -v wekandb.data:/data/db \
        -v wekandb.backup:/data/bak \
        --name mongodb \
        mongo:3.2.20
    
     
  • Anonymous

    Anonymous - 2019-01-17

    Originally posted by: xet7

    @andyprv

    All environment settings are documented in docker-compose.yml at https://github.com/wekan/wekan

     
  • Anonymous

    Anonymous - 2019-04-16

    Originally posted by: andyprv

    Ok , webhooks seems to work now ,

    where do I find the webhook entry's of the Boards in MonogoDB Structure ?
    and any Tip , how to add my "global" webhook Address to all existing boards ?

     
  • Anonymous

    Anonymous - 2019-04-17

    Originally posted by: xet7

    @andyprv

    Global webhook feature is not done yet:
    https://github.com/wekan/wekan/issues/2109

    So currently, you would need to add webhook URL to all boards.

    To edit Wekan MongoDB database, you can use for example:
    https://nosqlbooster.com/downloads

    When using Docker, if you have exposed at docker-compose.yml wekan-db MongoDB port to localhost 27017, you can connect to it using nosqlbooster ssh.

    When using Snap, Wekan MongoDB is running at server at port 27019, so it's possible to connect to it with nosqlbooster ssh.

     
  • Anonymous

    Anonymous - 2019-04-17

    Originally posted by: andyprv

    Yes , I know ...
    I'am using "MongoDB Compass Community" to direct access the DB , but I don't find , where the
    "webhook Addresses" entries are stored inside the DB ...

    lot of collections ...

    2019-04-17_142548

    Thanx for the "nosqlbooster4mongo" Tip

     
  • Anonymous

    Anonymous - 2019-04-17

    Originally posted by: xet7

    @andyprv

    Outgoing webhook URLs are at integrations collection/table.

     
  • Anonymous

    Anonymous - 2019-04-17

    Originally posted by: xet7

    @andyprv

    So I think it's enough you add new rows to integration table, with similar data, and it starts to work.

     
  • Anonymous

    Anonymous - 2021-01-12

    Originally posted by: xet7

    @andyprv

    Does this work for you in newest Wekan?

     

Log in to post a comment.