HTTP request makes .pdf to .html (slack attachment(

Hey there,

build a flow to get invoices from a slack channel where we download the .pdfs with GET request. I can open the files manually and get the .pdf to download but n8n is only putting out a .html file.

Hi, I think I can help.

Regarding the workflow, I think your retrieving the page instead of the PDF in question. Also I see your using slack. Is there a specfic reason your not using the included slack node?

Hey,

Also, you may share a workflow like this,

n8n attach workflow

What does the full URL look like also? Does it have .pdf at the end?

Best regards,

Samuel

1 Like

Yes, but that’s the issue but idk why this is happening and I get the page instead of the .pdf.

Also what do you mean with the 2nd part i dont get it tbh

There is a dedicated node for Slack. With a lot of different operations.

yeh but thats what i used? it’s just the trigger

I’m a bit confused in the image, your doing a get request with a normal http node. Could you share your workflow.

I think what @Grot mentioned here is.

From your screenshot. You already get the file_id info from slack

You can just use slack download file action to download it. No need to get the Http request to download the file.

And I can guess why you have the html.

Because when n8n use http request to open the file. It didn’t have the login information.

So for Slack. It’s someone who didn’t login and try to access the file. So slack give you html about the error message.

I found that your file is missing the key file name

@krautpotato

I have same issue, it only download the info not the actual content, did you try curl all the URLs returned from the slack get node?

It’s hit by auth mostly, I was doing voice, so just got the trancribed text from voice note.

My guess for the PDF, you can try pull using the http request node.

Hope this helps,

Samuel