Teamwork Webhook Trigger icon

Teamwork Webhook Trigger

Starts the workflow when Teamwork webhook is called and maps fields.

Overview

This node acts as a webhook trigger for Teamwork, starting an n8n workflow when a Teamwork webhook is called. It listens for incoming POST requests on a specified path and processes the webhook payload to extract and map relevant fields related to messages or files shared via Teamwork.

Common scenarios where this node is useful include automating workflows based on Teamwork chat messages, audio messages, or file sharing events. For example, you could use it to automatically log chat messages into a CRM, trigger notifications when audio messages are received, or process files shared in Teamwork chats.

Properties

Name Meaning
Path The URL path segment for the webhook endpoint that listens for incoming Teamwork webhook POST requests. Default is teamwork-webhook.

Output

The node outputs JSON data representing the webhook payload enriched with additional structured information depending on the message type:

  • sessionId: A unique identifier combining sender and receiver IDs.
  • messageType: Numeric type of the message (1, 2, or 3).
  • For type 1 (likely text message):
    • messageContent: The main content of the message.
    • messagePushContent: Additional push notification content.
  • For type 2 (likely audio message):
    • audioDuration: Duration of the audio message.
    • messagePushContent: Push notification content.
  • For type 3 (likely file message):
    • messagePushContent: Push notification content.
    • files: An array of file objects each containing:
      • previewUrl: URL to preview the file.
      • fileUrl: Direct URL to the file.
      • contentType: MIME type of the file.

The output JSON merges the original webhook body data with these mapped fields under the json property.

Dependencies

  • Requires an HTTP webhook endpoint exposed by n8n to receive POST requests from Teamwork.
  • No external API keys or credentials are required for this node itself, but the Teamwork service must be configured to send webhooks to the specified path.

Troubleshooting

  • Webhook not triggering: Ensure Teamwork is correctly configured to send webhooks to your n8n instance's public URL with the correct path.
  • Invalid JSON error: If the webhook payload's messageHeader field is malformed or missing, the node attempts to parse it but may fail silently, resulting in incomplete output. Verify the webhook payload format.
  • Missing fields in output: If the message type is unexpected or the payload structure changes, some expected fields might be absent. Confirm the webhook payload matches the expected schema.

Links and References

Discussion