> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.posthog.core.CreateAnnotation

- Component: `appmixer.posthog.core.CreateAnnotation`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.posthog 1.1.0](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.CreateAnnotation>

Create an annotation in a PostHog project. Annotations mark important moments (releases, campaigns) on analytics charts.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Project (`projectId`) | text | Pick a project, or type the numeric Project ID directly. |
| Content (`content`) | textarea | Text of the annotation, e.g. 'Released v2.3.0'. |
| Date Marker (`dateMarker`) | date-time | Date and time the annotation refers to. Defaults to now. |
| Scope (`scope`) | select | Whether the annotation is visible in the project or across the whole organization. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Annotation ID (`id`) | integer | - |
| Content (`content`) | string | - |
| Date Marker (`date_marker`) | string | - |
| Scope (`scope`) | string | - |
| Created At (`created_at`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.posthog.core.CreateAnnotation",
  "description": "Create an annotation in a PostHog project. Annotations mark important moments (releases, campaigns) on analytics charts.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:posthog"
  },
  "quota": {
    "manager": "appmixer:posthog",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "dateMarker": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "content"
        ]
      },
      "inspector": {
        "inputs": {
          "projectId": {
            "type": "text",
            "index": 1,
            "label": "Project",
            "tooltip": "Pick a project, or type the numeric Project ID directly.",
            "source": {
              "url": "/component/appmixer/posthog/core/ListProjects?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "transform": "./ListProjects#toSelectArray"
              }
            }
          },
          "content": {
            "type": "textarea",
            "index": 2,
            "label": "Content",
            "tooltip": "Text of the annotation, e.g. 'Released v2.3.0'."
          },
          "dateMarker": {
            "type": "date-time",
            "index": 3,
            "label": "Date Marker",
            "tooltip": "Date and time the annotation refers to. Defaults to now."
          },
          "scope": {
            "type": "select",
            "index": 4,
            "label": "Scope",
            "defaultValue": "project",
            "tooltip": "Whether the annotation is visible in the project or across the whole organization.",
            "options": [
              {
                "label": "Project",
                "value": "project"
              },
              {
                "label": "Organization",
                "value": "organization"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "title": "Annotation ID",
            "example": 789
          },
          "content": {
            "type": "string",
            "title": "Content",
            "example": "Released v2.3.0"
          },
          "date_marker": {
            "type": "string",
            "format": "date-time",
            "title": "Date Marker",
            "example": "2025-01-15T10:30:00Z"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "example": "project"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "example": "2025-01-15T10:30:00Z"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
