# Create Assembly — Transloadit

> Create a new assembly to process files using a specified template and steps. See the documentation

- Key: `transloadit-create-assembly`
- Type: Action (Write)
- Version: 0.0.3
- App: Transloadit (`transloadit`) — https://pipedream.com/apps/transloadit.md
- This page (HTML): https://pipedream.com/apps/transloadit/actions/create-assembly
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/transloadit/actions/create-assembly/create-assembly.mjs

## Description

Create a new assembly to process files using a specified template and steps. [See the documentation](https://transloadit.com/docs/api/assemblies-post/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `allowStepsOverride` | `boolean` | Yes | Set this to false to disallow Overruling Templates at Runtime. If you set this to false then Template Id and Steps will be mutually exclusive and you may only supply one of those parameters. Recommended when deploying Transloadit in untrusted environments. This makes sense to set as part of a Template, rather than on the Assembly itself when creating it. |
| `templateId` | `string` | No | The ID of the Template that contains your Assembly Instructions. If you set Allow steps Override to false then steps and Template Id will be mutually exclusive and you may only supply one of these parameters. Options are loaded from the connected account. |
| `steps` | `object` | No | Assembly Instructions comprise all the Steps executed on uploaded/imported files by the Transloadit back-end during file conversion or encoding. See the documentation for more information. |
| `notifyUrl` | `string` | No | Transloadit can send a Pingback to your server when the Assembly is completed. We'll send the Assembly status in a form url-encoded JSON string inside of a transloadit field in a multipart POST request to the URL supplied here. |
| `quiet` | `boolean` | No | Set this to true to reduce the response from an Assembly POST request to only the necessary fields. This prevents any potentially confidential information being leaked to the end user who is making the Assembly request. A successful Assembly will only include the ok and assembly_id fields. An erroneous Assembly will only include the error, http_code, message and assembly_id fields. The full Assembly Status will then still be sent to the Notify URL if one was specified. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_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": "transloadit",
      },
    },
  },
)

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: "transloadit-create-assembly",
  arguments: {
    allowStepsOverride: true,
    templateId: "Template ID",
  },
})
```

**TypeScript**

```ts
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: "transloadit-create-assembly",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    transloadit: { authProvisionId: "apn_xxxxxxx" },
    allowStepsOverride: true,
    templateId: "Template ID",
  },
})

console.log(result)
```

**cURL**

```bash
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": "transloadit-create-assembly",
    "configured_props": {
      "transloadit": { "authProvisionId": "apn_xxxxxxx" },
      "allowStepsOverride": true,
      "templateId": "Template ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/transloadit.md · All apps: https://pipedream.com/apps
