View as Markdown
Hex icon

Hex ACTION

Run Project

Trigger a run of the latest published version of a project. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Hex account once, then configure and run Run Project 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: "hex-run-project",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    hex: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project ID",
    inputParams: "Input Parameters",
  },
})

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.

Run Project inputs
Property Type Description
projectId Project ID string
The ID of the project to run.
Required Dynamic
inputParams Input Parameters object

Specify input parameters for this project run. These should be structured as a dictionary of key/value pairs, where the key name matches the name of the variable in the Hex project.

Only parameters that are added to the published app can be set via this request parameter. Any additional inputs will be ignored. It is invalid to pass in both a viewId and inputParams.

If no input parameters are provided, the project will be run with the default input values.

Optional
dryRun Dry Run boolean
When true, this endpoint will perform a dry run that does not run the project. This can be useful for validating the structure of an API call, and inspecting a dummy response, without running a project.
Optional
notifications Notifications string[]
Specify a list of notification details that will be delivered once a project run completes. Notifications can be configured for delivery to Slack channels, Hex users, or Hex groups. E.g. [{"type": "SUCCESS", "includeSuccessScreenshot": "general"}]. See the documentation for more details.
Optional
updatePublishedResults Update Published Results boolean
When true, the cached state of the published app will be updated with the latest run results. You must have at least "Can Edit" permissions on the project to do so. Note: this cannot be set to true if custom input parameters are provided.
Optional
useCachedSqlResults Use Cached SQL Results boolean
When false, the project will run without using any cached SQL results, and will update those cached SQL results.
Optional
viewId View ID string
Specify a SavedView viewId to use for the project run. If specified, the saved view's inputs will be used for the project run. It is invalid to pass in both a viewId and inputParams. If not specified, the default inputs will be used.
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
hex-run-project
Version
0.0.2
App
Hex
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes