> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whatsable.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Using with Base44

> Install Notifyer Agent Skills so your AI coding assistant can build and operate Notifyer integrations inside Base44 apps.

<Tip>
  Base44 follows the open [AgentSkills specification](https://agentskills.io/specification). Notifyer Agent Skills can be installed globally so any AI coding assistant you use with Base44 — Claude, Cursor, Copilot, or others — knows how to call the Notifyer API.
</Tip>

## How skills work in Base44

Base44 uses Agent Skills to give external AI coding tools reusable instructions for platform-specific tasks. When you install Notifyer skills globally, your AI assistant gains:

* Knowledge of all Notifyer API endpoints, auth modes, and CORS rules
* Ready-to-run Node.js scripts for every Notifyer operation
* Reference documentation on templates, broadcasts, recipients, webhooks, and chat

The skills are loaded from `~/.agents/skills/` (global) or `.agents/skills/` (project-level) and are used by the AI when you ask it to add Notifyer functionality to a Base44 app or backend function.

***

## Install the skills

<Tabs>
  <Tab title="Global install (recommended)">
    Makes the skills available across all your Base44 projects. Use `--all` to install all three skills at once without an interactive prompt:

    ```bash theme={null}
    npx skills add whatsable/whatsapp-business-agent-skills --all -g
    ```

    This installs `setup-notifyer`, `automate-notifyer`, and `chat-notifyer` together.

    To install interactively (choose which skills to include):

    ```bash theme={null}
    npx skills add whatsable/whatsapp-business-agent-skills -g
    ```

    To install a single skill only:

    ```bash theme={null}
    npx skills add whatsable/whatsapp-business-agent-skills --skill chat-notifyer -g
    ```
  </Tab>

  <Tab title="Project-level install">
    Installs only into the current project directory:

    ```bash theme={null}
    npx skills add whatsable/whatsapp-business-agent-skills --all
    ```
  </Tab>
</Tabs>

<Tip>
  Base44 skills themselves are installed with `npx skills add base44/skills -g`. Notifyer skills are a separate add-on — install both if you're building a Base44 app that sends WhatsApp messages via Notifyer.
</Tip>

***

## Set up environment variables

The Notifyer scripts need these variables:

| Variable                | Required | Description                                                                                                |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `NOTIFYER_API_BASE_URL` | **yes**  | Always `https://api.insightssystem.com`. Must start with `https://` — all scripts enforce this at startup. |
| `NOTIFYER_API_TOKEN`    | **yes**  | JWT token obtained via `setup-notifyer/scripts/login.js`                                                   |
| `NOTIFYER_CHAT_ORIGIN`  | no       | CORS Origin override for Phase 3 chat endpoints. Defaults to `https://chat.notifyer-systems.com`.          |

```bash theme={null}
export NOTIFYER_API_BASE_URL="https://api.insightssystem.com"
export NOTIFYER_API_TOKEN="eyJ..."   # obtained via setup-notifyer/scripts/login.js
```

For Base44 backend functions that call the Notifyer API directly, store these as **project secrets** using the Base44 CLI:

```bash theme={null}
base44 secrets set NOTIFYER_API_BASE_URL=https://api.insightssystem.com
base44 secrets set NOTIFYER_API_TOKEN=eyJ...
```

Inside your backend function code, access them with `Deno.env.get("NOTIFYER_API_TOKEN")`.

<Warning>
  Never hardcode `NOTIFYER_API_TOKEN` in your Base44 app source. Use `base44 secrets set` to store it securely — it will be available as an environment variable in your deployed backend functions.
</Warning>

***

## Two ways to use Notifyer in a Base44 app

### 1. AI-assisted integration (skills-guided)

Tell your AI coding assistant to add Notifyer functionality to a Base44 backend function. With the skills installed, the AI already knows the correct API endpoints, auth headers, and payload shapes:

```
Add a Base44 backend function called sendWhatsAppTemplate that accepts a phone number
and template name, authenticates with the Notifyer API using NOTIFYER_API_TOKEN,
and sends the matching approved template.
```

```
Create a Base44 backend function that checks if a recipient's 24-hour WhatsApp
messaging window is open before sending a text message via Notifyer.
```

The AI will reference the skill's reference docs (`references/messaging-reference.md`, `references/recipients-reference.md`, etc.) to produce accurate code.

### 2. Calling the Notifyer API directly from a Base44 backend function

Base44 backend functions run on **Deno** — not Node.js. Call the Notifyer REST API directly using the built-in `fetch()`. The Notifyer scripts (which require Node.js 18+) cannot be executed from within a Deno backend function.

The example below sends a WhatsApp template message using the Notifyer Chat API (`POST /api:bVXsw_FD/web/send/template`). Template messages work at any time — no 24-hour window required. Get the `templateId` from `automate-notifyer/scripts/list-templates.js`.

```typescript theme={null}
// Inside a Base44 backend function (Deno)
Deno.serve(async (req) => {
  try {
    const { phone, templateId, variables } = await req.json();

    const token = Deno.env.get("NOTIFYER_API_TOKEN");
    const baseUrl = Deno.env.get("NOTIFYER_API_BASE_URL");

    const res = await fetch(`${baseUrl}/api:bVXsw_FD/web/send/template`, {
      method: "POST",
      headers: {
        "Authorization": token,          // Chat auth — raw JWT, no Bearer prefix
        "Origin": "https://chat.notifyer-systems.com",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        template: templateId,            // Template ID string from list-templates.js
        variables: variables ?? {},      // e.g. { "body1": "John", "body2": "#12345" }
        current_recipient: {
          phone_number: parseInt(String(phone).replace(/^\+/, ""), 10),
        },
        scheduled_time: 0,              // 0 = send immediately
      }),
    });

    const result = await res.json();

    // Notifyer (Xano) can return HTTP 200 with success: false on Meta rejections
    if (!res.ok || result.success === false) {
      return Response.json(
        { ok: false, error: result },
        { status: res.ok ? 400 : res.status }
      );
    }

    return Response.json({ ok: true, result });
  } catch (error) {
    return Response.json({ ok: false, error: error.message }, { status: 500 });
  }
});
```

<Warning>
  Base44 backend functions use the Deno runtime. Do not import Node.js-specific modules like `child_process`. Use `fetch()` to call the Notifyer REST API directly, and use `Deno.env.get()` to read secrets.
</Warning>

***

## Example AI prompts for Base44 projects

With Notifyer skills installed, give your AI assistant these kinds of instructions:

### Send WhatsApp messages from a Base44 app

```
Build a Base44 backend function called notifyCustomer.
It should accept { phone, templateName, variables } and send a WhatsApp template
message via the Notifyer API. Use NOTIFYER_API_BASE_URL and NOTIFYER_API_TOKEN
from environment variables. Handle errors and return { ok, message_id } or { ok: false, error }.
```

### Trigger a broadcast from a Base44 automation

```
Add a Base44 automation that runs daily at 9am, fetches all customers from the
Customers entity with status = "trial_expiring", and triggers a Notifyer broadcast
using the trial_reminder template for each one.
```

### Webhook receiver in Base44

```
Create a Base44 backend function to receive incoming Notifyer IO webhook events.
Validate the HMAC signature using NOTIFYER_WEBHOOK_SECRET.
When a new inbound message arrives, create or update a record in the Conversations entity.
```

### Chat handoff from a Base44 agent

```
When a user sends the message "talk to a human" to our Base44 AI agent,
perform a human handover for that contact's WhatsApp conversation in Notifyer.
Use the assign-label workflow: first get the bot's handoff_label from list-bots.js,
then assign that label to the recipient — this automatically stops the AI bot and
routes the conversation to the human agent queue.
```

<Note>
  The correct handover method is **always label-based**: assign the bot's configured `handoff_label` to the recipient. Notifyer automatically sets `is_ai_assistant = false` when the handoff label is detected. Do not use a direct PATCH to flip `is_ai_assistant` — it stops the bot but does not route to the human label queue.
</Note>

***

## API reference for Base44 backend functions

When building backend functions that call Notifyer directly, these are the key details:

|                 | Console API                            | Chat API                               |
| --------------- | -------------------------------------- | -------------------------------------- |
| **Base URL**    | `NOTIFYER_API_BASE_URL`                | `NOTIFYER_API_BASE_URL`                |
| **Auth header** | `Authorization: Bearer <jwt>`          | `Authorization: <jwt>` (no Bearer)     |
| **Origin**      | `https://console.notifyer-systems.com` | `https://chat.notifyer-systems.com`    |
| **Used for**    | Templates, bots, broadcasts, webhooks  | Recipients, messaging, labels, handoff |

There is also a **Developer API key** mode (`Authorization: <api_key>` — no Bearer prefix) used by external tools such as Make, Zapier, and n8n. Retrieve the key with `setup-notifyer/scripts/get-api-key.js`. This is a separate long-lived credential, distinct from the JWT token.

For complete endpoint reference, see the skills' `references/` directory after install:

* `~/.agents/skills/automate-notifyer/references/`
* `~/.agents/skills/chat-notifyer/references/`

***

## Keeping skills up to date

```bash theme={null}
npx skills add whatsable/whatsapp-business-agent-skills --all -g
```

Re-running the install command pulls the latest version from the repository.

***

## Related pages

* [Quickstart](/guides/notifyer-system/agent-skills/quickstart)
* [Auth & environment](/guides/notifyer-system/agent-skills/auth-and-env)
* [Use cases](/guides/notifyer-system/agent-skills/use-cases)
* [Base44 Skills docs](https://docs.base44.com/developers/backend/overview/skills)
* [Base44 Backend Functions](https://docs.base44.com/developers/backend/resources/backend-functions/overview)
* [Base44 Secrets (`secrets set`)](https://docs.base44.com/developers/references/cli/commands/secrets-set)
