Fetching webContentLink from Google Drive in n8n. Old question locked and irrelevant

Describe the problem/error/question

I want to get the webContentLink for a google drive file whose ID I have.

Same as this which was closed, but the official node doesn’t have the toggle the answer claims.

There is no “simplify” toggle.

Please share your workflow

can’t share the whole thing, it is too many characters.

{
“nodes”: [
{
“parameters”: {
“url”: “https://hook.us2.make.com/m2hoaj5new751313ne66kmyx4by7f6os”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “title”,
“value”: “={{ $json.message.content.title }}”
},
{
“name”: “subheading”,
“value”: “={{ $json.message.content.subheading }}”
},
{
“name”: “newsletter_body_html”,
“value”: “={{ $json.data }}”
},
{
“name”: “prospect_id”,
“value”: “={{ $(‘If’).item.json.id }}”
},
{
“name”: “first_name”,
“value”: “={{ $(‘If’).item.json.first_name }}”
},
{
“name”: “last_name”,
“value”: “={{ $(‘If’).item.json.last_name }}”
},
{
“name”: “reciever”,
“value”: “={{ $(‘If’).item.json.name }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-420,
560
],
“id”: “302f80cc-b38c-467c-9a3a-76861889d6bb”,
“name”: “HTTP Request”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “9b8fb691-a3bb-4f58-a80b-3ce85ea8ef90”,
“name”: “document_id”,
“value”: “={{ $json.data.split(",")[0] }}”,
“type”: “string”
},
{
“id”: “60d9b84f-d9df-45a1-9de7-0d01964a9898”,
“name”: “something_else”,
“value”: “={{ $json.data.split(",")[1] }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
-200,
560
],
“id”: “6cdda5ff-efbe-407b-9bc6-86a85cc1d5b4”,
“name”: “Edit Fields”
},
{
“parameters”: {
“operation”: “share”,
“fileId”: {
“__rl”: true,
“value”: “={{ $json.document_id }}”,
“mode”: “id”
},
“permissionsUi”: {
“permissionsValues”: {
“role”: “reader”,
“type”: “anyone”
}
},
“options”: {}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
40,
420
],
“id”: “8c6b56cb-4292-4c04-abe6-4c486c68ec83”,
“name”: “Google Drive”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “bsJjCFVM8ndD6fCX”,
“name”: “[email protected]
}
}
},
{
“parameters”: {
“sendTo”: “[email protected]”,
“subject”: “=For {{ $(‘If’).item.json.first_name }} - I wrote you a newsletter”,
“message”: “=Big fan of your work! I was on {{ $(‘If’).item.json.organization.website_url }} earlier and thought I’d write you an end to end newsletter (~400 words) with a twist.\n\nI know giving value up front is how you form connections, so I thought I’d start with that.\nIf you have any interest, you can find it here.\n\nIf you want more, just say the word - I’ve got a few more interesting pieces of content for you.”,
“options”: {}
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.1,
“position”: [
40,
560
],
“id”: “fb6294f1-bfee-4cdb-ba5a-0cc1d73d3757”,
“name”: “Gmail”,
“webhookId”: “d090bc66-0311-4e4f-8ab2-924422771e82”,
“credentials”: {
“gmailOAuth2”: {
“id”: “slSyZJUpRh44W5rp”,
“name”: “[email protected]
}
}
}
],
“connections”: {
“HTTP Request”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “Google Drive”,
“type”: “main”,
“index”: 0
},
{
“node”: “Gmail”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Drive”: {
“main”: [

]
}
},
“pinData”: {
“HTTP Request”: [
{
“data”: “12DszjlR0vWEO59VZWVn2s-3gs3eahzw5PK4deP8uwiE,For Ofer Rosenbaum: Personalized Newsletter”
}
],
“Edit Fields”: [
{
“document_id”: “12DszjlR0vWEO59VZWVn2s-3gs3eahzw5PK4deP8uwiE”,
“something_else”: “For Ofer Rosenbaum: Personalized Newsletter”
}
]
},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “819364585f380fde50d221b2db86016b3d605b47f54b6a84a4e03b58e9ee9399”
}
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version:: official, not self hosted
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: win11

Hi @Noam_Salomonski

The Simplify Output toggle is available only when you choose the Upload operation, which lets you get the webContentLink after uploading a file.

Since you’re using the Share operation, that option isn’t available at the moment.

Fortunately, there’s a workaround: you can call the Drive API directly with the file ID to get the webContentLink, Here’s how:


🙏🏻

If this answers your question, Kindly mark the reply as the solution so others with the same issue can find it easily :white_check_mark::pray:t2:

posting as text so people in the future can copy paste, and LLMs can learn this

Hi! you can use this workflow:

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