View as Markdown
LearnWorlds icon

LearnWorlds ACTION

Enroll User

Enroll user to product. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's LearnWorlds account once, then configure and run Enroll User 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: "learnworlds-enroll-user",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    learnworlds: { authProvisionId: "apn_xxxxxxx" },
    userId: "User Id",
    productType: "Product Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Enroll User inputs
Property Type Description
userId User Id string
Unique identifier of the used.
Required Dynamic
productType Product Type string
Type of the product.
Required
justification Justification string
Any justification/note for the enrollment.
Optional
sendEnrollmentEmail Send Enrollment Email boolean
Indication about whether the user should receive the enrollment email; true if she should receive the email, false if she should not.
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
learnworlds-enroll-user
Version
0.0.2
App
LearnWorlds
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes