# Create a Print Job — Intelliprint

> Creates a new print job in the Intelliprint API. See the documentation

- Key: `intelliprint-create-a-print-job`
- Type: Action (Write)
- Version: 0.0.2
- App: Intelliprint (`intelliprint`) — https://pipedream.com/apps/intelliprint.md
- This page (HTML): https://pipedream.com/apps/intelliprint/actions/create-a-print-job
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/intelliprint/actions/create-a-print-job/create-a-print-job.mjs

## Description

Creates a new print job in the Intelliprint API. [See the documentation](https://api-docs.intelliprint.net/?_gl=1*19r3k2k*_gcl_au*MTU2NDU2MDgzMS4xNzY0MDIwNDQx#print_jobs-create)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `filePath` | `string` | Yes | The file to upload. Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt) |
| `reference` | `string` | No | An user-provided reference for this Print Job. |
| `confirmed` | `boolean` | No | Whether to confirm this Print Job immediately, or to leave it as a draft. |
| `testmode` | `boolean` | No | Whether to mark this Print Job as a test. |
| `splittingMethod` | `string` | No | The method to use to split the Print Job into multiple Print Jobs. |
| `splitOnPhrase` | `string` | No | The word or phrase to split letters using. Only used when Splitting Method is set to split_on_phrase. |
| `splitOnPage` | `integer` | No | The number of pages each letter should be. Only used when Splitting Method is set to split_on_page. |
| `doubleSided` | `string` | No | Whether to print these letters double sided. |
| `doubleSidedSpecificPages` | `string` | No | The array of pages to print double sided. Only used when Double Sided is set to mixed. Example: 1-3,6-7. |
| `premiumQuality` | `boolean` | No | Whether to print these letters in premium quality. |
| `postageService` | `string` | No | The postage service to use for this Print Job. |
| `idealEnvelope` | `string` | No | The ideal envelope size for these letters. |
| `mailDate` | `string` | No | The date to send this letter out on. Format: YYYY-MM-DD |
| `backgroundFirstPage` | `string` | No | The ID of the Background to apply to the first page of these letters. |
| `backgroundOtherPages` | `string` | No | The ID of the Background to apply to the other pages of these letters. |
| `confidential` | `boolean` | No | Whether to mark letters of this Print Job as confidential. |
| `removeLettersWithPhrase` | `string` | No | Remove letter objects that have this phrase in their content. |
| `removeLettersSeries` | `string[]` | No | An array of letters' indexes that have been removed. |
| `nudgeX` | `integer` | No | What amount in mm to move the first page of each letter horizontally. A positive number moves the page right, a negative number moves the page left. |
| `nudgeY` | `integer` | No | What amount in mm to move the first page of each letter vertically. A positive number moves the page down, a negative number moves the page up. |
| `confirmationEmail` | `boolean` | No | Whether a confirmation email should be sent to the user or account's email address when this letter is confirmed. |
| `metadata` | `object` | No | A key-value object for storing any information you want to along with this Print Job. |
| `syncDir` | `dir` | Yes | SyncDir |

## 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": "intelliprint",
      },
    },
  },
)

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: "intelliprint-create-a-print-job",
  arguments: {
    filePath: "File Path",
    reference: "Reference",
  },
})
```

**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: "intelliprint-create-a-print-job",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    intelliprint: { authProvisionId: "apn_xxxxxxx" },
    filePath: "File Path",
    reference: "Reference",
  },
})

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": "intelliprint-create-a-print-job",
    "configured_props": {
      "intelliprint": { "authProvisionId": "apn_xxxxxxx" },
      "filePath": "File Path",
      "reference": "Reference"
    }
  }'
```

---

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