How to Create and Set Up Webhooks in TARGPatrol
A webhook is an automated notification sent from TARGPatrol's server to yours whenever a specific event happens within the system, such as a task being created, updated, or completed. Webhooks are essential for streamlining processes, integrating with other systems, and responding to changes in real time. When an event (e.g., a task status change) occurs in TARGPatrol, the system sends a POST request to a predefined URL. This request includes a payload—a JSON object containing event details like the task ID, status, and other relevant data.

How to Set Up Webhooks in TARGPatrol

To create a webhook:
  1. Log in to TARGPatrol.

  2. Navigate to the "Management" -> "Webhooks" section.

Creating an Issue
Add a new webhook:
  1. Click the Add Webhook button.

  2. Enter the URL where notifications should be sent. Make sure your server is ready to handle POST requests and process JSON data.

  3. Select the types of events that will trigger the webhook. TARGPatrol supports various triggers.

  4. Optional: Add request headers: If needed, specify headers like Content-Type to customize the request format.

  5. Click "Save" button.

Creating an Issue
Test the webhook:
  1. After saving, TARGPatrol allows you to test the webhook by simulating an event.

  2. For example, if your webhook is set to trigger on task.created, you’ll receive a notification when a new task is created.

Viewing Webhook Logs in TARGPatrol

Access the webhook logs:
  1. Open the “Webhooks” section in TARGPatrol.

  2. Click on the webhook URL or its icon to view its details.

  3. A window will show a list of triggered events, including their status, request payloads, and server responses.

  4. Check for errors: If a webhook fails, the corresponding request will be marked with an error icon in the logs. TARGPatrol will automatically disable a webhook after 25 consecutive failed requests.

Creating an Issue

Tips for Managing Webhooks

  • Handle errors gracefully: Webhooks run in real time, but if your server doesn’t respond, TARGPatrol retries the request automatically.

  • Monitor and analyze errors: Recurring issues, like timeouts, may indicate server performance problems or routing misconfigurations.

  • Stay informed: TARGPatrol sends email alerts when new webhooks are created, errors occur, or a webhook is automatically disabled. This keeps you informed about the health of your integration.

  • Use HTTPS for security: TARGPatrol webhooks only support secure HTTPS URLs to ensure data safety.

Setting up webhooks in TARGPatrol empowers you to automate tasks, integrate with other systems, and manage real-time data effectively. Follow the tips for managing webhooks to avoid common pitfalls and ensure smooth integration. Use HTTPS for security, monitor errors to resolve issues promptly, and stay informed about your webhooks' status with TARGPatrol alerts. With the right configuration, you’ll streamline workflows and enhance your team’s productivity.