Dynamic images

Integrating dynamic images is possible with HTML templates (for both - letters and postcards) and the main principle stands on top of the custom fields rules.


The images must be hosted on your side (any CRM, hosts like AWS S3, etc.).


Follow the next step to apply dynamic images (if you are using any of the webhooks - skip to the 3rd step)

1. Create an HTML template

You can create HTML via the user interface or edit an existing one from templates page.

See how to create the template here.

2. Copy-paste or write down the HTML files and wrap the dynamic data into the double % signs.


If you are using webhook or letter-webhook , just follow the rules for content of the front_html and back_html fields.

dynamic image as background imagedynamic image as background image

The dynamic image could be either background-image or src value for an img tag:

dynamic image as srcdynamic image as src

Every text within %% will be treated as custom field and filled with a value received from the request.


If you don't use Inkit's UI - follow the same rules for raw html's in the webhook requests.

3. Send webhook request or campaign.

The variables dynamic_img_src and dynamic_background should be present in contact custom data section under each contact details or passed via webhook or letter-webhook (depends on your request type and product).

  "api_token": "{{API_TOKEN}}",
  "template_id": "{{TEMPLATE_ID}}",
  "first_name": "Elon",
  "last_name": "Musk",
  "email":"[email protected]",
  "address_line_1": "1 Rocket Road",
  "address_line_2": "Suite 1",
  "address_city": "Hawthorne",
  "address_state": "CA",
  "address_zip": "90250",
  "address_country": "US",
  "source": "Webhook"

  "dynamic_img_src": "{{LINK_TO_IMAGE}}",
  "dynamic_background": "{{LINK_TO_IMAGE}}"

When send request put the custom fields keys with appropriate values into the data and they will be populated to the html template by name.

4. Check the result of sent mail.

dynamic image as srcdynamic image as src


You can use any variable name for custom data which is not intercept with a general fields described in webhook integration.


We're always happy to help with code or other questions you might have.
Search our documentation, check the help center, or connect with our sales team.
Ask questions to our support team ([email protected]) if you run into any technical roadblock or the links above are not helpful.

Did this page help you?