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 Name | Type | Description | Example Value |
|---|---|---|---|
title | string | The full title of the generated article. | "How to Optimize Images for SEO in 2024" |
slug | string | The URL-friendly slug derived from the title. | "how-to-optimize-images-for-seo" |
html | string | The final article content formatted in clean HTML. | "<h2>Introduction</h2><p>Image optimization is..." |
markdown | string | The article content in Markdown format. | "## Introduction\n\nImage optimization is..." |
excerpt | string | A short summary or the first paragraph of the article. | "Learn the key techniques for compressing and tagging images to improve page speed and rankings." |
metaTitle | string | The SEO meta title, often similar to or based on the article title. | "Image SEO: A Complete Optimization Guide | YourSite" |
metaDescription | string | The 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." |
keyword | string | The primary target keyword for the article. | "image seo" |
wordCount | integer | The approximate total number of words in the article. | 1250 |
readingTime | integer | The estimated reading time in minutes. | 5 |
categories | array | An array of category names assigned to the article. | ["SEO", "Technical SEO"] |
tags | array | An array of tag names assigned to the article. | ["images", "page speed", "alt text"] |
publishedAt | string | The scheduled publication date and time in ISO 8601 format. | "2024-11-15T14:30:00.000Z" |
projectName | string | The name of the iContentForge project the article belongs to. | "SEO Blog" |
projectDomain | string | The primary domain associated with the project. | "https://example.com" |
authorName | string | The 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
- Learn how to set up the connector: Generic Webhook Integration
- Understand the article generation workflow: Article Statuses & Drip Feed
- Explore other publishing options: CMS Integrations Overview