ایک سیٹ اپ کریں
- 1Settings > Webhooks کھولیں اور ایک نام اور عوامی https ایڈریس شامل کریں۔
- 2وہ چینلز چنیں جن کے لیے یہ ہے، یا ہر چینل کے لیے کوئی نہ چنیں۔
- 3اس کے ایونٹس چنیں: پبلش شدہ پوسٹس، فلو کی جمع کردہ لیڈز، مکمل فلوز۔
- 4کسی ایونٹ کا نمونہ اپنے ایڈریس پر بھیجنے کے لیے Send test event پر کلک کریں۔
Zapier، Make اور n8n میں
Zapier، Make اور n8n کی PostNimbo ایپس آپ کے لیے سبسکرائب کرتی ہیں: ٹرگر آن کرنے پر ٹول کے سننے والے ایڈریس کے ساتھ POST /public/v1/webhooks کال ہوتی ہے، اور آف کرنے پر DELETE /public/v1/webhooks/:id۔ آپ کا اپنا کوڈ API کی کے ساتھ یہی کر سکتا ہے۔
یہ کیسے ڈیلیور ہوتا ہے
- JSON باڈی کے ساتھ ایک POST، اور ہیڈر میں ایونٹ کا نام
X-PostNimbo-Event. - آپ کے سرور کے پاس پبلش شدہ پوسٹ کا جواب دینے کے لیے 10 سیکنڈ اور فلو ایونٹ کا جواب دینے کے لیے 5 سیکنڈ ہیں۔ ٹائم آؤٹ، 429 یا 5xx جواب کے بعد فلو ایونٹ دو بار مزید بھیجا جاتا ہے؛ پبلش شدہ پوسٹ دوبارہ نہیں بھیجی جاتی۔ فوراً جواب دیں اور کام بعد میں کریں۔
- صرف عوامی https ایڈریس قبول کیے جاتے ہیں، اور ری ڈائریکٹ بھی کسی عوامی ایڈریس پر ہی جانا چاہیے۔
- ہر ڈیلیوری ویب ہُک سیٹنگز میں دکھائے گئے سیکرٹ سے سائن ہوتی ہے، ان ہیڈرز میں
X-PostNimbo-Timestamp,X-PostNimbo-Signature.
چیک کریں کہ ڈیلیوری ہماری طرف سے آئی ہے
اپنے سیکرٹ سے ٹائم اسٹیمپ، ایک فل اسٹاپ اور خام باڈی کا HMAC-SHA256 نکالیں، اسے کانسٹنٹ ٹائم میں سگنیچر ہیڈر سے ملائیں، اور 5 منٹ سے پرانا ٹائم اسٹیمپ رد کر دیں۔
const crypto = require('crypto');
// rawBody: the request body exactly as received, before JSON parsing
function fromPostNimbo(rawBody, headers, secret) {
const timestamp = headers['x-postnimbo-timestamp'];
const signature = headers['x-postnimbo-signature'] || '';
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected =
'sha256=' +
crypto
.createHmac('sha256', secret)
.update(timestamp + '.' + rawBody)
.digest('hex');
return (
signature.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
);
}ایونٹس
یہی فہرست GET /public/v1/webhooks/events پر بھی دستیاب ہے، تاکہ کوئی ٹول ٹرگرز اور نمونہ ڈیٹا دکھا سکے۔
post.publishedA post went live on a channel. Sent once per channel, after the network accepted it, with the post in the array.
Webhooks with no channels get it for every channel; the others only for the channels they list.
[
{
"id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
"content": "<p>Our autumn menu is here.</p>",
"publishDate": "2026-10-26T09:30:00.000Z",
"releaseURL": "https://www.linkedin.com/feed/update/urn:li:share:7000000000000000000",
"state": "PUBLISHED",
"integration": {
"id": "c1d2e3f4-0000-4a00-8000-000000000001",
"name": "Example Bakery",
"providerIdentifier": "linkedin-page",
"picture": "https://example.com/avatar.png",
"type": "social"
}
}
]post.scheduledA post was queued to publish: scheduled (or published now), rescheduled, approved, or edited while scheduled. Sent once per channel, with the same fields as post.published. The next posts of a repeating post do not send it.
Webhooks with no channels get it for every channel; the others only for the channels they list.
[
{
"id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
"content": "<p>Our autumn menu is here.</p>",
"publishDate": "2026-10-26T09:30:00.000Z",
"releaseURL": null,
"state": "QUEUE",
"integration": {
"id": "c1d2e3f4-0000-4a00-8000-000000000001",
"name": "Example Bakery",
"providerIdentifier": "linkedin-page",
"picture": "https://example.com/avatar.png",
"type": "social"
}
}
]post.failedA post could not be published, or its publishing could not be confirmed, and is marked as failed. Sent once per channel, with the same fields as post.published (the reason is shown in PostNimbo).
Webhooks with no channels get it for every channel; the others only for the channels they list.
[
{
"id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
"content": "<p>Our autumn menu is here.</p>",
"publishDate": "2026-10-26T09:30:00.000Z",
"releaseURL": null,
"state": "ERROR",
"integration": {
"id": "c1d2e3f4-0000-4a00-8000-000000000001",
"name": "Example Bakery",
"providerIdentifier": "linkedin-page",
"picture": "https://example.com/avatar.png",
"type": "social"
}
}
]lead.capturedAn automation flow saved an email or phone number someone typed in answer to a question. Sent once per answer.
Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.
{
"event": "lead.captured",
"timestamp": "2026-10-26T09:30:00.000Z",
"runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
"flow": {
"id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
"name": "Autumn menu giveaway"
},
"channel": {
"id": "c1d2e3f4-0000-4a00-8000-000000000001",
"network": "instagram",
"name": "Example Bakery"
},
"contact": {
"id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
"name": "Sam Taylor",
"username": "samtaylor",
"email": "sam@example.com",
"phone": "+447700900123",
"tags": [
"giveaway"
],
"fields": {
"postcode": "SW1A 1AA"
}
}
}flow.completedSomeone reached the end of an automation flow. Sent once per run, with the same fields as lead.captured (email and phone are null when not collected).
Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.
{
"event": "flow.completed",
"timestamp": "2026-10-26T09:31:00.000Z",
"runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
"flow": {
"id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
"name": "Autumn menu giveaway"
},
"channel": {
"id": "c1d2e3f4-0000-4a00-8000-000000000001",
"network": "instagram",
"name": "Example Bakery"
},
"contact": {
"id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
"name": "Sam Taylor",
"username": "samtaylor",
"email": "sam@example.com",
"phone": null,
"tags": [
"giveaway"
],
"fields": {}
}
}