home / skills / openclaw / skills / fieldy-ai-webhook

fieldy-ai-webhook skill

This skill wires a Fieldy webhook transform into Moltbot, enabling wake-word triggered agent runs from transcripts.

npx playbooks add skill openclaw/skills --skill fieldy-ai-webhook

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.6 KB
---
name: fieldy
description: Wire a Fieldy webhook transform into Moltbot hooks.
---

## What this sets up

You’ll configure Moltbot Gateway webhooks so an incoming request to `POST /hooks/fieldy` runs through a **transform module** (`fieldy-webhook.js`) before triggering an **agent** run.

Behavior notes (defaults in `fieldy-webhook.js`):
- Saying **"Hey, Fieldy"** (or just **"Fieldy"**) will **trigger** the agent with the text **after** the wake word.
- Transcripts **without** the wake word will **not** wake the agent; they’ll only be **logged to JSONL files** by `fieldy-webhook.js` (under `<workspace>/fieldy/transcripts/`).
- You can adjust wake words, parsing, and logging behavior by editing `fieldy-webhook.js`.

## 1) Put the transform script in the configured transforms dir

Your `hooks.transformsDir` is:

`/root/clawd/skills/fieldy/scripts`

Move the script from this repo:

- From: `src/fieldy-webhook.js`
- To: `/root/clawd/skills/fieldy/scripts/fieldy-webhook.js`

Notes:
- Make sure the destination filename is exactly `fieldy-webhook.js` (matches the config below).

## 2) Add the webhook mapping to `~/.clawdbot/moltbot.json`

Add this config:

```json
"hooks": {
  "token": "insert-your-token",
  "transformsDir": "/root/clawd/skills/fieldy/scripts",
  "mappings": [
    {
      "match": {
        "path": "fieldy"
      },
      "action": "agent",
      "name": "Fieldy",
      "messageTemplate": "{{message}}",
      "deliver": true,
      "transform": {
        "module": "fieldy-webhook.js"
      }
    }
  ]
}
```

Important:
- `hooks.token` is required when hooks are enabled (see [Webhooks docs](https://docs.molt.bot/automation/webhook.md)).
- Ensure `hooks.enabled: true` exists somewhere in your config (and optionally `hooks.path`, default is `/hooks`).

## 3) Restart the Gateway

Plugins/config changes generally require a gateway restart. After restarting, the webhook endpoint should be live.

## 4) Configure the webhook URL in the Fieldy app

- Log in to your Fieldy app
- Go to **Settings** → **Developer Settings**
- Set **Webhook Endpoint URL** to:

`https://your-url.com/hooks/fieldy?token=insert-your-token`

Note: Moltbot supports sending the token via header too, but many webhook providers only support query params. Moltbot still accepts `?token=` (see [Webhooks docs](https://docs.molt.bot/automation/webhook.md)).

## 5) Test

Example request (adjust host/port and token):

```bash
curl -X POST "http://127.0.0.1:18789/hooks/fieldy" \
  -H "Authorization: Bearer insert-your-token" \
  -H "Content-Type: application/json" \
  -d '{"transcript":"Hey Fieldy summarize this: hello world"}'
```

Overview

This skill wires a Fieldy webhook transform into Moltbot Gateway hooks so incoming Fieldy transcripts can trigger an agent after a configurable wake word. It routes requests through a transform module that logs transcripts and conditionally invokes the agent. The setup requires placing the transform script, adding a hooks mapping to Moltbot config, and restarting the gateway.

How this skill works

Incoming POST requests to /hooks/fieldy are passed to a transform module (fieldy-webhook.js). The transform checks for a wake word (default: "Hey, Fieldy" or "Fieldy") and, if present, extracts the message and delivers it to the agent. Transcripts without the wake word are written to JSONL transcript files under the workspace for later review.

When to use it

  • You need to accept Fieldy app webhooks and run them through Moltbot agents.
  • You want to log all incoming transcripts while only waking the agent on a wake word.
  • You need a simple transform to parse Fieldy payloads into agent messages.
  • You want to centralize webhook handling via Moltbot Gateway mappings.
  • You need to archive all versions of the skill for backup or auditing.

Best practices

  • Place the transform at the exact configured path: /root/clawd/skills/fieldy/scripts/fieldy-webhook.js.
  • Set hooks.enabled: true and provide hooks.token in your Moltbot config to secure the endpoint.
  • Restart the Moltbot Gateway after adding the transform and updating moltbot.json to load changes.
  • Adjust wake words, parsing, or log formats inside fieldy-webhook.js to match your Fieldy payloads.
  • Use HTTPS and pass the token via query parameter or Authorization header depending on your webhook provider support.

Example use cases

  • Trigger an agent to summarize voice transcripts that begin with "Hey Fieldy" while archiving all other transcripts for analytics.
  • Parse Fieldy developer webhook payloads into a standardized messageTemplate and deliver to a Moltbot agent for follow-up actions.
  • Backup and audit all incoming Fieldy transcripts in JSONL files under <workspace>/fieldy/transcripts.
  • Set up a secure webhook endpoint for Fieldy by adding ?token= in the webhook URL or using Authorization header.
  • Rapidly prototype different wake words or parsing rules by editing fieldy-webhook.js and restarting the gateway.

FAQ

Where do I place the transform script?

Move src/fieldy-webhook.js to /root/clawd/skills/fieldy/scripts/fieldy-webhook.js and ensure the filename matches exactly.

How do I secure the webhook?

Provide hooks.token in moltbot.json and include it in the webhook URL as ?token=insert-your-token or send it in the Authorization header.