Linking Listmonk as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

PostHog Wizard hedgehog

The Listmonk connector syncs data from your self-hosted Listmonk instance into the PostHog data warehouse. You can then analyze your subscribers, lists, campaigns, templates, bounces, and daily campaign analytics alongside your product data.

Prerequisites

You need a Listmonk instance that PostHog can reach over the public internet:

  • The instance URL must use https. PostHog Cloud does not accept an http URL, because the API token would cross the internet in clear text.
  • The URL must not resolve to an internal or private IP address.

You also need a Listmonk API user. To create one:

  1. In Listmonk, go to Admin > Users and create a new API user.
  2. Give the user a role with these permissions:
    • subscribers:get_all
    • lists:get_all
    • campaigns:get_all
    • templates:get
    • bounces:get
    • campaigns:get_analytics
    • subscribers:sql_query, only if you want to sync the subscribers table incrementally
  3. Copy the API token of the user.

The lists:get_all permission is always necessary, because PostHog reads your lists to check the credentials when you link the source. The campaign_analytics table also needs campaigns:get_all, because PostHog first gets the list of campaigns.

If you do not want to sync a different table, you can leave out its permission. Then deselect that table when you link the source.

Inbound IP addresses

We use a set of IP addresses to access your instance. To ensure this connector works, add these IPs to your inbound security rules:

USEU
44.205.89.553.75.65.221
52.4.194.12218.197.246.42
44.208.188.1733.120.223.253
3.41.215.48/283.40.9.80/28

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When you link Listmonk, you need:

  • Instance URL – the address of your Listmonk instance, such as https://listmonk.example.com. Do not add /api to the end.
  • API user – the username of the API user that you created.
  • API token – the token of that API user.

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

The subscribers table supports incremental sync on the updated_at field. Incremental sync sends a SQL filter to the Listmonk API, so the API user needs the subscribers:sql_query permission.

All other tables are full refresh only.

Configuration

OptionTypeRequired
Instance URLtextYes
API usertextYes
API tokenpasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
subscribers

Subscribers of the Listmonk instance with their attributes and list subscriptions.

Incremental, Full refreshupdated_at—
lists

Mailing lists of the Listmonk instance.

Full refresh——
campaigns

Campaigns with their send counts. The message body is left out.

Full refresh——
bounces

Bounces recorded against subscribers, with the campaign that caused them.

Full refresh——
templates

Campaign and transactional email templates of the Listmonk instance.

Full refresh——
campaign_analytics

Daily view, click and bounce counts per campaign.

Full refresh——

The campaign_analytics table holds the daily view, click, and bounce counts for each campaign. Each row has a type column with the value views, clicks, or bounces.

Troubleshooting

  • Listmonk rejected the API user or token – the API user or token is not correct. Create a new token under Admin > Users in Listmonk, then reconnect the source.
  • 403 Forbidden on a table – the role of the API user does not have the permission that the table needs. Grant the permission from the prerequisites, or deselect the table.
  • The instance URL resolves to an internal or private IP address – PostHog cannot connect to a private network. Use the public URL of your instance.
  • The instance URL must use https – change the URL to start with https://, then reconnect the source.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?