View as Markdown
Lever icon

Lever ACTION

Create Opportunity

Creates a new opportunity (candidate + application) in Lever. Use this to add a new candidate to the pipeline, optionally applying them to a specific job posting. Use List Postings to find posting IDs, List Stages to find stage IDs, and List Users to find the recruiter user ID for Perform As. Perform As is required — it sets the opportunity creator and owner. If a candidate with the same email already exists, Lever will link the new opportunity to the existing contact rather than creating a duplicate. WARNING: only one posting UID may be specified per request. Example: to add Jane Doe as a referred candidate on a posting, call with performAs="<userId>", candidateName="Jane Doe", email="jane@example.com", postingId="<postingId>", origin="referred" → returns the created opportunity with its id. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Lever account once, then configure and run Create Opportunity 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: "lever-create-opportunity",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    lever: { authProvisionId: "apn_xxxxxxx" },
    performAs: "Perform As (User ID)",
    candidateName: "Candidate Name",
  },
})

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.

Create Opportunity inputs
Property Type Description
performAs Perform As (User ID) string
User ID of the recruiter creating this opportunity — sets the creator and default owner. Use List Users to find user IDs.
Required
candidateName Candidate Name string
Full name of the candidate.
Required
headline Headline string
Current job title and company (e.g. Senior Engineer at Acme Corp).
Optional
email Email string
Candidate's email address. Used for deduplication — if a contact with this email already exists, the opportunity will be linked to them.
Optional
phone Phone string
Candidate's phone number.
Optional
postingId Posting ID string
Job posting to apply this candidate to. Use List Postings to find posting IDs. Only one posting per request.
Optional
stageId Stage ID string
Initial pipeline stage. Use List Stages to find stage IDs. Defaults to 'New Lead' if omitted.
Optional
origin Origin string
How the candidate entered the pipeline (e.g. referred, sourced, applied).
Optional
tags Tags string
Comma-separated list of tags to apply (e.g. python,senior,remote).
Optional
sources Sources string
Comma-separated list of sources (e.g. LinkedIn,Referral).
Optional
links Links string
Comma-separated list of URLs to social profiles or portfolio (e.g. https://linkedin.com/in/jane,https://github.com/jane).
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
lever-create-opportunity
Version
0.0.2
App
Lever
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes