Use Data Merge to create digital ads in Adobe InDesign
- Angelo Montilla

- Jan 11, 2023
- 3 min read
Updated: Jun 24, 2023

When designers are tasked with creating digital ads or social media posts, it can often be a painstaking process. It can be automated and simplified using a super useful tool called Data Merge in Adobe InDesign.
In this tutorial, we'll go over how to use Data Merge to import a data source file and create three digital ads, which will all be the same size.
What's cool about Data Merge is not only does it recognize text, but you can also use this to import images as well.
Let me show you how this works.
Before even beginning, you should have a data source – preferably saved as a Comma Separated Values file, or CSV for short. The commas are important as they are what will separate the category values once imported in InDesign.
I will be using Google Sheets for this, but Microsoft Excel will work just fine for this tutorial as well.
In the lesson downloads, you will find a text file with the copy you will need to add to the Google Sheet. This text file is called Codely Data Text.
Populating Google Sheets Document
The Google spreadsheet will have four categories: Ad Copy 1, Ad Copy 2, CTA and @images.
Copy the text from the text file and paste into the respective fields, as shown in the image below.
Under the @images column, type / and the folder name that is saved on your computer – in my case, it's called images, so mine will be /images.
After /images, type the file name extension. In my case it's Coding_1.png, so the full naming convention in this record will be /images/Coding_1.png. The second and third will be the same, only use Coding_2.png and Coding_3.png.
Here's a look at how the Codely Data spreadsheet will look like:

Once you have completed the spreadsheet, go to File > Download and save it as a CSV, as mentioned previously. It's also important to save this file in the same folder where your working InDesign document lives on your computer.
This will make it easier for InDesign to recognize the data source and match it with the images, which should also be in this folder.
Great, let's jump to InDesign and import the CSV file using Data Merge.
Firstly, I like to design the first digital ad for sizing purposes and save all the styles for the copy and headers. This is how the first digital ad will look like:

Once you have the design just the way you want, delete the copy in each frame and remove the image from the frame. Remember, all the info will be pulled from the data source so all we need is the placeholders.
Import Data Source
Once all the content is removed, go to Window > Utilities > Data Merge.
In the Data Source Options, click Select Data Source.
Locate the CSV file that was saved from Google Sheets and click Open.
In the Data Merge, you will notice that the categories from the CSV file are listed in the panel. Select on the first text frame in the creative and click Ad Copy 1.
Select on the second text frame in the creative and click Ad Copy 2.
Select on the third text frame in the creative and click CTA.
Right-click the image frame and go to Fitting > Frame Fitting Options.
Set the Fitting dropdown to Fill Frame Proportionally and in the Align From option, click the bottom centre point. You won't be tied to this fitting, but this is a good starting point to ensure the images fit the bottom of the frame you created.
Here's a visual look at the steps explained above:
You're probably wondering, 'Where is the content? Why do I only see the category fields and no image at all?"
All great questions, mind you.
In order to see the content in action, you have to click the Preview option in the bottom left of the Data Merge panel. This will display all the data source text and images. Use the right and left arrows on the right to scroll through the content.

Finally, you can click the icon in the upper right corner of the Data Merge window, which will launch the Create Merged Document window.
Before clicking OK, go to the Options tab and in the Image Placement, also set this to Fill Frames Proportionally. Also, click the Center to Frame option.
Keep in mind that you are still able to resize and image content once the merged document is created, but think of this as another safeguard for having the images fit the frame.
Once the merged document is created, have a look, all three pieces from the data source are on different pages.
As a final step, go change the second background colour to #3e74de and the third to #20aca8.
Here is the final product!


