n8n

How to Automate Google Docs Image Updates?

Replace images in Google Docs from a list of URLs and export the results as Docx and PDF. Great for teams that produce many versions of the same document with different visuals. Useful for product sheets, proposals, and campaign assets.

The run starts with a manual test. A simple data step provides an image url field. A Google Drive node can copy a template so each run gets a new file. The Google Docs API is called to read the document and find the image ID. Another call swaps the image with your URL. You can then make the file shareable and download Docx and PDF versions.

Set Google Drive and Google Docs credentials, map your url field, and confirm the documentId passes between nodes. Expect big time savings when creating branded files at scale, often cutting prep time by 80 percent or more. Common uses include product catalogs, client proposals, ad mockups, and personalized one pagers.

What are the key features?

  • Manual trigger to run tests and batches on demand.
  • Set node accepts an image url field from your data source.
  • Google Drive copy creates a new file from a template each run.
  • HTTP request reads Google Docs content to find target image IDs.
  • Image replace call swaps the selected image with your URL.
  • Optional share step sets public access for quick review.
  • Download steps save Docx and PDF versions automatically.
  • Handles multi image docs by mapping the correct imageObjectId.

What are the benefits?

  • Reduce manual image swaps from 2 hours to 5 minutes
  • Automate up to 90 percent of document updates
  • Lower image placement errors by 95 percent with exact IDs
  • Export Docx and PDF in one run for faster delivery
  • Make files shareable instantly to speed reviews
  • Scale to hundreds of files by feeding a URL list

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive and Google Docs. See the Tools Required section above for links to create accounts with these services.
  3. Open the Find and Copy Template node in n8n and create a new Google Drive credential. Click Create new credential, follow the on screen steps to allow access, then save and test the connection.
  4. Open the Find Image ID and Replace Image nodes and create a Google Docs OAuth2 credential. Click Create new credential, follow the on screen steps to grant access, then save and test.
  5. In the Image URL set node, enter a test image URL or map your data to a field named url. Keep the field name url so the HTTP steps can use it.
  6. If you want a fresh file each run, paste your template file ID in the Google Drive copy node. Confirm it outputs a documentId to the next step.
  7. If you are updating a single file, skip the copy node and set a fixed documentId in the Find Image ID request so it points to your existing document.
  8. In the Find Image ID request, confirm the URL uses the documentId from the previous node. Run once and check that the response includes image IDs.
  9. In the Replace Image request, set imageObjectId to the inline image path returned earlier. Use the inlineObjectId for single images or the positionedObjectIds path when there are multiple images.
  10. In the Make Shareable step, choose the permission you want. Use reader for view only or writer if collaborators will edit.
  11. In the Docx and PDF download steps, set file names and confirm the fileId is coming from the share step. Choose a folder or let n8n store the files.
  12. Click Execute workflow. Check Google Drive for the new file, confirm the image changed, and verify the Docx and PDF downloads saved correctly.
  13. Troubleshoot: If the image does not change, verify the imageObjectId path and that the template contains an actual image. If you see 403 errors, review Google credentials and sharing. If downloads fail, confirm fileId is passed between nodes and that the image URL returns a valid image.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Docs

Sign up

Free: $0, Google Docs API usage at no additional cost (quota limits apply)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

Credits:
Made by Simon at automake.io

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.