Docs/API Reference/Webhook Payload Variables

Webhook Payload Variables

API Reference
4 min read

Webhook Payload Variables

When iContentForge publishes an article via Generic Webhook, it makes all article fields available as template variables. You can use these in the Template Mode JSON editor using the {{variableName}} syntax to build any payload structure your receiver expects.


Variable Reference

VariableTypeDefault Payload KeyDescription
{{title}}stringtitleFull article title.
{{slug}}stringslugURL-friendly slug (kebab-case).
{{html}}stringhtmlArticle content as clean HTML (converted from Markdown).
{{markdown}}stringmarkdownArticle content as raw Markdown.
{{excerpt}}stringexcerptShort summary / first paragraph. Also used as meta description fallback.
{{metaTitle}}stringmetaTitleSEO meta title.
{{metaDescription}}stringmetaDescriptionSEO meta description.
{{keyword}}stringkeywordPrimary target keyword for the article.
{{wordCount}}integerwordCountApproximate total word count.
{{readingTime}}integerreadingTimeEstimated reading time in minutes.
{{categories}}string[]categoriesArray of category names.
{{tags}}string[]tagsArray of tag names.
{{publishedAt}}stringpublishedAtISO 8601 publication timestamp (e.g. 2026-03-30T15:00:00.000Z).
{{projectName}}stringprojectNameName of the iContentForge project.
{{projectDomain}}stringprojectDomainDomain URL associated with the project.
{{authorName}}stringauthorNameAuthor display name.
{{pageId}}stringpageIdUnique internal ID of the article in iContentForge.
鈩癸笍

In the default payload (no template configured), all variables are sent using the keys listed in "Default Payload Key" column above. When using Template Mode, the left-hand key names are whatever you define — the right-hand {{variable}} is where the value comes from.


Template Mode Syntax

String Variables

Wrap in double quotes. iContentForge automatically JSON-escapes string content (including newlines, quotes, and special characters inside html and markdown fields):

{
  "title":   "{{title}}",
  "content": "{{html}}",
  "summary": "{{excerpt}}"
}

Number Variables

Do not wrap in quotes:

{
  "word_count":   {{wordCount}},
  "reading_time": {{readingTime}}
}

Array Variables

Do not wrap in quotes. They are serialized as a JSON array automatically:

{
  "tags":       {{tags}},
  "categories": {{categories}}
}

Full Template Example

This example shows a complete template for a custom blog receiver, using renamed field keys:

{
  "title":        "{{title}}",
  "slug":         "{{slug}}",
  "content":      "{{html}}",
  "summary":      "{{excerpt}}",
  "seo_title":    "{{metaTitle}}",
  "seo_desc":     "{{metaDescription}}",
  "focus_kw":     "{{keyword}}",
  "tags":         {{tags}},
  "published_at": "{{publishedAt}}",
  "author":       "{{authorName}}",
  "word_count":   {{wordCount}}
}

When your receiver gets this payload, it reads the left-hand key names you defined:

// Your receiver reads the keys YOU defined in the template
const title    = payload.title;        // "How to Optimize..."
const content  = payload.content;      // "<h2>Introduction...</h2>"  ← NOT payload.html
const seoTitle = payload.seo_title;    // "Image SEO Guide..."        ← NOT payload.metaTitle
const tags     = payload.tags;         // ["seo", "images", ...]
鈿狅笍

Common mistake — field name mismatch. If your template maps "content": "{{html}}", your receiver must read payload.content — not payload.html. The variable name (html) only determines which value is injected. The key name (content) is what your code must reference.


Field Mapping Mode vs Template Mode

The Generic Webhook connector supports two configuration modes:

Field Mapping Mode (Recommended for simple APIs)

A form-based approach where you select iContentForge variables from dropdowns and assign them to the field names your API uses. Best for flat JSON structures.

Advantages:

  • No JSON syntax to write
  • Less risk of template errors
  • Variables listed in a UI — no memorization needed

Template Mode (For custom structures)

Write the entire JSON payload yourself, embedding variables with {{variableName}}. Best for:

  • APIs requiring nested JSON
  • APIs with specific required field names
  • Combining variables with static values
  • Serverless functions with custom schemas
{
  "post": {
    "metadata": {
      "source": "iContentForge",
      "project": "{{projectName}}"
    },
    "body": {
      "title":   "{{title}}",
      "html":    "{{html}}",
      "excerpt": "{{excerpt}}"
    }
  }
}
馃挕

Start with Field Mapping Mode if your API accepts flat key-value JSON. Only switch to Template Mode when you need nested structures or the mapping UI can't accommodate your API's schema.


Next Steps