BadgerMapping Trigger

Triggers on new or updated accounts and check-ins from BadgerMapping

Overview

This node is a trigger for BadgerMapping events, designed to poll the BadgerMapping API at regular intervals and emit new or updated data related to accounts or check-ins. It supports listening for three types of events: account creation, account updates, and check-ins.

Common scenarios where this node is beneficial include:

  • Automatically syncing newly created or updated customer accounts from BadgerMapping into another system.
  • Triggering workflows when new check-ins occur, such as logging visits or updating CRM records.
  • Periodically polling BadgerMapping to keep external databases or dashboards up to date with the latest customer or appointment information.

For example, a user could set this node to poll every 10 seconds for new accounts created in BadgerMapping and then use the emitted data to create corresponding contacts in a marketing platform.

Properties

Name Meaning
Polling Interval (Seconds) Time interval in seconds between each polling execution. Minimum 1 second, maximum 3600 seconds (1 hour).
Event Type The type of event to listen for. Options are:
- Account Created
- Account Updated
- Check Ins

Output

The node outputs an array of items, each containing a json field with the raw event data retrieved from the BadgerMapping API. The structure of each item corresponds directly to the JSON object returned by the API for the selected event type.

  • For "Account Created" and "Account Updated" events, the output contains customer account objects.
  • For "Check Ins", the output contains appointment/check-in objects.

No binary data is output by this node.

Dependencies

  • Requires an API token credential for authenticating with the BadgerMapping API.
  • Uses Redis (assumed to be accessible at host redis on port 6379) to store the ID of the last processed event per event type, enabling incremental polling.
  • Makes HTTP GET requests to the BadgerMapping API endpoints:
    • Customers endpoint for account events.
    • Appointments endpoint for check-in events.

Troubleshooting

  • Unexpected response format from BadgerMapping API: This error occurs if the API response is not an array as expected. Possible causes include API changes or network issues. Verify the API endpoint and credentials.
  • Redis connection issues: Since Redis is used to track the last processed event, ensure that the Redis service is running and accessible at the configured host and port.
  • No new data emitted: If no new events appear, it may be because the node has already processed all current events (tracked via Redis). To reset, clear the stored keys in Redis or restart the node with a fresh state.
  • API authentication errors: Ensure the provided API token credential is valid and has sufficient permissions.

Links and References

Discussion