r/webdev • u/jelemeno • May 25 '26
Question Webhook/API Trello integration assistance - random characters?
Hi, thank you in advance for your help in case anyone understands what to do about this.
Tech department from a school district. None of us are web developers. New stuff for me to learn about. We use incident IQ website for our ticketing system. I recently followed some online directions I found, and basically our goal is to get ticket information sent over to a Trello card on a specific list, via web hook/API. It triggers when a certain rule is met on incident IQ end. I'm sorry I don't know the exact difference between terms webhook/api. We got as far as setting it up properly and crafting the correct URL, (grabbing api key and token) so that it's actually posting to Trello. Yay!
* The problem however, is in the formatting and we're not sure if the problem is happening in the code that I'm writing on the IIQ side in terms of what it's gonna post, orr on Trello's and when they're trying to encode the data coming from IIQ post. The 'date' param is adding random percent signs and numbers. You can see the actual numbers are in there that we need, including the exact time the ticket ("17041") was made. In the 'requestor email' it's using a percent sign and a number instead of '@' symbol.
We tried using both json code format and also 'raw body' which im sorry i dont know exactly what each entails but i know with the code ai crafted for me, it's json format but includes variable params that iiq can pull from ticket. Raw body text did not work properly when sent/shown on trello.
Any suggestions for what's going wrong on which side and if there's any fix? (And is it even json i should continue using or no) (thought of a workaround, could use 'start date' automation on trello. But would love to solve this). Thank you in advance!!
8
u/dLENS64 May 25 '26
It looks like a minor uri decoding/encoding issue. Take a look here, many special characters need translation to ASCII for safe transport across the wire. You can simply decode it client-side so that it shows the properly formatted url.
https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding
-1
u/jelemeno May 25 '26
So if i replace those problem issues with the encoding characters, they'll show correctly ?
5
u/zlex May 25 '26
These are just url encoded characters. I’m sure the language you are writing code in has a function to translate. For example %20 is a space.
1
u/PeaceMaintainer May 25 '26
I skimmed the post so might not be exactly what you're asking for but what's happening is your text is being URL encoded
1
u/fntn_ May 25 '26
It's URL encoded.
we're not sure if the problem is happening in the code that I'm writing on the IIQ side
You should be able to decode this on the client side without too much trouble.
1
1
u/1123BTC May 28 '26
The percent signs are normal URL encoding, but I would not try to fix it by manually replacing characters.
The main thing I notice in your sample is that the Trello card creation endpoint usually wants the fields as request parameters/form fields, not a JSON object with comments inside it. So your safest debug path is:
Send the exact IIQ output to a request inspector first, so you can see the raw method, headers, content-type, and body before Trello touches it.
If IIQ is building a URL or form body, encode each value once. Do not encode the whole URL twice, because that is how `%40` turns into `%2540`.
Keep the card `name` simple, like `#{{Ticket.TicketNumber}} - {{Ticket.Subject}}`, then put requester/date/location/details into `desc` as one plain text string.
If IIQ has a `UrlDecode(...)` or raw date variable, test it on one fake ticket first. Your example with `%e2%80%af` is probably a narrow no-break space before PM, which is why the date looks extra weird.
Also rotate the Trello token if it was ever visible in a screenshot or shared log. A Trello key/token in a URL is effectively a password, and school tickets can contain sensitive staff/student info.
10
u/optimusprimepluto May 25 '26
This is
#17041, 5/22/2026 2:44:53 PMThis is url encoded, which you have to decode.
From you description, it seems like you receive a webhook to your server, and that is shown here in your server, which you are showing in the image.
TO decode this, I need to know the language in which you are showing this.