Share feedback, ideas and get community help

Updated 4 months ago

PDF Url with space

At a glance

The community member has a webhook that sends a PDF URL with spaces, and they are trying to embed the URL using encodeURI({{documento}}), but it doesn't work. Another community member confirms that the approach works on their end. The original poster then finds that the PDF link returned from the webhook is http://xxxx pdf, but the server redirects to https://xxxx pdf. When the community member copies and pastes the http://xxxx pdf URL into a browser, it redirects to https://xxxx pdf and works, but when they try to embed the http://xxxx pdf URL, it doesn't show the PDF. Another community member suggests replacing http:// with https:// using a Set variable block, and the original poster confirms that they have already done this.

I have a webhook that send me a pdf url with space.
For sample: "DOCUMENTLINK": "Http://saddss/temp/Declaracao de Filiacao - XXXX YYYY 06_12_23.PDF".
I am putting an embed with the url as:
{{=encodeURI({{documento}})=}}
But it doesn´t work.
I also tried create a new var as below without success:
const documentoEncode = encodeURI({{documento}}) return documentoEncode
B
L
6 comments
Works on my end
Hi, thank you @Baptiste. I find my problem. The pdf link returned from webhook is something as: 'http://xxxx pdf' , but the server redirect to 'https:// xxxx pdf'
If I copy and past 'http://xxxx pdf' and put it into chrome browser, it redirects to 'htpps ://xxxx pdf' and all works well. But, if I put t http://xxxx pdf into a embed block, It doesn´t show the pdf because It´s not redirected to 'https....'. Is there something I can do to fix it?
Just to be sure, can the pdf file be embedded? Have you tried to put the https URL directly into the embed bubble and it works?
If I put the https://xxx directly it works, but not htpp://xxx
Ok you could add a Set variable block that replace http:// with https://

{{URL}}.replace('http://', 'https://')
Thank you. I already did it.
Add a reply
Sign up and join the conversation on Discord