starsender-v2

A community node for interacting with the Starsender API

Package Information

Released: 12 mo ago
Downloads: 1 weekly / 61 monthly
Latest Version: 0.2.4
Author: yusufthoib

Documentation

Banner image

n8n-nodes-starter

This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter and other dependencies.

To make your custom node available to the community, you must create it as an npm package, and submit it to the npm registry.

If you would like your node to be available on n8n cloud you can also submit your node for verification.

Prerequisites

You need the following installed on your development machine:

  • git
  • Node.js and npm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL here. For Windows users, refer to Microsoft's guide to Install NodeJS on Windows.
  • Install n8n with:
    npm install n8n -g
    
  • Recommended: follow n8n's guide to set up your development environment.

Using this starter

These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.

  1. Generate a new repository from this template repository.
  2. Clone your new repo:
    git clone https://github.com/<your organization>/<your-repo-name>.git
    
  3. Run npm i to install dependencies.
  4. Open the project in your editor.
  5. Browse the examples in /nodes and /credentials. Modify the examples, or replace them with your own nodes.
  6. Update the package.json to match your details.
  7. Run npm run lint to check for errors or npm run lintfix to automatically fix errors when possible.
  8. Test your node locally. Refer to Run your node locally for guidance.
  9. Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
  10. Update the LICENSE file to use your details.
  11. Publish your package to npm.

More information

Refer to our documentation on creating nodes for detailed information on building your own nodes.

License

MIT

Build & Install this node into n8n (local)

To build the node and install it into a local n8n instance for testing:

  1. Install dependencies and build:
npm install
npm run build
  1. Link the package into your local n8n installation for development:
# from this package folder
npm link
# in your local n8n installation folder
npm link n8n-nodes-starsender

Alternatively, copy the dist files into the ~/.n8n/node_modules directory of your n8n installation or add the package as a local dependency in your n8n project's package.json.

  1. Restart n8n. The new node should appear in the node palette as "Starsender".

Publishing notes

  • Ensure package.json fields (name, version, repository, author) are correct.
  • Run npm publish to publish to npm when ready.
  • Follow n8n community submission guidelines if you want this node available on n8n Cloud.

Starsender node — Grouped operations

This node exposes the Starsender API grouped into logical sections in the node UI. The groups and their primary operations are:

  • MESSAGE

    • Send Message
    • Message Details
    • Check Whatsapp Number
  • CAMPAIGN

    • Create a Campaign
    • Add Campaign Member
    • Move Campaign to Another Campaign
  • GROUP

    • Send Message (send to a group)
  • CONTACT

    • Create Contact
    • Contact Group List
    • Delete Contact from Group (if supported by API)
    • Move Contact from Group (if supported by API)
  • DEVICE

    • List Device
    • Detail Device
    • Relog Device
    • Add Device Then Scan
    • Delete Device
  • WHATSAPP

    • List Group

The UI change groups related operations together for clarity. Functionally, the API endpoints used remain the same as before (for example, Message → Send posts to /api/send; Group → Send posts to /api/send/grup, Campaign endpoints post to /api/campaigns, etc.).

Example workflows

Below are two minimal example workflows exported from n8n that demonstrate sending a message and sending to a group using this node. Replace credentials and parameters as needed.

  1. Send a single message (Message → Send Message):
{
  "nodes": [
    {
      "parameters": {
        "resource": "message",
        "operation": "send",
        "to": "08123456789",
        "messageType": "text",
        "body": "Hello from Starsender node"
      },
      "name": "Send Starsender Message",
      "type": "n8n-nodes-base.starsender",
      "typeVersion": 1,
      "position": [250, 300]
    }
  ],
  "connections": {}
}
  1. Send to a group (Group → Send Message):
{
  "nodes": [
    {
      "parameters": {
        "resource": "group",
        "operation": "sendGroup",
        "to": "group-id-or-name",
        "messageType": "text",
        "body": "Hello group from Starsender node"
      },
      "name": "Send to Group",
      "type": "n8n-nodes-base.starsender",
      "typeVersion": 1,
      "position": [250, 300]
    }
  ],
  "connections": {}
}

Add these nodes into a workflow, set your Starsender API credential, and execute to test.

Discussion