For the complete documentation index, see llms.txt. This page is also available as Markdown.

PostHog

Capture product events from PostHog and use them to trigger real-time campaigns in Humanic.

Here's the fully rewritten PostHog integration page — technically deep, brand-aligned, and AEO-optimised:


Connect PostHog to Humanic

PostHog tracks what users do inside your product. Humanic turns those actions into emails. Connect the two and every event PostHog captures — a signup, a feature interaction, a drop-off — can automatically trigger a personalised campaign in Humanic, in real time.

No exports. No manual segments. No lag.


What this integration does

PostHog streams your product events to Humanic via webhook. Humanic listens for those events and uses them to fire campaigns, personalise email content, and power lifecycle flows — all based on what your users are actually doing in your product.

Once connected:

  • A user signs up → Humanic sends your onboarding sequence

  • A user drops off mid-flow → Humanic sends a re-engagement email

  • A user hits a pricing page three times → Humanic sends a conversion nudge

  • A user hasn't used a feature in 14 days → Humanic sends a reactivation email

The key difference from broadcast campaigns: these emails go out because of what a specific user did, not because you manually built a segment.


Before you start

You'll need:

Requirement
Where to find it

Access to your PostHog project

Permission to create Data Pipeline destinations in PostHog

PostHog project settings → Members

Your Humanic workspace set up with a sending domain configured

💡 If you haven't set up a sending domain yet, do that first. Events can flow in before your domain is verified, but campaigns won't send until it is.


How to set it up

Step 1 — Get your webhook URL from Humanic

  1. In Humanic, go to Integrations → PostHog

  2. Click Connect

  3. Copy the webhook URL — you'll paste this into PostHog in the next step

Keep this tab open. You'll need to come back to it.


Step 2 — Create a webhook destination in PostHog

PostHog sends data to external tools through its Data Pipelines feature. Here's how to point it at Humanic:

  1. Open your PostHog project

  2. In the left sidebar, click Data pipelines

  3. Click + New → Destination in the top-right corner

  4. Search for "Webhook" and click + Create

  5. In the Webhook URL field, paste the URL you copied from Humanic

  6. Click Create & Enable

PostHog will now send a POST request with a JSON payload to Humanic every time a matching event fires.

Important: PostHog will disable your destination automatically if it receives repeated 5xx errors from Humanic's endpoint or if response times are consistently slow. Make sure your Humanic workspace is active before enabling.


Step 3 — Choose which events to send

You don't want to forward every event PostHog captures — that creates noise and makes it harder to build clean campaigns. Be deliberate here.

Go to the Filters section of your new webhook destination in PostHog. You can filter by:

  • Event name — only send specific events (recommended for most setups)

  • Event properties — e.g., only send checkout_started when cart_value > 50

  • Person properties — e.g., only send events from users on the free plan

High-signal events to start with:

Event
What it means
Campaign to trigger

user_signed_up

New user created an account

Onboarding sequence

onboarding_step_completed

User progressed through setup

Step-specific nudge

feature_first_used

User activated a core feature

Feature adoption email

session_ended

User left without completing a key action

Drop-off recovery

subscription_upgraded

User converted to paid

Welcome to paid / upsell

inactive_7_days

No session in 7 days (if tracked)

Re-engagement email

💡 Start with 3–5 high-intent events rather than sending everything. You can always add more once the core flows are working.


Step 4 — Verify field mapping in Humanic

When PostHog sends an event, it arrives in Humanic as a JSON payload. Humanic needs to know which fields map to which contact and campaign properties.

Go back to Humanic → Integrations → PostHog and confirm the following mappings:

PostHog field
Maps to in Humanic
Why it matters

distinct_id

User ID

Identifies the contact

properties.email

Email address

Required to send emails

event

Event name / campaign trigger

Determines which campaign fires

properties.name

Contact name

Used for personalisation tokens

properties.*

Campaign variables

Available as {{variable}} in email copy

⚠️ properties.email is the most critical field. If an event arrives without an email address and no existing contact match on distinct_id, Humanic cannot send to that user. Make sure your PostHog $identify calls include email as a person property.


Step 5 — Test the connection

Before going live, send a real test event to confirm everything is wired up correctly.

  1. In PostHog, open your webhook destination

  2. Click Start testing (or the equivalent test button in your PostHog version)

  3. Trigger an event in your product or PostHog's event testing tool

  4. Back in Humanic, go to Integrations → PostHog → Event Log

  5. Confirm the event appeared with the correct fields mapped

If the event doesn't appear within 30 seconds, check the troubleshooting section below before activating.


Step 6 — Activate

Once your test event confirms the mapping is correct:

  1. In Humanic, click Activate

  2. In PostHog, confirm the destination status shows Enabled

