Amplitude ACTION
Send Event Data
Record a single analytics event for a user or device via Amplitude's HTTP V2 API. Use this to send product-usage events (page views, feature use, purchases) as they happen, rather than the read-only Dashboard REST actions in this app (e.g. Get Event Segmentation, Get Retention Analysis), which only read existing data back. Identify the user with
userId and/or deviceId — Amplitude requires at least one. Example: call with userId="user_123", eventType="Purchase", eventProperties={"item":"Pro Plan","price":29.99} -> returns {code: 200, events_ingested: 1, payload_size_bytes: 148, server_upload_time: 1722873600000}. See the documentation- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Amplitude account once, then configure and run Send Event Data from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "amplitude-send-event-data",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
amplitude: { authProvisionId: "apn_xxxxxxx" },
userId: "User ID",
deviceId: "Device ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "amplitude-send-event-data",
"configured_props": {
"amplitude": { "authProvisionId": "apn_xxxxxxx" },
"userId": "User ID",
"deviceId": "Device ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "amplitude",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "amplitude-send-event-data",
arguments: {
userId: "User ID",
deviceId: "Device ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
userId User ID | string | A unique identifier for a user. Amplitude requires either this or Device ID (or both) — omitting both fails the request. Example: user_123. Optional |
deviceId Device ID | string | A unique identifier for a device. Amplitude requires either this or User ID (or both) — omitting both fails the request. Example: device_abc123. Optional |
eventType Event Type | string | The type of event being sent. Required |
time Time | integer | The time the event occurred in milliseconds since epoch. Optional |
eventProperties Event Properties | object | A dictionary of key-value pairs that represent additional data to be sent along with the event. Optional |
userProperties User Properties | object | A dictionary of key-value pairs that represent additional data tied to the user. Optional |
groups Groups | object | Dictionary of key-value pairs that represent groups to associate with the user. Optional |
groupProperties Group Properties | object | Dictionary of key-value pairs that represent additional data tied to the groups. Optional |
skipUserPropertiesSync Skip User Properties Sync | boolean | If true, user property operations in the same event are not applied to the user. Optional |
appVersion App Version | string | The version of the application. Optional |
platform Platform | string | The platform the user is on. Optional |
osName OS Name | string | The name of the operating system the user is using. Optional |
osVersion OS Version | string | The version of the operating system the user is using. Optional |
deviceBrand Device Brand | string | The brand of the device the user is using. Optional |
deviceManufacturer Device Manufacturer | string | The manufacturer of the device the user is using. Optional |
deviceModel Device Model | string | The model of the device the user is using. Optional |
carrier Carrier | string | The carrier the user is using. Optional |
country Country | string | The country of the user. Optional |
region Region | string | The region of the user. Optional |
city City | string | The city of the user. Optional |
dma DMA | string | The designated market area of the user. Optional |
language Language | string | The language set by the user. Optional |
price Price | string | The price of the product. Optional |
quantity Quantity | integer | The quantity of the product. Optional |
revenue Revenue | string | The revenue from the product. Optional |
productId Product ID | string | The ID of the product. Optional |
revenueType Revenue Type | string | The type of revenue. Optional |
locationLat Location Latitude | string | The latitude of the user's location. Optional |
locationLng Location Longitude | string | The longitude of the user's location. Optional |
ip IP | string | The IP address of the user. Optional |
idfa IDFA | string | Identifier for Advertisers. Optional |
idfv IDFV | string | Identifier for Vendors. Optional |
adid ADID | string | Google Play Advertising ID. Optional |
androidId Android ID | string | Android ID. Optional |
eventId Event ID | integer | A unique identifier for the event. Optional |
sessionId Session ID | integer | A unique identifier for the session. Optional |
insertId Insert ID | string | A unique identifier for the event that is used for deduplication. Optional |
plan Plan | object | Dictionary of key-value pairs that represent the plan. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- amplitude-send-event-data
- Version
- 0.1.1
- App
- Amplitude
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