Replace Images in Google Docs Documents and Download as PDF/Docx
Configured with Google Drive, HTTP Request. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Web / API
- Files / media
- Transform
- Routing
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Find Image ID in Docx | Web / API | HTTP Request | See node parameters |
| Make file shareable publically (optional) | Files / media | Google Drive | share |
| Image URL | Transform | Edit Fields | See node parameters |
| Find & Copy Docx Template | Files / media | Google Drive | copy |
| Own datasource | Routing | No Op | See node parameters |
| Replace Image in Docx | Web / API | HTTP Request | POST |
| Download File - Docx | Files / media | Google Drive | download |
| Download File - PDF | Files / media | Google Drive | download |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
None declared. HTTP requests and Code nodes may still need configuration.
Workflow notes
Sticky Note9
Find and replace image in docx. Connect to a datasource with an image URL you want to insert into the Docx file
Image URL
Define Image URL
Sticky Note42
REQUIRED
Connect to your database of image urls to input. Name the column url like in the Image URL node. This flow works with an image URL only, not a physical image file
Sticky Note43
OPTIONAL
If you want to create multiple documents with multiple images then create a template in your GDrive folder with a placeholder image that you want to replace. This template will be copied each time you run the flow, and the ID of that new document will be passed to find image ID in Docx to find the relevant image to replace with your image url. If you are just doing this for a single document then remove the find and copy docx template node. If you do this step, follow the n8n guide on how to connect to your GDrive account.
Sticky Note44
Optional - create and copy a template document in your GDrive folder
Sticky Note45
Sends request to Google API to retrieve document details (including image ID) in the template document
Sticky Note46
REQUIRED
- Update the Google Docs OAuth 2 API credentials with your own
- Ensure Document ID is passing correctly to
Find Image ID in Docxif you removed the previous step - Ensure the
imageObjectIdin theReplace Image in Docxnode is correct, if you only have a single image in the document it should use the"{{ $json.body.content[1].paragraph.elements[0].inlineObjectElement.inlineObjectId }}"returned from the previous node. If you have more than one image then id will be nested in the"body.content[1].paragraph.positionedObjectIds[0]"object from the previous node
Sticky Note47
OPTIONAL
- Make the file publically shareable (anyone can view/edit)
- Download the file as a Docx
- Download the file as a PDF
All of the above requires authenticating with your GDrive account, ensuring the documentID is pulling correctly from previous nodes and choosing a filename if relevant
Sticky Note48
Optional - make the file shareable, and download in docx and PDF format
Replace Images in Google Docs Documents and Download as PDF/Docx
Replace Images in Google Docs Documents and Download as PDF/Docx
Use Case
Automate image replacement in Google Docs:
- You need to update document images dynamically
- You want to create multiple versions of a template with different images
- You need to batch process document images from a URL database
- You want to generate shareable documents with custom images
What this Workflow Does
The workflow automates image replacement in Google Docs:
- Accepts image URLs from your database
- Finds and replaces images in template documents
- Creates new document copies with updated images
- Optionally converts to PDF and makes documents shareable
Setup
- Connect your image URL database (column name must be "url")
- Set up Google Docs OAuth 2 API credentials
- Optional: Create a template document in Google Drive with placeholder images
- Optional: Configure Google Drive authentication for additional features
How to Adjust it to Your Needs
- Remove template copying for single document processing
- Adjust image ID selection for documents with multiple images
- Configure sharing settings and download formats
- Customize file naming and storage location
Made by Simon @ automake.io
Replace Images in Google Docs Documents and Download as PDF/Docx
Replace Images in Google Docs Documents and Download as PDF/Docx
Purpose and structure
This folder contains the Replace Images in Google Docs Documents and Download as PDF/Docx workflow. Its executable nodes use googleDrive, httpRequest, manualTrigger, noOp, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0617_Manual_Noop_Automation_Webhook.json MIT; preserve source notices.