Your integration is live. From this point, every matching event PostHog captures will flow to Humanic in real time.


How it works under the hood

Understanding the data flow makes it easier to debug when something doesn't behave as expected.

The whole pipeline — from user action to email in the inbox — typically completes in under 60 seconds.


Real-world campaign examples

Onboarding activation Trigger: user_signed_up Flow: Day 0 welcome → Day 2 setup nudge → Day 5 feature spotlight → Day 10 check-in

Feature adoption Trigger: dashboard_first_viewed or any first-use event for a core feature Flow: Single email with a "here's how to get the most out of this" message. Personalise with {{feature_name}} pulled from event properties.

Drop-off recovery Trigger: checkout_started without a follow-up checkout_completed event within 24 hours Flow: Single recovery email with a direct link back to the checkout

Paid conversion Trigger: pricing_page_viewed (3rd occurrence) or trial_day_12 Flow: Conversion email with social proof and a time-limited offer

Re-engagement Trigger: Custom user_inactive event fired server-side after 14 days of no sessions Flow: Re-engagement sequence focused on a feature the user hasn't tried yet


Best practices

Be specific with your event taxonomy. Inconsistent event names (user_signup vs UserSignedUp vs signup_complete) mean your triggers fire inconsistently or not at all. Agree on a naming convention before instrumenting — lowercase with underscores is the most common standard.

Always include email in your identify calls. PostHog's $identify call is where you attach person properties like email and name to a distinct_id. If you identify users before you start sending events, Humanic will have the email it needs on every subsequent event from that user.

Use filters to send only what you need. Forwarding every event creates noise in Humanic and can slow down your destination's processing. Use PostHog's filter panel to scope your webhook to the events that actually trigger campaigns.

Map custom properties as campaign variables. Any property you include in an event — plan_name, company_size, feature_used — is available as a personalisation token in Humanic. The more context you pass through, the more relevant you can make the email.

Test in staging first. Most PostHog setups have a separate project for staging. Connect that project to Humanic first and run your full test flows before pointing your production project at it.


Troubleshooting

Events aren't appearing in Humanic

Check the webhook destination is enabled in PostHog. Go to Data Pipelines → Destinations. If the status shows Disabled or Quarantined, the destination was likely auto-disabled due to errors. Re-enable it and check the error logs.

Check the webhook URL is correct. Go to Humanic → Integrations → PostHog and confirm the URL hasn't changed. If you regenerated it, update it in PostHog too.

Confirm the event is actually firing. In PostHog, go to Activity or use the Live Events view to verify the event is being captured at all. A common issue is instrumenting the event on the client but missing server-side events that matter.


Emails aren't sending even though events are arriving

Check that properties.email is present in the event payload. In Humanic's event log, click on a received event and inspect the raw payload. If email is missing, update your PostHog instrumentation to include it.

Check that a campaign is actually configured for that event. Receiving an event in Humanic doesn't automatically trigger an email — you need a campaign set up with that event as its trigger.

Check your sending domain is verified. Go to Humanic → Domains. A domain with a Pending or Failed status won't send.


Users are receiving duplicate emails

Check for multiple webhook destinations pointing at Humanic. In PostHog's Data Pipelines view, search for destinations with your Humanic webhook URL. If there are two, disable one.

Check for overlapping campaign triggers. If you have two campaigns both triggered by user_signed_up, both will fire. Review your campaign triggers in Humanic and consolidate where needed.


PostHog disabled my destination automatically

PostHog auto-disables destinations that return 5xx errors or respond too slowly. Common causes: Humanic workspace is paused, webhook URL has changed, or a temporary infrastructure issue. Re-enable the destination in PostHog and monitor the Metrics tab for error rates.


Frequently Asked Questions

Does this integration work with PostHog Cloud and self-hosted PostHog? Yes. The webhook destination works identically on both PostHog Cloud and self-hosted instances. The setup steps are the same.

Does Humanic create a new contact if a user hasn't been imported yet? Yes. If Humanic receives an event with a valid properties.email that doesn't match an existing contact, it creates the contact automatically and adds them to the relevant campaign.

Can I use PostHog person properties (not just event properties) in Humanic emails? PostHog's webhook payload includes the person object, which carries the latest person properties at the time the event is processed. Map any person property you need in Humanic's field mapping configuration.

Is there a limit on how many events Humanic can receive from PostHog? Humanic doesn't impose a hard cap on incoming events. PostHog will throttle or disable destinations that respond slowly, so if you're sending very high event volumes, consider filtering aggressively at the PostHog side.

Can I send the same event to multiple campaigns? Yes. One event type can trigger multiple campaigns in Humanic. Manage campaign overlap carefully to avoid users receiving multiple emails for the same action.


Last updated