Adobe CQ / AEM

Why do AEM and Kapost Integrate

Once content in Kapost is ready, it can be “published” to a third-party system like a CMS or social platforms for distribution. The integration between Adobe Experience Manager and Kapost allows HTML content to be pushed from Kapost to AEM complete with its metadata and images. In return, Kapost receives the publish URL--the URL at which that content has been made available--from AEM. Subsequent updates to that content in Kapost and republishes will update the same post in AEM.

(Note: Changes to content directly in AEM after publish are not reflected in Kapost. In other words, edits to content in AEM or changes in contents’ published URL are not synced back to Kapost. If edits are made in AEM and content is republished, the AEM changes will be lost.)

Technical Documentation

*note - additional technical details can be found here

Before content can be published from Kapost to AEM, a Kapost admin must configure a connection between the two. At a high level, configuration involves (1) establishing a connection between the two platforms, (2) specifying where content should be placed in the Adobe Content Repository (CRX), (3) defining and mapping custom fields and other optional values, (4) defining constants, and (5) setting up image publishing. This document will guide you through those steps, below. Additionally, if access to your AEM is limited to certain IP addresses, see the section near the end on connecting Kapost to AEM using an IP whitelist.

1.   Establishing a Connection

For this section, you will need:

  • An admin account in Kapost
  • The URL of your AEM Publish instance

This is the endpoint of your site--the URL where your site is viewable. By default the Publish instance will run on port 4503, though the port might be different or excluded altogether (if on port 80) in some production environments.

  • The URL of your AEM Author instance

This is the instance where you use credentials to log in to make changes to your site. By default the author instance will run on port 4502.

  • Credentials for your AEM Author instance

This account must have rights to create and edit nodes and activate or replicate content. However, it does not have to be an admin or super-user account.

Creating the connection:

  1. Once logged into Kapost with an admin account, go to the “App Center” listed under Settings in the left navigation bar
  2. Click the “Install more apps” button below the list of current connections
  3. In the Kapost App Center, click on the tile for Adobe CQ5
  4. From the “Select Instance” dropdown menu near the bottom of the expanded Adobe CQ5 tile, select your Kapost instance
  5. You will see the Kapost App Center settings page once again, now with an Adobe CQ5 connection panel open.


Complete each field in the panel with the following information:

  • Name: You may name this connection anything (e.g. “Adobe EM”, “AEM”, “Primary AEM”). The name is purely to distinguish this connection to AEM from other publishing destinations you may have set up.
  • Publish URL: The URL of your AEM Publish instance. This is the endpoint of your site, the URL where your site is viewable. By default the Publish instance will run on port 4503, though the port might be different or excluded altogether (if on port 80) in some production environments.
  • Username/Password: Credentials for your AEM Author instance. This account must have rights to create and edit nodes and activate or replicate content.
  • Author URL: The URL of your AEM Author instance. This is the instance where you use credentials to log in to make changes to your site. By default the author instance will run on port 4502.

The Platform dropdown should show Adobe CQ and you should not have to change this.

  1. Once every field is complete, press “Connect”


Adding the connection to a Content Type:

Once the basic connection has been created, you must configure a Content Type within Kapost to use that connection

1. Still logged into Kapost with an admin account, go to “Content Types & Workflow” listed under Settings in the left navigation bar

2. Select the Content Type that you wish to publish to AEM from the dropdown menu near the top of the page (AEM can be published to from HTML, Document, Any File, Video, Audio, and Photo body types.)

3. Click in the “Primary Destinations” field on that page

4. Select the AEM connection from the list (listed by the name you provided). If the option is disabled in the dropdown menu, the most likely cause is that the Content Type does not have an HTML Body Type. Check the “Body Type” field.

5. Press the Save Changes button

6. Refresh the page (to see additional AEM configuration fields for the next step)


2.            Specifying a Destination in Adobe CRX

Note: This part of configuration deals with fields on the Content Type settings page that only appear after AEM has been added to the Content Type, the Content Type saved, and the page refreshed. If you did not complete these steps, detailed in the previous section, please do so now. After refresh, you may need to reselect the relevant Content Type from the dropdown menu at the top of the page.

Fields in this section may use the following predefined variables:


A unique token, generated from the content’s name and guaranteed to be unique in Kapost, typically used as a unique name for the post in AEM


The title of the content in Kapost


The current day


The current month


The current year


The current date-time (now)


The draft state as “true” or “false”


The type of an image embedded within the body, e.g. “image/png”


The filename of an image embedded within the body, e.g. “pretty_tree.png”


The title of an image embedded within the body, e.g. “Pretty Tree”


The caption assigned to an image embedded within the body, e.g. “Look at this pretty tree!”


The alt text for an image embedded within the body, e.g. “It’s a spruce!”


Binary data for an image embedded within the body


A slug derived from the filename of an image embedded within the body, e.g., “pretty_tree”

%image:{fieldname}:{any property)%

Any of the above image properties (type, name, title, caption, etc.) can be taken from an Image- or File- type custom field by adding the “field name” of a custom field after “image” (each custom field is assigned a field name which may be different from the name shown in the interface; these fieldnames may be found in Custom Field Settings)


More information on image and custom field properties may be found in this help article .


For the steps in this section, you may find it useful to have CRXDE Lite open in your AEM Author instance. To Open CRXDE Lite:

  1. Log into your AEM Author Instance, via the URL, using your credentials
  2. Select “Tools from the menu on the left
  3. Click on the link “CRXDE Lite” in the Granite Operations subsection

