Hello guys!
I am creating my first “advanced” workflow, I want to have an AI agent to help me creating/updating documents depending on what the user enters in the chat, the document is not always the same so the URL changes. The error I get is when updating an existing document I cannot find it. In the “Update document” node you are meant to introduce a URL, I give it this: Doc ID or URL: {{ $json.webViewLink }} - Error: The resource you are requesting could not be found.
I cannot put the whole workflow as I am new to the community but the part of the workflow that has the error is this one:
The input of the “Search files and folders” node is the output of the AI Agent (it is normally a summary of a topic) to be pasted in a new doc or if the user ask to “update” a specific document it will just add the “summary” to the document. I put the “merge” node to get the AI agent answer and {{ $json.webViewLink }}. I thought that will work when getting to the “update doc” step. Can you help me to get the “dynamic” URL to put it in this node, please?
{
“nodes”: [
{
“parameters”: {
“resource”: “fileFolder”,
“queryString”: “={{ $json.output.doc_name }}”,
“returnAll”: true,
“filter”: {},
“options”: {
“fields”: [
“webViewLink”
]
}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-1344,
240
],
“id”: “3f8ef2ed-5014-44ca-8022-92a9a6410b8b”,
“name”: “Search files and folders”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “rOsooSdJFLSt37Sc”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {},
“type”: “n8n-nodes-base.merge”,
“typeVersion”: 3.2,
“position”: [
-1088,
144
],
“id”: “afbc6cab-1e8e-4e53-8499-60cc660bebc5”,
“name”: “Merge”
},
{
“parameters”: {
“operation”: “update”,
“documentURL”: “={{ $json.webViewLink }}”,
“simple”: false,
“actionsUi”: {
“actionFields”: [
{
“action”: “insert”,
“text”: “={{ $(‘First AI Agent’).item.json.output.content }}”
}
]
}
},
“type”: “n8n-nodes-base.googleDocs”,
“typeVersion”: 2,
“position”: [
-880,
144
],
“id”: “06def75b-35b4-4e9f-bf04-4bc9f2a77a1a”,
“name”: “Update a document”,
“executeOnce”: true,
“credentials”: {
“googleDocsOAuth2Api”: {
“id”: “p5DzvYpEkfQa1AKn”,
“name”: “Google Docs account”
}
}
}
],
“connections”: {
“Search files and folders”: {
“main”: [
[
{
“node”: “Merge”,
“type”: “main”,
“index”: 1
}
]
]
},
“Merge”: {
“main”: [
[
{
“node”: “Update a document”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “8960daadaa8aa08bf0d0a420a31a5c284303d6bfda1f02cd074ee501fc36966e”
}
}
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n via cloud
- Operating system: Windows 11Pro
