# Make TTS Call — Seven

> Make a text-to-speech call via Seven. See the documentation

- Key: `seven-make-tts-call`
- Type: Action (Write)
- Version: 0.1.1
- App: Seven (`seven`) — https://pipedream.com/apps/seven.md
- This page (HTML): https://pipedream.com/apps/seven/actions/make-tts-call
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/seven/actions/make-tts-call/make-tts-call.mjs

## Description

Make a text-to-speech call via Seven. [See the documentation](https://docs.seven.io/en/rest-api/endpoints/voice#send-voice-call)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `to` | `string` | Yes | The destination phone number. Accepts all common formats like 0049171123456789, 49171123456789, +49171123456789 |
| `text` | `string` | Yes | Text message to be read out |
| `from` | `string` | No | Caller ID of the call. Please only use verified sender IDs or one of your numbers booked with Seven.io |
| `ringtime` | `integer` | No | The duration of how long it should ring at the recipient's end before hanging up. Here, 5 to 60 seconds are possible |
| `foreignId` | `string` | No | A unique ID that you can use for later assignment of the call. This ID is passed in the webhook events |

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

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: "seven-make-tts-call",
  arguments: {
    to: "To",
    text: "Text",
  },
})
```

**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: "seven-make-tts-call",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    seven: { authProvisionId: "apn_xxxxxxx" },
    to: "To",
    text: "Text",
  },
})

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": "seven-make-tts-call",
    "configured_props": {
      "seven": { "authProvisionId": "apn_xxxxxxx" },
      "to": "To",
      "text": "Text"
    }
  }'
```

---

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