LIVEAI Bootcamps · May 2026 · 🇫🇷 CET
Resources · Integrations · n8n FREE · 2026PostHog logo featuring a stylized pink pig icon and the company name in black text

POSTHOG n8n INTEGRATION: AUTOMATE POSTHOG WITH N8N

Looking to automate PostHog with n8n? You're in the right place. The PostHog n8n integration gives you access to 5 powerful actions to streamline your product analytics workflows without writing a single line of code.

PostHog is a powerful open-source product analytics platform that helps you understand user behavior, track events, and build better products. By connecting it to n8n, you can automatically send tracking data from any application in your tech stack, create user identities on the fly, and ensure your analytics pipeline captures every critical interaction.

Whether you need to track page views from your CRM, create events from form submissions, or sync user identities across platforms, this integration transforms PostHog from a standalone analytics tool into a fully connected data hub. Let's explore how to set it up and leverage each available action.

Need help

Need help automating Posthog with n8n?

Our team will get back to you in minutes.

Reply within 1 business hour
Why automate

Why automate Posthog with n8n?

The PostHog n8n integration gives you access to 5 distinct actions covering the core functionality of PostHog's tracking capabilities: creating events, tracking pages and screens, managing user identities, and creating aliases. This means you can build comprehensive analytics workflows that capture data from virtually any source.

Significant time savings: No more manual event tracking or copy-pasting user data between systems. Set up smart rules that automatically fire PostHog events whenever something happens in your connected apps—a new lead in your CRM, a support ticket closed, a payment processed. Your analytics stay up-to-date without lifting a finger.

Improved data accuracy: Human error is inevitable when manually tracking events. With n8n automating your PostHog data flow, every interaction gets captured with the correct distinct ID, properties, and timestamps. No missed events, no typos, no forgotten tracking calls.

Seamless multi-platform integration: Connect PostHog to over 400 applications in n8n's ecosystem. Track Stripe payment events directly in PostHog. Create user identities when someone signs up via Typeform. Log page views from your headless CMS. The possibilities are virtually unlimited: CRM sync, support ticket analytics, marketing funnel tracking, and beyond.

Credentials

How to connect Posthog to n8n?

  1. !
    1 step

    How to connect Posthog to n8n?

    1. 01

      Add the node

      Connecting PostHog to n8n requires your PostHog API Key and Host URL. Here's how to set it up:Access your PostHog project settings: Log into your PostHog account and navigate to Project Settings. You'll find your API key under the "Project API Key" section.Copy your API credentials: Grab both your Project API Key and your PostHog instance URL (either app.posthog.com for cloud or your self-hosted URL).Create a new credential in n8n: In your n8n workflow, add a PostHog node and click on "Credential to connect with". Select "Create New" and enter your API key and host URL.Test the connection: Save your credentials and run a test event to confirm everything is properly connected. You should see the event appear in your PostHog dashboard within seconds.Start building: Once authenticated, you have full access to all 5 PostHog actions in your workflows.

    Posthog credentials
    TIP
    💡 TIP: Use a dedicated API key for your n8n automations rather than your personal key. This way, you can easily revoke access or track API usage specifically for automated workflows without affecting other integrations or team members.
Need help

Need help automating Posthog with n8n?

Our team will get back to you in minutes.

Reply within 1 business hour
Actions

