This topic was automatically generated from Slack. You can find the original thread here.
Paul : Hi all.
I ran into an issue today working with one of my workflows that feeds into Trello.
I am just using the provided Create New Card action for the Trello app, straight out of the box.
And I kept getting a 400 Error "Request failed with status code 400
invalid value for idList
"
It was driving me insane. I tried so many things.
Then I realised that everything is POSTed to Trello as a query string in the URL, rather than in the post body?
I’m guessing there’s always going to be some limitations with this.
Anyway. The problem was a hash/pound (#) character in the string being posted as part of the Trello card’s description. As soon as I removed that everything worked fine.
So I somewhat crudely just used string.replace(/#/**g**, " ");
to clean out the hash symbol from any strings and it works fine.
But now I’m curious about a few things:
- If other odd characters show up in strings, could they too cause issues?
- If yes to 1, is there a more robust approach to ‘cleaning’ the data I’m passing to the Trello Create Card step for better reliability?
- I’ve noticed in the past, sometimes my workflow breaks and has a Syntax Error due to things like
Unexpected token , in JSON at position xxx
. Which seems to again be associated with the data I am sending to the card. This could be related to 1 and 2. Any thoughts? - If everything is being sent to Trello via the query string… is there a limit to that? Is it not better being POSTed as data in the body? Perhaps my understanding is off here.
As I have solved my immediate issue - there is no hurry on this. Just curious for longer term hints, ideas or solutions.
As always, thank you for this awesome platform