Create Personalized Images from Google Form Responses
With Document Studio, you can create dynamic, personalized images with data from Google Form responses. You can create social media posts, quotes, unique banners, and other dynamic images automatically. It is also possible to generate multiple images from a single form response. The generated images are automatically saved to Google Drive for easy collaboration.
Instagram Quote Generator
For this example, we have a Google Form that will generate unique social media images for posting on Twitter and Instagram. The form requires the author's name, any quotation and a file upload field where the respondent can upload an image of the quote author.
When the form is submitted, a square image is generated and saved to your Google Drive. You can also choose to email the file or share it with your team via Google Drive.
Create Image Template in Google Slides
Create a new Google Slide presentation and add a new slide with variable fields. For instance, if you wish to include the quotation text, you can create a new text box and add {{ Quotation }}
in the box.
You can use the Embed Image syntax with mode=CROP
to create images that are resized to to completely fit the container without breaking the aspect ratio (similar to object-fit:cover
in CSS).
Resize Slides Template
It is recommended that you resize the Google Slides template such that your slide dimensions match exactly the dimensions of the image you are creating. For instance, if you wish to create a 800x800 pixel image for Instagram post, go to the File menu of Google Slides and select Page Setup. Choose Custom from the dropdown, select unit as Pixels and specify the width and height as 800.
Here's how our slide template looks like:
Generate Images from Google Forms
Install the Document Studio add-on and launch the add-on inside your Google Forms. Give your workflow a descriptive name, like Image Generator
, and click on Continue
to move to the conditions page.
Configure Image Generator
Click Continue
and then choose Create File
from the list of available tasks. Here you need to pick the Google Slides template that you created in the previous step for the Document Template field.
Specify a folder in Google Drive where the generated images are uploaded. You can also chose to save the images in custom folders that are dynamically created from user's answers in the Google Forms.
Choose Image
as the export format.
Please note that only the first slide of the presentation template will be converted to image and not the entire deck.
You may also use Scriptlets in any of the input text field to generate dynamic content.
Activate the Workflow
Click the Preview
button to create a preview image based on data in the second row of the response Google Sheet. You can open your Google Drive to view the generated image file.
Click Done
to locally apply your changes. On the next screen, turn on the Run on Form Submit
option and the workflow will run whenever a new Google Form submission is received.
Click the Save
button and the workflow will now appear in the workflow dashboard where you can edit, delete or manually run the workflow.
You can also embed dynamic QR Codes, Google Drawings, Barcodes, Images, Charts and Graphs in the presentation slides.
Here's a dynamic image generated from the Google Slides template when a form was submitted.