DinastiAPI Newsletter icon

DinastiAPI Newsletter

Manage WhatsApp newsletters/channels using DinastiAPI API

Overview

This node integrates with the DinastiAPI to manage WhatsApp newsletters (also called channels). It allows users to perform a variety of newsletter-related operations such as listing newsletters, creating new ones, retrieving information about specific newsletters, subscribing or unsubscribing, sending messages, reacting to messages, and managing live updates.

Common scenarios where this node is beneficial include:

  • Automating newsletter management workflows for WhatsApp channels.
  • Sending broadcast messages or media to subscribers.
  • Tracking and reacting to newsletter message updates.
  • Managing subscriptions and notification preferences programmatically.

For example, a marketing team could use this node to automatically send promotional content to their WhatsApp newsletter subscribers or gather analytics on subscriber engagement.

Properties

Name Meaning
Newsletter JID The unique identifier (JID) of the newsletter/channel. Required for most operations involving a specific newsletter. Example: 120363025246943103@newsletter.
Operation The action to perform. Options include: List Newsletters, Create Newsletter, Get Newsletter Info, Get Subscribed Newsletters, Send Newsletter Message, Subscribe Newsletter, Unsubscribe Newsletter, Mute Newsletter, Get Newsletter Messages, Send Newsletter Reaction, Mark Newsletter Viewed, Subscribe Live Updates, Get Message Updates, Accept TOS Notice, Send Admin Invite.
Name Name of the newsletter (max 25 characters). Required when creating a newsletter.
Description Optional description of the newsletter.
Picture Base64 encoded image or URL for the newsletter picture (optional).
Invite Code Invite code used to subscribe or unsubscribe via invite.
Message Type Type of message to send: Text, Image, Video, Document, Audio.
Message Text content of the message (required if Message Type is Text).
Media Base64 encoded media or URL for media messages (required if Message Type is not Text).
Caption Caption for media messages (optional).
File Name File name for document messages (optional).
Mute Boolean to mute or unmute newsletter notifications.
Count Number of messages to retrieve or updates to fetch.
Before Message ID Retrieve messages before this server message ID (optional).
Server ID Server ID of the message to react to (required for reactions).
Reaction Emoji reaction to send (required for reactions).
Server IDs Comma-separated list of server IDs to mark as viewed (required).
Since Timestamp Unix timestamp to get message updates since (optional).
After Server ID Get message updates after this server ID (optional).
Notice ID Notice ID for Terms of Service acceptance (default provided).
Stage Stage for Terms of Service acceptance (default provided).
Phone Number Phone number to send admin invite to (required for admin invites).
Invite Image Base64 encoded image or URL for admin invite (required).
Invite Caption Caption text for admin invite (required).
Invite Name Name of the newsletter for the admin invite (required).

Output

The node outputs JSON data corresponding to the response from the DinastiAPI for the selected operation. The structure varies depending on the operation but generally includes details such as newsletter metadata, message lists, subscription status, or confirmation of actions performed.

If the operation involves sending or receiving media, the output may include references or metadata about the media but does not directly output binary data.

Dependencies

  • Requires an API key credential for authenticating with the DinastiAPI service.
  • The node makes HTTP requests to DinastiAPI endpoints to perform all operations.
  • Proper configuration of the API credential in n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing incorrect or malformed Newsletter JIDs or invite codes will result in errors.
    • Sending media messages requires valid base64 encoding or accessible URLs; invalid media inputs can cause failures.
    • Operations requiring required parameters (e.g., server IDs for reactions) must have those parameters set correctly.
  • Error messages:

    • Errors returned from the API are passed through and included in the output if "Continue On Fail" is enabled.
    • Typical error messages might indicate missing parameters, invalid IDs, or permission issues.
  • Resolution tips:

    • Verify all required fields are filled correctly.
    • Ensure the API key credential is valid and has appropriate permissions.
    • Check media encoding and URLs for correctness.
    • Use the "Continue On Fail" option during testing to capture detailed error info without stopping workflow execution.

Links and References

Discussion