# Create Banner — Adrapid

> Generates a new banner using provided data. This action can create different types of banners, such as animated HTML5, image, or video banners. See the documentation

- Key: `adrapid-create-banner`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Adrapid (`adrapid`) — https://pipedream.com/apps/adrapid.md
- This page (HTML): https://pipedream.com/apps/adrapid/actions/create-banner
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/adrapid/actions/create-banner/create-banner.mjs

## Description

Generates a new banner using provided data. This action can create different types of banners, such as animated HTML5, image, or video banners. [See the documentation](https://docs.adrapid.com/api/overview)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `templateId` | `string` | Yes | The id of the template to create the banner. Options are loaded from the connected account. |
| `modes` | `string[]` | No | Modes for the resulting banners, previously set on configuration block. |
| `overrides` | `object` | No | With this parameter we override the default template content. We use the name of the item we want to override, valid properties are text, url (for external images) and css. See the documentation. |
| `sync` | `boolean` | No | Get banner url in the same response. Delay the response until the banner is ready. Usually in a few seconds with a maxtime of two minutes. |
| `editable` | `boolean` | No | Make banner editable, creating a template that is a copy of the banner. |
| `excludeBaseSize` | `boolean` | No | Exclude base size from the banner. Only applies to multisize banners. |

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

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: "adrapid-create-banner",
  arguments: {
    templateId: "Template Id",
    modes: ["Modes"],
  },
})
```

**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: "adrapid-create-banner",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    adrapid: { authProvisionId: "apn_xxxxxxx" },
    templateId: "Template Id",
    modes: ["Modes"],
  },
})

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": "adrapid-create-banner",
    "configured_props": {
      "adrapid": { "authProvisionId": "apn_xxxxxxx" },
      "templateId": "Template Id",
      "modes": ["Modes"]
    }
  }'
```

---

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