Hi,

What I’m trying to do is that if someone sends a message on my telegram with the text: “/todo (name-of-task) (due-date) (due-time)” (example: /todo empty the dishwasher 16-08-2025 14:00)

to get that in node-red and put that in vikunja via an http-request (or if you think there’s something better, please advise)

I’m getting problems in the form of “message not found” and/or “malformed token” (that last one is a bit longer but you get the point)

The token works with a curl command, so I guess it’s ok. I tried adding the headers to each http request in my flow and also tried leaving the headers empty and putting them in the function. Same result.

Can you help me out?

code located at: https://pastebin.com/suT710Yn

  • fixmycode@feddit.cl
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 days ago

    where are you seeing the errors? node-red? what does the debug node outputs?

    can you post an example of the working curl command?

    the code seems fine (could be solved with a single regex but no need to change it)

    my first guess is that you’re assuming one on the tools is sending proper headers and it’s not…

    • TheOldRepublicOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 days ago

      I saw the errors in a debug output node in node-red.

      I can post tomorrow, I’m not home right now and don’t have a computer by hand

      Yeah, I think it has something to do with the headers too, but still, it’s odd.

      • fixmycode@feddit.cl
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        this looks fine, code looks fine, I’ve thing I don’t think it’s super transparent about this setup is how your message payload looks before your request, but the headers are set correctly…