Itâs Holiday Card season! But my hand hurts just thinking about addressing all those envelopes, and I canât remember the last time I bought stampsâŚletâs be real, ainât nobody got time for that.
Fortunately, I happen to work for a company that sends direct mail programmatically. Many developers integrate with Lob using one of our SDKs in their preferred programming language, but we recently launched our low-code Campaigns and I thought Iâd give it a whirl.
âThe following is a step-by-step tutorial so you too can create your own full-color 6âx9â holiday postcard (to be printed and mailed by Lob) for under a dollar each.
Here is a sample of the card we will create.

Select and prep your photos
Choose two of your favorite photos: one landscape (for the front), one portrait (for the back). Use your photo editing tool of choice to format each correctly; I used Preview on my Mac.
To ensure they print at the highest quality they should be :
- 5x7 inches (1500 pixels x 2100 pixels in portrait and 2100 pixels x 1500 pixels in landscape),
- at a resolution of 300 pixels per inch,
- and saved in an RGB color profile.
(If you are snagging photos from your iPhone, see the Appendix for a cheat sheet.)
Label each clearly FRONT and BACK. You will then need to host your images somewhere; I used a free account at imgbb.com. Once uploaded, you will use the links to these images when you prep your data.
Prep your data
1. You will need the HTML for the front and back of the postcard (weâll cut & paste it into Lob in a later step). This is the creative for your mailpieces, and like in email, HTML is what allows for personalization.
- The HTML may open as a web page, but you want to display the HTML so you can cut & paste it into Lob. Right-click on the page and select the menu item that allows you to view the source. (In Internet Explorer, the menu item is âView Source.â In Mozilla Firefox and Chrome, the menu item is âView Page Source.â)
- If the file downloads, you can open the .html file in a text editor (we recommend the free tool Sublime Text) so you are ready to cut & paste.
2. Next, you will prep your address data, or your audience file. Make a copy of this spreadsheet and input your data:
- Do not modify or add any column headers!
- Add the full name in the `name` column
- Add the address data (make sure that leading zeroes arenât being dropped and that the state code is used)
- Replace the âLorem ipsumâ in the `message` column with your own personalized message. Make sure that the message fits within the space by being shorter than the placeholder examples (about 65 characters) You can test your holiday card messaging HERE.
- Add the links to your front and back images to every row in the `image_front` and `image_back` columns (links should look something like this: https://i.ibb.co/fpJ84Js/front.png)
3. Download your address file as a .csv.
Create your HTML templates
Now you are ready to create your postcards in the Lob dashboard.
1. First, you will need to sign up for a free Lob account.
2. Once you have registered you will be taken to the dashboard. In the Developer tier there is no cost to test out the Print & Mail APIs, but if you want to send live requestsâand have a postcard printed and mailedâit will currently run you about $0.92 for a 6"x9" postcard (inclusive of printing and postage). Payment information will need to be entered in the dashboard Billing -> Payments.
3. Create & save HTML templates for the Front and Back of your postcard
- On the left menu bar, Navigate to HTML Templates.
- Make sure Live is highlighted!
- Click on âCreateâ
- Name this âFront Templateâ and paste in the HTML code for the front. Click âCreateâ to save.
- On the left menu, click HTML Templates to go back to the main template screen (You should see your new Front template there under Live templates.)
- Once again, ensuring Live is highlighted, click âCreateâ again. Name this âBack Templateâ and paste in the HTML code for the back. Click 'Create' to save.
- Click HTML templates to go back to the main template screen; you should see your new Back template there under Live templates.
** Make sure you see both templates are listed when Live is highlighted before proceeding.**
Create and send your postcards
In the Lob dashboard, click on âCreate Campaignâ
Step 1: Configure Campaign
1. Enter a Name and Description
2. Campaign Type: Marketing
3. Mail Type: Postcard; Size: 6x9
4. Postage references: Return address is not required; Select postage: Up to you, note the listed expected delivery timesâ
5. Cancellation Window: This is set at 5 minutes; you will not have the option to edit on a Developer plan
6. Campaign-Level Metadata: Optional
Step 2: Add Audience
1. Upload your .csv file (created during prep stages), or drag and drop it into the dashboard
2. Map required address variable: These are mapped automatically, click Next Step
Step 3: Choose Creative
1. Under âPostcard Frontâ, select the HTML Template you created from the dropdown menu (note the previews will not show your images or messages as they are not mapped yet). Youâll see an option to include a QR code; you can skip this.
2. Under âPostcard Backâ, select the HTML Template you created from the dropdown menu (note the previews will not show your images or messages as they are not mapped yet). Youâll see an option to include a QR code; you can skip this.
3. Connect your creative to your audience:
- Merge variable strictness: Ignore
- Connect your creative to your audience: map your merge Variable from HTML to the appropriate column in the CSV: {{img_front}} to img_front, {{img_back}} to img_back, {{message}} to message
- Creative Proof: Generate a proof to see an example of a rendered postcard. If something isn't right you can return to previous steps.
Step 4: Review Campaign
If all looks correct, click âPlace Orderâ and your holiday cards will be on their way! You can view your postcards under Campaigns or Postcards (Live) in the Lob dashboard. Once you place your order, after 5 minutes, the live request will be sent to Lob; your postcards will be created and mailed, and you will be charged.
Wrap up
Lob was started by two developers who needed to solve a problem, and direct mail APIs were the answer; the goal was to make sending mail just as easy as sending an email. This is a fun personal use case, but Lob is meant to automate direct mailâpostcards, letters, checks, self-mailers, and moreâat scale. Just like email, each mailpiece created with Lob can be highly personalized (and automated!). Mail Analytics are available for each mailpiece to track each postcard along its journey to delivery (and if you include a QR code, you could even track the open rate). Contact us if you want to learn more.
â
Appendix: How to prep a photo
- Email/Download a photo from your iPhone on your computer. The following steps are shown in the Preview app (Mac) but are a good guideline for any editing program.
- Select your back photo (portrait orientation). Under Tools, select Adjust Size.

- Change Resolution to 300 pixels/inch.
- For this photo (portrait orientation): Change Width to 5 inches, and Height will automatically change. Alternatively, update the Height to 7, and the Width will change. Itâs highly likely you wonât end up with a perfect 5x7; thatâs ok: Change the field that results in one of the measurements being slightly too big; you will crop in the next step).

- Under Edit, Select All. Drag the dotted line to crop the image to the necessary 1500x2100 (as you move the line, the measurements will display; exaggerated below).
.png)
- Under Tools, Assign Profile select Generic RGB. (Photos must be saved in RGB.)
- Make sure your photo is named clearly as the BACK. Save!
- Repeat these steps for the FRONT photo, but in landscape orientation (7â wide x 5â high, 2100 pixels x 1500 pixels).
â
FAQs






