# Create Sign-up Nudge — Nudgify

> Creates a sign-up nudge for a user in Nudgify. See docs here

- Key: `nudgify-create-sign-up-nudge`
- Type: Action (Write)
- Version: 0.0.2
- App: Nudgify (`nudgify`) — https://pipedream.com/apps/nudgify.md
- This page (HTML): https://pipedream.com/apps/nudgify/actions/create-sign-up-nudge
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/nudgify/actions/create-sign-up-nudge/create-sign-up-nudge.mjs

## Description

Creates a sign-up nudge for a user in Nudgify. [See docs here](https://www.nudgify.com/docs/knowledge-base/rest-api-for-sign-ups)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `date` | `string` | Yes | The date (UTC) used to show in the Nudge how long ago the conversion took place. Format: YYYY-MM-DD HH:MM:SS (example: 2021-04-15 04:29:42) |
| `email` | `string` | Yes | The email address of the user |
| `firstName` | `string` | No | The first name of the user |
| `lastName` | `string` | No | The last name of the user |
| `ip` | `string` | No | The IP address of the user |
| `city` | `string` | No | The city of the user |
| `state` | `string` | No | The state of the user |
| `country` | `string` | No | The country of the user (max 2 characters, e.g. GB, US) |

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

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: "nudgify-create-sign-up-nudge",
  arguments: {
    date: "Date",
    email: "Email",
  },
})
```

**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: "nudgify-create-sign-up-nudge",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    nudgify: { authProvisionId: "apn_xxxxxxx" },
    date: "Date",
    email: "Email",
  },
})

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": "nudgify-create-sign-up-nudge",
    "configured_props": {
      "nudgify": { "authProvisionId": "apn_xxxxxxx" },
      "date": "Date",
      "email": "Email"
    }
  }'
```

---

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