Help Needed: Zendesk WhatsApp Integration - Messages showing "Via API" instead of "Via WhatsApp"

:clipboard: Problem Summary

I’m trying to integrate n8n with Zendesk to send WhatsApp messages through Zendesk Sunshine Conversations, but messages are appearing in Zendesk tickets with the label “Via API” instead of “Via WhatsApp”.

:bullseye: What I Want to Achieve

  • Send messages from n8n to Zendesk WhatsApp channel

  • Messages should appear with “Via WhatsApp” label (like native WhatsApp messages)

  • Currently they show as “Via API” (internal comments)

:wrench: Current Setup

  • Zendesk: Suite Professional with Sunshine Conversations

  • WhatsApp Channel: Already configured by vendor company

  • n8n: Self-hosted/Cloud version

  • Current API: Using traditional Zendesk tickets/comments API endpoint

:light_bulb: What I’ve Tried

  1. Traditional Zendesk API (tickets/comments endpoint) :cross_mark:

    • Result: Messages show as “Via API”

    • Not recognized as WhatsApp channel messages

  2. Sunshine Conversations API approach :hourglass_not_done:

    • Endpoint: https://api.smooch.io/v1.1/apps/{appId}/conversations/{conversationId}/messages

    • Need JWT authentication with Key ID + Secret

    • Issue: Getting Cannot find module 'crypto' [Line 2] error in Function Node

:bug: Technical Error

// Function Node code causing error:
const crypto = require('crypto'); // ← This line fails

Error Message: Cannot find module 'crypto' [Line 2]

:magnifying_glass_tilted_left: Questions for Community

  1. Has anyone successfully integrated n8n with Zendesk Sunshine Conversations for WhatsApp?

  2. How do you generate JWT tokens in n8n without the crypto module?

  3. Is there a working example of this integration?

  4. Alternative approaches to make messages appear as “Via WhatsApp”?

:bar_chart: Technical Details

Required JWT Payload:

{
  "scope": "app",
  "iat": 1234567890,
  "exp": 1234571490
}

Required Headers:

{
  "kid": "your-key-id",
  "alg": "HS256",
  "typ": "JWT"
}

API Call Structure:

POST https://api.smooch.io/v1.1/apps/{appId}/conversations/{conversationId}/messages
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "author": {
    "type": "business"
  },
  "content": {
    "type": "text", 
    "text": "Your message here"
  }
}

:hammer_and_wrench: Environment Info

  • n8n version: 1.110.1

  • Zendesk Plan: Suite Professional

  • WhatsApp: Business API via Sunshine Conversations

:thinking: Alternative Solutions Considered

  1. External JWT Generator: Generate token outside n8n, use as static string

  2. Code Node instead of Function Node: Different node type approach

  3. Third-party JWT libraries: If available in n8n ecosystem

:briefcase: Business Context

This integration is critical for our customer support workflow. We need automated responses to appear as genuine WhatsApp messages rather than internal API comments.

:folded_hands: Looking For

  • Working n8n workflow examples

  • JWT generation workarounds

  • Alternative integration approaches

  • Any insights from successful implementations

Has anyone faced this specific challenge? Any guidance would be greatly appreciated!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.