If you cannot locate CRXDE Lite, it may be disabled. Contact your administrator for help.


With CRXDE Lite to refer to, back in Kapost follow these steps to specify a destination for content pushed from Kapost:

  1. Scroll down the Content Types & Workflow settings page to the section titled “Adobe CQ Location and Value”


  1. In the “Required Fields” subsection, populate each field according to the table below.

Important Note: Do not begin or end the mapping or paths in these fields with a ‘/’. No forward, leading, or trailing slashes are necessary. In other words, none of the following fields should start or end with a “/”.


The path where content pushed from Kapost to AEM should be placed.


For example, if as in the picture below your content is found at


the value for the Parent field should be



To identify the path for your configuration, in CRXDE Lite look at the tree of nodes on the left side of the window. In that tree, locate the parent of the blog. This is where you want to publish. Most commonly this exists in a folder called “content”.


Example of a configuration that publishes to /content/blog


You may copy the path from the address bar in CRXDE Lite (after clicking on the appropriate node) but remember to remove the leading slash when pasting into Kapost.


This structure of the URL of your final, published blog post.


To determine this structure, find an existing live blog post in CRXDE Lite and examine its URL structure in the address bar. Then, recreate this URL structure from the predefined variables found at the top of this section of the help documentation.


For example, if your content’s URL is structured as your domain followed by the publish year, the publish month, then a slug that is generated from the content’s title, like this

the Permalink field should have the value


Note that the .html extension in that example is only necessary if your instance does not use “pretty URLs”. This format


May also be valid for many sites.


The path to the “Title” property in AEM.


Often, populating this field is as easy as removing “.html” from the end of your permalink and adding “/title”. As Title is a property of the content, the path to the Title will commonly build on the path you entered for the permalink (since it is a property of that node).


To reuse the example above, if my permalink path is


the Title value would likely be



The path to the property that holds the body of the post in AEM.


This is very similar to the Title in that it builds on the permalink. Commonly the value for body removes “.html” from the permalink and appends the name of your body field, often “/text”.


In our previous example, this value is



3. Mapping Custom Fields

Beyond the Required Fields that are sent to AEM (which have been configured already in the section above), you may choose to send some or all optional information to AEM by filling in the fields under “Optional Fields”. Three kinds of additional fields are included in this section:

  • Every Kapost instance will have three optional fields, Publish Date, Author Name, and Author Email
  • If your Kapost instance has the “Tags” or “Excerpt” feature enabled, the Optional Fields section will include entries where those can be mapped to properties in AEM
  • Any Custom Field that has been added to the Content Type (in the Custom Field section higher on the Content Types & Workflows settings page) will also be present under Optional Fields where it can be mapped to a AEM property. (If you have added Custom Fields that are not shown under Optional Fields, make sure you have saved changes to the Content Type and refreshed the page.)

As with the Title and Body required fields above, you should construct each value for optional fields as a complete path to the desired property (being sure to leave off the leading slash). Also as with those required fields, the value for each of these Optional Fields is likely to be derived from the permalink value. Each Optional Field for which a path has been defined will be populated with the appropriate value when content is published to AEM.

4. Defining Constants

The two mandatory constants are: jcr:PrimaryType and sling:resourceType. Again, the structure of this path depends on how many levels (or variables) there are in your permalink. If you have three variables: %month%, %year%, and %slug%, you will need to create a jcr:PrimaryType for each level of these variables.

For example, given the Permalink structure “%month%/%year%/%slug%.html”, your constants will look like this:


5. Publishing Images From Kapost

There are two ways to publish images from Kapost to Adobe CQ. You can either (1) embed images directly in the content you are publishing or (2) include images as attachments to the content you are publishing.

Note: Once an image is published from Kapost, the media file itself will transfer from Kapost to your Adobe CQ instance and will be hosted from there. You can also configure Kapost to push your images to central Adobe CQ DAM for hosting if desired.

Embedding Images

To embed an image in your content directly, click the Insert/Edit Image in Kapost’s WYSIWYG editor.

To publish an embedded images to Adobe CQ, Kapost requires users to configure certain constant settings on the Adobe CQ content type settings page to ensure the embedded images are mapped to the appropriate area within Adobe CQ. For example, let’s assume we are publishing content to the following slug:


You would need to set up the following constants:





















The first six constants will ensure all embedded images are transferred to an images folder within content/blog in your Adobe CQ instance. The last three constants will map the title, caption, and alternate text you included within Kapost’s image editor to Adobe CQ.

If additional custom fields are required for embedded images (in addition to title, caption, etc.), users can create custom fields on Kapost’s Settings/Custom Fields page, add them to the Adobe CQ content type, and then create the appropriate mappings for each custom field under the Optional Fields section on the content type settings page.


Embedding Files

To embed a file, follow the instructions above, using %file% rather than %image%. Currently, %file% supports two attributes: name and type (content type). 


Attaching Images

To attach a featured image, banner image, or other image to your content, click on the Select an Image button. Note you will need to create a custom image field and add it to your content type to make this button appear. A separate button is required for each image type you plan to send over (i.e. one for featured image, one for banner, etc.).

Once you have all of this set up, it’s time to test your connection. Create a new piece of content and publish to AEM!


Connecting through a firewall

Oftentimes AEM connections are limited to a whitelisted set of IPs as a security precaution. For that case, Kapost can be configured to connect to AEM through a proxy with a static IP address, which can then be added to your AEM whitelist. If you require a static IP for whitelisting purposes, please contact your Kapost customer success manager.


Learn how to publish images from Kapost to Adobe CQ here.


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request