Posthog actions available in n8n

  1. 01
    Action 01

    Create Event

    The Create Event action is the backbone of PostHog tracking in n8n. It allows you to send custom events to PostHog from any trigger in your workflow, giving you complete flexibility over what user interactions and system events get logged in your analytics.

    Key parameters:

    • Event (required): A text field where you define the name of the event being tracked. Use descriptive, consistent naming conventions like purchase_completed, feature_activated, or support_ticket_opened.
    • Distinct ID (required): The unique identifier for the user associated with this event. This is crucial for accurate user behavior tracking and should match the ID you use across all your PostHog integrations.
    • Additional Fields: Optional key-value pairs that add context to your event. Add properties like plan_type, revenue_amount, referral_source, or any custom data relevant to your analysis.

    Use cases:

    • Track subscription_upgraded events when a Stripe webhook fires
    • Log form_submitted events from Typeform responses with form field data as properties
    • Record task_completed events from project management tools like Asana or Monday.com
    Create Event
  2. 02
    Action 02

    PostHog Track Page

    The Track Page action records page view events in PostHog, essential for understanding user navigation patterns and content engagement. This action is particularly valuable when you're tracking page views from server-side applications or external systems that don't have PostHog's JavaScript snippet installed.

    Key parameters:

    • Name (optional): A text input field where you specify the name of the page being tracked, such as "Product Page", "Checkout", or "Blog Article". If left empty, you can use expressions to dynamically pull the page name from incoming data.
    • Distinct ID (optional): The unique identifier for the user viewing the page. While optional, providing this ensures accurate user journey mapping.
    • Additional Fields: Add custom properties like URL, referrer, UTM parameters, or page category. This section accepts key-value pairs and is invaluable for detailed page analytics.

    Use cases:

    • Track page views from headless CMS webhooks when content is accessed
    • Log documentation page visits from your knowledge base API
    • Record landing page views with full UTM tracking from marketing automation platforms
    PostHog Track Page
  3. 03
    Action 03

    PostHog Track Screen

    The Track Screen action is designed specifically for mobile and application screen tracking. If you're building mobile apps or desktop applications, this action ensures your screen views are properly logged in PostHog with all the relevant metadata.

    Key parameters:

    • Name (optional): The name of the screen being tracked. Use consistent naming like HomeScreen, ProfileSettings, or OnboardingStep3 to maintain clean analytics.
    • Distinct ID (optional): The unique user identifier associated with this screen view. Essential for tracking individual user journeys through your app.
    • Additional Fields: Add custom properties such as screen_category, previous_screen, session_id, or app-specific metadata. Click "Add Field" to define key-value pairs for granular data collection.

    Use cases:

    • Track mobile app screen transitions when your backend receives app analytics
    • Log screen views from React Native or Flutter apps via your API
    • Record kiosk or embedded application screen navigation
    PostHog Track Screen
  4. 04
    Action 04

    PostHog: Create Identity

    The Create Identity action establishes or updates user profiles in PostHog, allowing you to attach properties and metadata to specific users. This is fundamental for user segmentation, cohort analysis, and personalized analytics.

    Key parameters:

    • Distinct ID (required): The unique identifier for the identity being created. This should be consistent with the IDs you use throughout your PostHog tracking—typically a user ID from your database or authentication system.
    • Additional Fields: Add user properties like email, name, plan_type, company, signup_date, or any custom attributes. These properties power PostHog's user profiles and enable advanced segmentation.

    Use cases:

    • Automatically create PostHog identities when users sign up via Auth0 or Firebase
    • Update user properties when CRM data changes in HubSpot or Salesforce
    • Sync user profile information from your database when records are modified

    This action is particularly powerful when combined with event tracking—create the identity first, then all subsequent events with that distinct ID automatically inherit the user context.

    PostHog: Create Identity
  5. 05
    Action 05

    PostHog: Create Alias

    The Create Alias action links multiple identifiers to the same user, solving one of the trickiest problems in analytics: identity resolution. When users interact with your product before and after authentication, their actions may be tracked under different IDs. This action merges those identities.

    Key parameters:

    • Alias (required): The new alias to be created—typically the anonymous or temporary identifier you want to link to the main user profile.
    • Distinct ID (required): The primary user identifier that the alias should be connected to. This is usually the authenticated user ID from your database.
    • Additional Fields: Add custom properties relevant to the alias creation event, such as alias_type, merge_timestamp, or source_platform.

    Use cases:

    • Link anonymous session IDs to authenticated user IDs after login
    • Merge user identities when accounts are consolidated
    • Connect marketing automation IDs to your internal user database for attribution tracking

    💡 Pro tip: Set up an alias creation workflow that triggers immediately after user authentication. This ensures all pre-login activity (landing page views, feature exploration, signup form interactions) gets properly attributed to the authenticated user profile.

    PostHog: Create Alias
You've seen the integration

Build your first workflow with our team

Drop your email and we'll send you the catalog of automations you can ship today.

  • Free n8n & Make scenarios to import
  • Step-by-step setup docs
  • Live cohort + community support

Frequently asked questions

  • Is the PostHog n8n integration free?
    Yes, the PostHog n8n integration is completely free to use. n8n is open-source and can be self-hosted at no cost, while PostHog offers a generous free tier that includes 1 million events per month. For most small to medium projects, you can run a fully functional PostHog n8n automation setup without any subscription fees. If you're using n8n Cloud, you'll need to account for their pricing based on workflow executions, but the PostHog integration itself adds no additional cost. PostHog's paid plans only kick in when you exceed the free tier limits or need advanced features like group analytics.
  • What types of data can I send to PostHog through n8n?
    Through the n8n integration, you can send five types of data to PostHog: custom events (any user action or system occurrence), page views (for web tracking), screen views (for mobile/app tracking), user identities (profile creation and property updates), and aliases (identity linking). Each action supports additional custom properties, so you can attach virtually any metadata—JSON objects, strings, numbers, timestamps, or boolean values. This means you can track everything from simple button clicks to complex multi-step user journeys with rich contextual data.
  • How long does it take to set up the PostHog n8n integration?
    Setting up the basic connection takes about 5 minutes. You'll need your PostHog API key and host URL, which you can find in your PostHog project settings. Once credentials are configured in n8n, you can immediately start building workflows. Creating a simple event tracking automation takes another 5-10 minutes. For more complex setups involving multiple triggers, conditional logic, and data transformation, expect to spend 30 minutes to an hour. The visual workflow builder in n8n makes iteration fast—you can test and refine your PostHog automations in real-time without any deployment cycles. For troubleshooting tips, check our n8n troubleshooting guide.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.