{"_id":"@astervia/n8n-nodes-wacraft","_rev":"2-c977e9502fce497c84e32a4766d8471d","name":"@astervia/n8n-nodes-wacraft","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@astervia/n8n-nodes-wacraft","version":"0.1.0","keywords":["n8n-community-node-package","whatsapp","wacraft"],"author":{"name":"Astervia Dev Team","email":"wacraft@astervia.tech"},"license":"MIT","_id":"@astervia/n8n-nodes-wacraft@0.1.0","maintainers":[{"name":"rfluid","email":"ruy.vieiraneto@gmail.com"}],"homepage":"https://github.com/Astervia/n8n-nodes-wacraft","bugs":{"url":"https://github.com/Astervia/n8n-nodes-wacraft/issues"},"n8n":{"nodes":["dist/nodes/Wacraft/Wacraft.node.js"],"credentials":["dist/credentials/WacraftApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"d4e38fc43423d441015a4fd88db2f0878d72ef63","tarball":"https://registry.npmjs.org/@astervia/n8n-nodes-wacraft/-/n8n-nodes-wacraft-0.1.0.tgz","fileCount":12,"integrity":"sha512-/3SE8PgjSCa4SNJdrYOMqd6mzdwqoRHILN568njrzjcmF23+WWxRdF8QhLozzyEzIJE3rl99nxhBKtMdbPbPiA==","signatures":[{"sig":"MEQCICBTjFKF/8WbYR3d4E84UkzKhucHia1gb+XkTFS8qZ6FAiB8bKhE638KxNY3U1EDCFvTdIIYtg3u4+IDs+JKU6y1bQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astervia%2fn8n-nodes-wacraft@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":106919},"main":"index.js","gitHead":"3d325a1b7c932278a7f96ddf3c94b8109e8fa137","scripts":{"dev":"tsc --watch","lint":"eslint 'nodes/**/*.ts' 'credentials/**/*.ts'","build":"tsc && gulp build:icons","format":"prettier . --write","lint:fix":"eslint 'nodes/**/*.ts' 'credentials/**/*.ts' --fix","format:check":"prettier . --check","prepublishOnly":"npm run build"},"_npmUser":{"name":"rfluid","email":"ruy.vieiraneto@gmail.com"},"repository":{"url":"git+https://github.com/Astervia/n8n-nodes-wacraft.git","type":"git"},"_npmVersion":"10.9.4","description":"n8n community node for wacraft - WhatsApp Cloud API operations","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"gulp":"^5.0.1","eslint":"^9.39.2","prettier":"^3.2.0","@eslint/js":"^9.39.2","typescript":"~5.4.0","@types/node":"^22.0.0","n8n-workflow":"^2.6.0","typescript-eslint":"^8.54.0"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-wacraft_0.1.0_1769987353165_0.03993992587735096","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@astervia/n8n-nodes-wacraft","version":"0.1.1","description":"n8n community node for wacraft - WhatsApp Cloud API operations","keywords":["n8n-community-node-package","whatsapp","wacraft"],"license":"MIT","homepage":"https://github.com/Astervia/n8n-nodes-wacraft","author":{"name":"Astervia Dev Team","email":"wacraft@astervia.tech"},"repository":{"type":"git","url":"git+https://github.com/Astervia/n8n-nodes-wacraft.git"},"main":"index.js","scripts":{"build":"tsc && gulp build:icons","dev":"tsc --watch","format":"prettier . --write","format:check":"prettier . --check","lint":"eslint 'nodes/**/*.ts' 'credentials/**/*.ts'","lint:fix":"eslint 'nodes/**/*.ts' 'credentials/**/*.ts' --fix","prepublishOnly":"npm run build"},"n8n":{"n8nNodesApiVersion":1,"credentials":["dist/credentials/WacraftApi.credentials.js"],"nodes":["dist/nodes/Wacraft/Wacraft.node.js"]},"devDependencies":{"@eslint/js":"^9.39.2","@types/node":"^22.0.0","eslint":"^9.39.2","gulp":"^5.0.1","n8n-workflow":"^2.6.0","prettier":"^3.2.0","typescript":"~5.9.3","typescript-eslint":"^8.54.0"},"peerDependencies":{"n8n-workflow":"*"},"_id":"@astervia/n8n-nodes-wacraft@0.1.1","gitHead":"98cd892dad17bd79d19c5158b44b4bf412a92347","bugs":{"url":"https://github.com/Astervia/n8n-nodes-wacraft/issues"},"_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-Vy2VOEzBn93a1kh3opGAR3lMsEiBI5BIHdei9/cgFNqqvnPxfdRrPqhyLEX/xm5fm3aqyA8NEW7m8mWIIIfOsw==","shasum":"e27912aa37ef1650a54e1d97e53c6e321f862172","tarball":"https://registry.npmjs.org/@astervia/n8n-nodes-wacraft/-/n8n-nodes-wacraft-0.1.1.tgz","fileCount":51,"unpackedSize":126961,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@astervia%2fn8n-nodes-wacraft@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDGIJsiUL/xU1cPHX2x1mDuZNFJF7s0xC5eAjH/hz+bEAiBIZLkjBdbTwO6+d1hbYnuhddDzaIB+eYYdECoezITlXA=="}]},"_npmUser":{"name":"rfluid","email":"ruy.vieiraneto@gmail.com"},"directories":{},"maintainers":[{"name":"rfluid","email":"ruy.vieiraneto@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-wacraft_0.1.1_1777159243148_0.5513308221781847"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-01T23:09:13.115Z","modified":"2026-04-25T23:20:43.620Z","0.1.0":"2026-02-01T23:09:13.317Z","0.1.1":"2026-04-25T23:20:43.277Z"},"bugs":{"url":"https://github.com/Astervia/n8n-nodes-wacraft/issues"},"author":{"name":"Astervia Dev Team","email":"wacraft@astervia.tech"},"license":"MIT","homepage":"https://github.com/Astervia/n8n-nodes-wacraft","keywords":["n8n-community-node-package","whatsapp","wacraft"],"repository":{"type":"git","url":"git+https://github.com/Astervia/n8n-nodes-wacraft.git"},"description":"n8n community node for wacraft - WhatsApp Cloud API operations","maintainers":[{"name":"rfluid","email":"ruy.vieiraneto@gmail.com"}],"readme":"# @astervia/n8n-nodes-wacraft\n\nn8n community node for [wacraft](https://github.com/Astervia/wacraft-server) — a WhatsApp Cloud API backend server. This node lets you manage contacts, send messages, handle media, and retrieve templates directly from your n8n workflows.\n\n## Installation\n\n### Community node (recommended)\n\n1. Open your n8n instance.\n2. Go to **Settings > Community Nodes**.\n3. Search for `@astervia/n8n-nodes-wacraft` and click **Install**.\n\n### Manual installation\n\n```bash\ncd ~/.n8n/custom\nnpm install @astervia/n8n-nodes-wacraft\n```\n\nThen restart n8n.\n\n### Development (npm link)\n\n```bash\ngit clone https://github.com/Astervia/n8n-nodes-wacraft.git\ncd n8n-nodes-wacraft\nnpm install\nnpm run build\nnpm link\n\ncd ~/.n8n\nnpm link @astervia/n8n-nodes-wacraft\n```\n\nRestart n8n. The **Wacraft** node will appear in the node picker.\n\n## Credentials\n\nCreate a **Wacraft API** credential with the following fields:\n\n| Field                    | Description                                                                             |\n| ------------------------ | --------------------------------------------------------------------------------------- |\n| **Base URL**             | Your wacraft server URL (e.g. `http://localhost:6900`). No trailing slash.              |\n| **Username (Email)**     | The email used to sign in.                                                              |\n| **Password**             | The account password.                                                                   |\n| **Default Workspace ID** | UUID sent as `X-Workspace-ID` header on every request. Can be overridden per operation. |\n\n### Authentication flow\n\nThe node authenticates via `POST /user/oauth/token` using the **password** grant type. Tokens are cached in memory and automatically refreshed using the **refresh_token** grant before expiry. If a refresh fails, the node falls back to a fresh password grant.\n\n## Resources and operations\n\n### Contact\n\n| Operation    | Description                                                                                           |\n| ------------ | ----------------------------------------------------------------------------------------------------- |\n| **Get Many** | Retrieve a paginated list of contacts with optional filters (name, email, sort order, limit, offset). |\n| **Create**   | Create a new contact (name, email, photo path).                                                       |\n| **Update**   | Update an existing contact by ID.                                                                     |\n| **Delete**   | Delete a contact by ID.                                                                               |\n\n### Message\n\n| Operation                 | Description                                                                                                                          |\n| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| **Get Many**              | Retrieve a paginated list of messages with filters (from/to ID, messaging product ID, date range).                                   |\n| **Search by Content**     | Search messages using ILIKE text matching against content fields.                                                                    |\n| **Send WhatsApp Message** | Send a WhatsApp message to a messaging product contact. Accepts the message payload as JSON following the WhatsApp Cloud API format. |\n| **Mark as Read**          | Mark the latest message in a conversation as read (shows double blue check).                                                         |\n| **Send Typing**           | Mark as read and display a typing indicator to the WhatsApp user.                                                                    |\n\n### Messaging Product\n\n| Operation    | Description                                            |\n| ------------ | ------------------------------------------------------ |\n| **Get Many** | Retrieve messaging products (currently only WhatsApp). |\n\n### Messaging Product Contact\n\n| Operation                 | Description                                                                  |\n| ------------------------- | ---------------------------------------------------------------------------- |\n| **Get Many**              | Retrieve messaging product contacts with filters.                            |\n| **Get WhatsApp Contacts** | Retrieve WhatsApp-specific contacts with phone number and WA ID filters.     |\n| **Search by Content**     | Search contacts by content text using ILIKE.                                 |\n| **Create**                | Create a messaging product contact linking a contact to a messaging product. |\n| **Create WhatsApp**       | Create a WhatsApp contact with phone number and WA ID.                       |\n| **Delete**                | Delete a messaging product contact by ID.                                    |\n| **Block**                 | Block a messaging product contact.                                           |\n| **Unblock**               | Unblock a messaging product contact.                                         |\n\n### Media\n\n| Operation    | Description                                                               |\n| ------------ | ------------------------------------------------------------------------- |\n| **Get Info** | Get media info including a temporary download URL (expires in 5 minutes). |\n| **Download** | Download WhatsApp media by ID. Returns binary data.                       |\n| **Upload**   | Upload a media file to WhatsApp. Accepts a binary property and MIME type. |\n\n### Template\n\n| Operation    | Description                                                                                                                        |\n| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |\n| **Get Many** | Retrieve WhatsApp message templates with filters for category, status, quality score, language, name, and cursor-based pagination. |\n\n## Workspace ID override\n\nEvery operation includes an optional **Workspace ID Override** field. When set, it replaces the default workspace ID from the credentials for that specific execution. This is useful when a single n8n instance interacts with multiple wacraft workspaces.\n\n## Sending a WhatsApp message\n\nThe **Send WhatsApp Message** operation requires:\n\n- **To ID**: The messaging product contact ID (not a phone number).\n- **Sender Data (JSON)**: The WhatsApp Cloud API message payload.\n\nExample sender data for a text message:\n\n```json\n{\n    \"messaging_product\": \"whatsapp\",\n    \"type\": \"text\",\n    \"text\": {\n        \"body\": \"Hello from n8n!\"\n    }\n}\n```\n\nExample sender data for a template message:\n\n```json\n{\n    \"messaging_product\": \"whatsapp\",\n    \"type\": \"template\",\n    \"template\": {\n        \"name\": \"hello_world\",\n        \"language\": {\n            \"code\": \"en_US\"\n        }\n    }\n}\n```\n\n## Testing with Docker\n\nBuild and run a custom n8n image with the node pre-installed using Docker Compose:\n\n```bash\ndocker compose -f docker-compose.test.yml up --build\n```\n\nOpen `http://localhost:5678` and the **Wacraft** node will appear in the node picker.\n\nIf your wacraft server is running on the host machine, use `http://host.docker.internal:6900` as the base URL. The compose file already includes the `extra_hosts` mapping so `host.docker.internal` resolves correctly on all platforms including Linux.\n\n## Development\n\n```bash\nnpm install       # Install dependencies\nnpm run build     # Compile TypeScript and copy icons\nnpm run dev       # Watch mode for TypeScript\nnpm run lint      # Lint with ESLint\nnpm run lint:fix  # Lint and auto-fix\nnpm run format    # Format code with Prettier\n```\n\n## Project structure\n\n```\nn8n-nodes-wacraft/\n├── .github/workflows/\n│   ├── codeql-analysis.yml          # CodeQL SAST scanning\n│   ├── quality-and-security.yml     # Lint, format, audit, build on push/PR\n│   └── release.yml                  # Publish to npm on GitHub Release\n├── credentials/\n│   └── WacraftApi.credentials.ts    # Credential definition\n├── nodes/Wacraft/\n│   ├── GenericFunctions.ts          # Auth helpers and API request functions\n│   ├── Wacraft.node.ts              # Node definition with all resources\n│   └── wacraft.svg                  # Node icon\n├── Dockerfile.test\n├── docker-compose.test.yml\n├── eslint.config.mjs\n├── gulpfile.js\n├── package.json\n└── tsconfig.json\n```\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","readmeFilename":"README.md"}