PostHog
The PostHog piece in ZBrain Flow provides integration with PostHog's product analytics platform. This connector enables you to create events and projects and interact with analytics data directly from your workflows. This piece is ideal for teams looking to enhance their analytics capabilities and maintain consistent data collection across their business processes.
How to Use PostHog in ZBrain Flow?
Step 1: Select PostHog as Your Connection
Click on the '+' button in the Flow and search for PostHog.
Select PostHog.
Decide on the action you need, then select it. ZBrain Flow provides several options:
Create Event – Create events in your PostHog instance.
Create Project – Set up new projects within PostHog.
Custom API Call – Make specialized requests to the PostHog API.
How to Create Event
Step 1: Connect to PostHog
From the ‘Personal API Key' dropdown, click on ‘Create Connection.’
A small window will appear where you need to enter:
A descriptive 'Connection Name'
Your 'Personal API Key' from your PostHog account
Click 'Save' to create the connection.
Step 2: Configure Event Details
In the 'Event name' field, enter a descriptive name for the action you want to create.
From the 'Event type' dropdown, select the category that best describes this interaction.
Step 3: Specify User Identification
In the 'Distinct Id' field, enter the unique identifier for the user performing this action. This could be a user ID, email, or another identifier.
Step 4: Add Event Properties (Optional)
Click 'Add Item' in the 'Properties' section to include additional data points about the event. Each property consists of a key-value pair that provides context about the action.
Step 5: Set Additional Context (Optional)
Click 'Add Item' in the 'Context' section to add environment information. This might include device details, location, or application state.
Step 6: Configure Advanced Options (Optional)
In the 'Message ID' field, you can provide a unique identifier for deduplication.
In the 'Category' field, you can add a higher-level grouping for the event.
How to Create Project
Step 1: Connect to PostHog
To connect to your PostHog account, follow the first step in the "How to Create Event" section above.
Step 2: Define Project Details
In the 'Name' field, enter a descriptive title for your new analytics project.
Step 3: Configure Slack Integration (Optional)
In the 'Slack Incoming Webhook' field, enter a webhook URL if you want to receive notifications in Slack. This allows PostHog to send alerts and insights directly to your team.
Step 4: Set Privacy Options
Toggle 'Anonymize IPs' if you want to mask user IP addresses for privacy compliance automatically.
Step 5: Specify Project Type
Toggle 'Is demo project' if this is for testing or demonstration purposes. Demo projects may have different limitations or features than production projects.
How to Make PostHog API Requests
Step 1: Connect to PostHog
To connect to your PostHog account, follow the first step in the "How to Create Event" section above.
Step 2: Specify the API Endpoint
In the 'URL' field, enter the base PostHog URL with the endpoint you want to access.
Step 3: Select Request Method
From the 'Method' dropdown, choose the appropriate HTTP method (GET, POST, etc.).
Step 4: Add Custom Headers (Optional)
Click 'Add Item' in the 'Headers' section to add any special headers. Note that authorization headers are automatically included in your connection.
Step 5: Configure Query Parameters (Optional)
Click 'Add Item' in the 'Query Parameters' section to add URL parameters.
Step 6: Provide Request Body (Optional)
For POST, PUT, or PATCH requests, enter the JSON data to send. This contains the specific parameters for your API operation.
Last updated