I’m using HTTP Request to get the pdf from a Gogle Docs, but the file name is shown as Export, is it possible to replace this name with the actual file name?
You can use the function node with the following code to do so. It might be worth adding it as an option to the HTTP node, though.
items[0].binary.data.fileName = 'newname.pdf'
return items;
Example workflow
4 Likes
As I need to use the name of the file that is in Drive, it looks like this
items[0].binary.data.fileName = $node["Google Drive Trigger"].json["name"]+'.pdf'
return items;
1 Like
Hi,
I’m using the code to change the file name to the original gdocs name, but only the first file is changed. The rest is still shown as “Export”. Any help on this?
Hi @Azril
I solved this problem by adding an Items Lists (configured as pictured) after the IF and including a Loop
I took advantage of your appointment to adjust my flow to avoid future problems, which would certainly occur.
1 Like