Skip to main content

 

  • arrow icon

 

Planview Customer Success Center

Webhooks

Webhooks in AgilePlace (Web service call)

The Web service call automation action lets AgilePlace send an HTTP request to another system whenever the automation runs. This is useful for syncing events, triggering workflows, or notifying your apps in real time.

What AgilePlace sends

Request method
  • POST to the URL you configure
Request body format

AgilePlace sends the payload in one of these formats, based on Content Type:

  • application/json: the body is JSON
  • application/x-www-form-urlencoded: the body is form-encoded fields

Signature header (optional)

If you provide a secret, AgilePlace signs the request body and includes the signature in:

  • x-lk-signature

The signature value is generated by computing a SHA-256 HMAC over the request body using the secret (then hex-encoding the result). Your receiving service can recompute the signature the same way and compare it to x-lk-signature to confirm the request came from AgilePlace.

Signature verification example (Node.js)

import crypto from "crypto";

function calculateSignature(requestBody: string, secret: string) {
  const signature = crypto
    .createHmac("sha256", secret)
    .update(requestBody)
    .digest("hex");

  return signature;
}

// requestBody must be the exact raw body string AgilePlace sent
// (same bytes, same encoding), otherwise the signature won't match.
export function verifyWebhookSignature(params: {
  requestBody: string;
  secret: string;
  receivedSignature: string; // value of x-lk-signature
}) {
  const expected = calculateSignature(params.requestBody, params.secret);
  return crypto.timingSafeEqual(
    Buffer.from(expected, "utf8"),
    Buffer.from(params.receivedSignature, "utf8"),
  );
}

Webhook payload

The request body contains a contextual payload like this:

{
  "automation": {
    "id": "10135653531",
    "description": "Card has started automation"
  },
  "host": "https://mycompany.leankit.com",
  "boardId": "10112910528",
  "cardId": "10127481191",
  "laneId": "10135383914",
  "cardUrl": "https://mycompany.leankit.com/card/10127481191",
  "event": "movedTo",
  "eventData": {
    "movedFromLaneId": "10112910641"
  },
  "eventDate": "2023-02-23T18:08:18.480Z"
}

Payload fields

  • automation: identifies the automation
    • id: automation id
    • description: automation description
  • host: your AgilePlace host URL
  • boardId: board id
  • cardId: card id
  • laneId: lane id (relevant to the event)
  • cardUrl: direct link to the card
  • event: the event name that triggered the automation
  • eventData: event-specific details
  • eventDate: ISO timestamp for when the event occurred

eventData fields (by event)

eventData includes different properties depending on the matched event:

  • movedFromLaneId: present when event is movedFrom or movedTo
  • reason: present when event is blocked or unblocked
  • childCardId and parentCardId: present when event is childConnectionAdded, childConnectionRemoved, parentConnectionAdded, or parentConnectionRemoved
  • childBlockReason: present when event is childBlocked