Objective: I am trying to automate a process where a new spreadsheet row triggers the creation of a dynamic QR code using QR Tiger, which then leads to the generation of a Google Document from a template. In this Google Doc, it now just comes as a dynamic URL to a QR png. I wish to replace the URL placeholder with the actual QR code image (sourced from the QR code URL).
Problem: While I have successfully set up the first three steps of my Zap (New Spreadsheet Row -> Create QR Code -> Create Document from Template), I am struggling with the step where the URL in the Google Document is replaced with the actual QR code image.
I've attempted to use Google Apps Script to detect the URL placeholder and replace it with the QR code image, but I consistently giving me errors. Not sure how to solve this problem any maybe there’s a smarter way.
Here's a brief overview of my Zap:
- New Spreadsheet Row in Google Sheets: Trigger.
- Create Dynamic QR Code (URL) in QR Tiger: Generates a QR code URL like “https://qrtiger.com/qr/TNL5.png”.
- Create Document from Template in Google Docs: Uses a A4-template that has a placeholder for the QR code URL.
- POST in Webhooks by Zapier: This is where I'm attempting to trigger the Google Apps Script to replace the URL with the image. (Maybe there’s a smarter and easier way?)
I've confirmed that the placeholder URL is present in the newly created Google Document. Despite various attempts and modifications to the script (written by ChatGPT), I'm unable to make this work.
Would appreciate any guidance, insights, or alternative solutions to achieve this. Thank you in advance!
Best answer by Troy TessaloneView original