
PostHog Group
CertifiedCreate or update a PostHog group
PostHog Group
Create or update a PostHog group
Creates a group, or updates the properties of an existing one, by sending a $groupidentify event. A group is an entity such as a company or an organization, identified by its type and its key. This does not make a user a member of the group: to attach events to a group, the events themselves must carry it. Group analytics is a paid PostHog feature, and a project can have at most 5 group types. Uses the project API key (phc_).
type: io.kestra.plugin.posthog.GroupExamples
Create a company group and set its properties
id: define_company
namespace: company.growth
inputs:
- id: user_id
type: STRING
- id: company_id
type: STRING
- id: company_name
type: STRING
tasks:
- id: define_company
type: io.kestra.plugin.posthog.Group
apiKey: "{{ secret('POSTHOG_API_KEY') }}"
host: "https://us.i.posthog.com"
distinctId: "{{ inputs.user_id }}"
groupType: company
groupKey: "{{ inputs.company_id }}"
groupProperties:
name: "{{ inputs.company_name }}"
plan: enterprise
Properties
apiKey *string
PostHog project API key
The project API key (starts with phc_). Use a Kestra secret, e.g. {{ secret('POSTHOG_API_KEY') }}.
distinctId *string
Distinct ID
The distinct ID of the user the group-identify event is sent for. PostHog does not use it to link the user to the group.
groupKey *string
Group key
The unique identifier of the specific group within its type, e.g. a company ID.
groupType *string
Group type
The category of the group, e.g. company. Prefer a singular name.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150groupProperties object
Group properties
Optional properties to store on the group. Properties with a null value are omitted.
host string
PostHog host
The PostHog ingestion host, e.g. https://us.i.posthog.com (US Cloud), https://eu.i.posthog.com (EU Cloud) or a self-hosted URL. Defaults to US Cloud when empty.