Can't get a Google Doc's content as HTML into a field

Describe the problem/error/question

I am trying to “load” the content of a Google Doc and process it in n8n nodes.

For that purpose I use Google Drive to Download the file (in HTML format), and then use Extract from file to get to the content.

The extraction node reads nothing at all:

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“operation”: “download”,
“fileId”: {
“__rl”: true,
“value”: “={{ $json.id }}”,
“mode”: “id”
},
“options”: {
“binaryPropertyName”: “data”,
“googleFileConversion”: {
“conversion”: {}
}
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
416,
0
],
“id”: “5266abe9-2078-48fe-838e-3d739ed6c66f”,
“name”: “Download file”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “xwMLmSkRxbyD9IQb”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“operation”: “html”,
“options”: {}
},
“type”: “n8n-nodes-base.extractFromFile”,
“typeVersion”: 1.1,
“position”: [
624,
0
],
“id”: “e16fcd1c-f6d2-4344-9da6-f2ed9b5c1c31”,
“name”: “Extract from File”,
“alwaysOutputData”: false
}
],
“connections”: {
“Download file”: {
“main”: [
[
{
“node”: “Extract from File”,
“type”: “main”,
“index”: 0
}
]
]
},
“Extract from File”: {
“main”: [

]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “fae6328d52fcbe3bb716cc16c0e29627faad3a2d15239b31f08c38c88c38f695”
}
}

Share the output returned by the last node

No output data returned

Information on your n8n setup

This is in the cloud version

Hey I agree with . I think the problem is that you’re using the Extract from File node, which is really only meant for pulling structured tables out of a file. Since your Google Doc is mostly plain text I guess, the node doesn’t find any tables to grab, and that’s why it’s coming back empty.

If I were you, I’d swap that node for the HTML node. Just make sure you set the source to “Binary File” and use the property name data (which is what Google Drive usually outputs).

If you use body as your CSS selector, it’ll grab all the text from the document. I’ve seen this happen a lot, and switching to the HTML node is almost always the fix for reading Google Doc.

1 Like

It did the trick. Had to indicate body as you stated and got what I wanted - thanks

1 Like

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