Creating a PDF file at Google drive

Hi

I am struggling to create / save a PDF file to my Google Drive.
I have been able to install & run node-red-contrib-google-oauth2, this gives me access to my google account with the right permission.

I am using files.create to create a pdf file.

This is the payload I use:

var payload = {
uploadType: "multipart/form-data",
supportsAllDrives: true,
resource: {
name: "MyPDFFile.pdf",
"contenType": 'application/json; charset=UTF-8'
},
media: {
mimeType: "application/pdf; charset=UTF-8",
body: msg.payload
},
}
msg.payload = payload;
return msg;

I am ending up with an empty PDF in my google drive.
What am I doing wrong?

Thanks in advance
Heursqem

Not really enough info to help much (for me anyhow).

what is "files.create"?

What do you send that to?

Does this file exist and where is it saved?

Do you have a non empty PDF somewhere created on the Node-RED server?

Is that missing a t?

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