Developer tools

Vercel

Text from a Next.js app with the TypeScript SDK, and text yourself when a deploy fails.

What you can do

  • Send texts from a Next.js app with BlueBot’s TypeScript SDK.
  • Handle BlueBot’s signed webhooks in a route handler.
  • Point a Vercel webhook at a Text Hook to text yourself when a deployment fails.

How it connects

  • Recommended

    API

    Your own code calls BlueBot’s REST API and listens to its signed webhooks.

    API in the docs
  • Text Hook

    A Text Hook is a BlueBot address the app posts its own webhook to. You map its fields to a recipient and a template, and each post becomes a text.

    Text Hook in the docs

Recipes

Three recipes to start from.

Set one up as written, or change it to fit how you work. The docs have the same recipes step by step.
01With the API

Text a confirmation from a Next.js form

Starts when

Someone submits a form on your site

  1. Add your API key to the project’s environment variables.
  2. In a server action or route handler, send the text with the bluebot SDK.
  3. Keep the key on the server and never import it into a client component.

The text it sends

Hi {{first_name}}, thanks for signing up! Reply here any time with questions.

From your own number

02With the API

Receive replies in a route handler

Starts when

A text comes in (BlueBot’s message.received webhook)

  1. Add a route handler and register its URL in BlueBot as a webhook for message.received.
  2. Verify the webhook-signature header with your whsec_ secret before you trust the body.
  3. Run npx bluebot listen to forward webhooks to localhost while you build.
03With a Text Hook

Text me when a deployment fails

Starts when

Vercel’s webhook for a deployment error

  1. Make a Text Hook in BlueBot with your own number as the recipient.
  2. Add a webhook in Vercel that posts deployment errors to the hook’s address.
  3. Once a payload comes in, map the project name and deployment URL from the payload BlueBot kept.

The text it sends

{{project}} failed to deploy: {{url}}

From your own number

Try BlueBot free for 7 days.

You need a card to start the trial. After 7 days it’s $17.99 a month plus any tax, and you can cancel from your billing page at any time.