Docs/API Reference/Webhook Payload Variables

Webhook Payload Variables

API Reference
4 min read

Webhook Payload Variables

When using the Generic Webhook connector or the REST API to publish articles from iContentForge, you can access a set of predefined variables within the article payload. These variables contain the generated content and its associated metadata, which you can map to your custom CMS or application fields.

This reference details all 16 available variables, their data types, descriptions, and example values.

Variable Reference Table

The following variables are included in the webhook payload when an article's status changes to ready or published.

Variable NameTypeDescriptionExample Value
titlestringThe full title of the generated article."How to Optimize Images for SEO in 2024"
slugstringThe URL-friendly slug derived from the title."how-to-optimize-images-for-seo"
htmlstringThe final article content formatted in clean HTML."<h2>Introduction</h2><p>Image optimization is..."
markdownstringThe article content in Markdown format."## Introduction\n\nImage optimization is..."
excerptstringA short summary or the first paragraph of the article."Learn the key techniques for compressing and tagging images to improve page speed and rankings."
metaTitlestringThe SEO meta title, often similar to or based on the article title."Image SEO: A Complete Optimization Guide | YourSite"
metaDescriptionstringThe SEO meta description for the article."Step-by-step guide to image optimization. Reduce file sizes, use descriptive alt text, and improve Core Web Vitals."
keywordstringThe primary target keyword for the article."image seo"
wordCountintegerThe approximate total number of words in the article.1250
readingTimeintegerThe estimated reading time in minutes.5
categoriesarrayAn array of category names assigned to the article.["SEO", "Technical SEO"]
tagsarrayAn array of tag names assigned to the article.["images", "page speed", "alt text"]
publishedAtstringThe scheduled publication date and time in ISO 8601 format."2024-11-15T14:30:00.000Z"
projectNamestringThe name of the iContentForge project the article belongs to."SEO Blog"
projectDomainstringThe primary domain associated with the project."https://example.com"
authorNamestringThe display name of the article's author."Alex Johnson"

Using Variables in JSON Templates

In the Generic Webhook connector configuration, you can use a Template Mode to construct a custom JSON payload. Insert variables using double curly braces: {{variableName}}.

Example Payload Template

{
  "post": {
    "title": "{{title}}",
    "content": "{{html}}",
    "seo": {
      "metaTitle": "{{metaTitle}}",
      "description": "{{metaDescription}}",
      "focusKeyword": "{{keyword}}"
    },
    "taxonomy": {
      "categories": {{categories}},
      "tags": {{tags}}
    },
    "stats": {
      "words": {{wordCount}},
      "readTime": {{readingTime}}
    },
    "slug": "{{slug}}",
    "published_at": "{{publishedAt}}",
    "author": "{{authorName}}",
    "source": "{{projectName}}"
  }
}
ℹ️

When using array variables like {{categories}} or {{tags}} in a template, they are automatically serialized into a valid JSON array. No extra quotation marks are needed.

Field Mapping vs. Template Mode

The Generic Webhook connector offers two primary methods for sending data to your endpoint:

1. Field Mapping Mode This is a simpler, form-based approach. You provide your endpoint URL and then map individual iContentForge variables to the specific field names (keys) your API expects.

📸

Webhook field mapping interface showing variable dropdowns.

  • Best for: Standard REST APIs where you send JSON with flat key-value pairs (e.g., { "title": "value", "body": "value" }).
  • Advantage: No JSON syntax to manage; less prone to configuration errors.

2. Template Mode This gives you full control. You write the complete JSON payload structure, embedding variables where needed using the {{variableName}} syntax.

📸

Webhook template editor showing a custom JSON payload.

  • Best for:
    • APIs requiring nested JSON objects.
    • APIs with specific, unchanging root-level keys.
    • When you need to combine variables with static text or values.
    • Sending data to serverless functions or middleware that reformat the payload.
  • Advantage: Maximum flexibility to match any API specification.
💡

Start with Field Mapping Mode if your API accepts simple field mappings. Switch to Template Mode only if you need complex nested structures or your API requires a very specific JSON schema that mapping cannot achieve.

Next Steps

Webhook Payload Variables — iContentForge Docs | iContentForge