SNOW + HTTP Get Request + Unable to open downloaded Excel & Pdf files

Hi,

I am using a get request to get data from Service Now environment. I am able to download the files but when I open the files I see the following error message :

Excel cannot open file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

Here are the properties for the get request:


1 Like

Hi,

What information is in the file_name variable?

Its the file Name.

Does the file name contain the file extension too?

Yes it does.

Have you tried downloading with another tool?
Try using postman for example.

I tried manually downloading and post man. I am able to open the attachments.

1 Like

Sorry then friend, I don’t know how to help you.
I went through a similar problem, but it was the file extension that was wrong, after changing it I managed to solve the problem.

Is there anyone who faced this issue and was able to resolve it ?

Hi @Sairam_RPA

Please confirm that your organization is not blocked the download if it was not triggered internally within the snow.

Thank you.

Hi,

Could you pls check are we using correct end point in URL for downloading file from Service Now. And also make sure we are using correct content type for the file in our scenario it is a xlsx file.

Please review the below thread it is related to the issue after using upload rest call of they download manually they are facing the issue you mentioned but in our case we are using download api but I could see some discussion going on related to content type/ MIME and it might helpful for your issue. Thanks.

Hi, There was an error in the endpoint download link. While setting up the link I called file Name twice. This corrupted the file. I removed the extra file name and it worked.

Thankyou for all the help and guidance.

oh ok super. Glad to hear that you resolved the issue. thanks for sharing the response with your findings.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.