Hi, I am trying to solve an issue with the Google Docs module “Create document from a template”.
The example I give here is just a scenario that recreate the problem I am facing in another more complex scenario.
The scenario is pretty simple: I got a public image from GDrive and I want to insert it in 12 image blocks in a new file generated from a template.
The trigger contains just the url of the placeholder I want to add to the document:
The GDocs module is just inserting the url in each image blocks:
Here is the blueprint:
{
"name": "Integration Google Drive",
"flow": [
{
"id": 6,
"module": "util:BasicTrigger",
"version": 1,
"parameters": {
"values": [
{
"spec": [
{
"name": "placeholder",
"value": "https://drive.google.com/uc?id=1rvhokWG_SKMsGFkhOlvwZ9BcV0uFHq1K&export=download"
}
]
}
]
},
"mapper": {},
"metadata": {
"designer": {
"x": 0,
"y": 0
},
"restore": {
"parameters": {
"values": {
"items": [
{
"spec": {
"mode": "chose",
"items": [
null
]
}
}
]
}
}
},
"parameters": [
{
"name": "values",
"type": "array",
"label": "Bundles",
"required": true,
"spec": [
{
"name": "spec",
"label": "Items",
"type": "array",
"required": true,
"spec": [
{
"name": "name",
"label": "Name",
"required": true,
"type": "text"
},
{
"name": "value",
"label": "Value",
"required": true,
"type": "text"
}
]
}
]
}
],
"interface": [
{
"name": "placeholder",
"label": "placeholder",
"type": "text"
}
]
}
},
{
"id": 5,
"module": "google-docs:createADocumentFromTemplate",
"version": 1,
"parameters": {
"__IMTCONN__": 356279
},
"mapper": {
"select": "dropdown",
"name": "Test",
"destination": "drive",
"from": "drive",
"document": "/1o4JsTxaMfVLcUhZh89m2o6bgRzWOw4H0/12nPhUYpYWJcl3V-2zIPY92h4dVM7cVcS/1YjlIHOhQokTF8FRpwyGhqbFH4HPDTEJMH5bPGXW2zJs",
"image": {
"kix.gu9oi1vbb7o50": "{{6.placeholder}}",
"kix.rc1zadpi4p021": "{{6.placeholder}}",
"kix.a63u9s377y4t2": "{{6.placeholder}}",
"kix.x50oy3876g9g3": "{{6.placeholder}}",
"kix.oz5oa2xt5zgw4": "{{6.placeholder}}",
"kix.yjibdo9qr5sh5": "{{6.placeholder}}",
"kix.c3n5z6bxcgyi6": "{{6.placeholder}}",
"kix.7b9yyrbpvlxc7": "{{6.placeholder}}",
"kix.yf5kwpk88ykq8": "{{6.placeholder}}",
"kix.p8fc5im1regw9": "{{6.placeholder}}",
"kix.3pj3wdbk17vf10": "{{6.placeholder}}",
"kix.qqyx5gwtwd9z11": "{{6.placeholder}}"
},
"folderId": "/1o4JsTxaMfVLcUhZh89m2o6bgRzWOw4H0/12nPhUYpYWJcl3V-2zIPY92h4dVM7cVcS"
},
"metadata": {
"designer": {
"x": 300,
"y": 0
},
"restore": {
"parameters": {
"__IMTCONN__": {
"label": "Google Account (g.lanzi@planbproject.it)",
"data": {
"scoped": "true",
"connection": "google"
}
}
},
"expect": {
"select": {
"label": "By Dropdown"
},
"destination": {
"label": "My Drive"
},
"from": {
"label": "My Drive"
},
"document": {
"path": [
"TMP",
"docs",
"TEMPLATE"
]
},
"folderId": {
"mode": "chose",
"path": [
"TMP",
"docs"
]
}
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account:google",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "select",
"type": "select",
"label": "Create a Document from a Template",
"required": true,
"validate": {
"enum": [
"map",
"dropdown"
]
}
},
{
"name": "name",
"type": "text",
"label": "Title",
"required": true
},
{
"name": "destination",
"type": "select",
"label": "New Drive Location",
"required": true,
"validate": {
"enum": [
"drive",
"share",
"team"
]
}
},
{
"name": "from",
"type": "select",
"label": "Choose a Drive",
"required": true,
"validate": {
"enum": [
"drive",
"share",
"team"
]
}
},
{
"name": "document",
"type": "file",
"label": "Document ID",
"required": true
},
{
"name": "image",
"type": "collection",
"label": "Image URLs",
"spec": [
{
"name": "kix.gu9oi1vbb7o50",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 1",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.rc1zadpi4p021",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 2",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.a63u9s377y4t2",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 3",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.x50oy3876g9g3",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 4",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.oz5oa2xt5zgw4",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 5",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.yjibdo9qr5sh5",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 6",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.c3n5z6bxcgyi6",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 7",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.7b9yyrbpvlxc7",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 8",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.yf5kwpk88ykq8",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 9",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.p8fc5im1regw9",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 10",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.3pj3wdbk17vf10",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 11",
"metadata": {
"tabId": "t.0"
}
},
{
"name": "kix.qqyx5gwtwd9z11",
"type": "url",
"label": "Tab (Tab 1) - Body: Image No. 12",
"metadata": {
"tabId": "t.0"
}
}
]
},
{
"name": "folderId",
"type": "folder",
"label": "New Document's Location",
"required": true
}
]
}
}
],
"metadata": {
"instant": false,
"version": 1,
"scenario": {
"roundtrips": 1,
"maxErrors": 3,
"autoCommit": true,
"autoCommitTriggerLast": true,
"sequential": false,
"slots": null,
"confidential": false,
"dataloss": false,
"dlq": false,
"freshVariables": false
},
"designer": {
"orphans": []
},
"zone": "eu2.make.com"
}
}
The point is: when I place the new image up to the 9th place, the doc is generated just fine. When I add the 10th (or more) url in the specific field, I got an error:
[400] Invalid requests[10].replaceImage: The object with ID kix.3pj3wdbk17vf1 could not be found.
It seems like after the 9th image, the API refuses to process the block’s id. Therefore, I got the error.
To be noted: The Google Module is performing 2 different calls. One is the copy of the template, the second is the filling of the fields/blocks. In case of 10 or more images, a document is created but it’s just a copy of the template.
Here’s the docs:
Template: TEMPLATE - Google Docs
Test (with error): Test - Google Docs
Test with 9 new images (no error): Test-correct - Google Docs
It worked since february until now. The original scenario fills the new doc with 18 images.
Any Idea?