Variables Reference
The following variables can be used when triggering a FeedHive automation:
Core Variables
Variable | Required | Description |
---|---|---|
text | Optional* | The text content for the post. Required if no template is assigned to the trigger. |
prompt | Optional* | The prompt to generate post content using AI. Required if an AI model is assigned to the trigger. |
scheduled | Optional | ISO date string for when the post should be scheduled (e.g., "2024-01-15T10:00:00Z"). Only used with "Create & Publish" action. |
media_urls | Optional | Array of media URLs to include in the post. |
Example with text
curl -X POST https://api.feedhive.com/triggers/xxxxx \
-d '{
"text": "Your post content here",
"scheduled": "2024-01-15T10:00:00Z",
"media_urls": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"]
}'
Example with prompt
curl -X POST https://api.feedhive.com/triggers/xxxxx \
-d '{
"prompt": "Write a social media post about the benefits of remote work",
"scheduled": "2024-01-15T10:00:00Z",
"media_urls": "https://example.com/remote-work.jpg"
}'
Platform-Specific Variables
YouTube, Google My Business, and Pinterest
Variable | Required | Description |
---|---|---|
title | Optional | The title of the post. Used by YouTube, Google My Business, and Pinterest platforms. |
link | Optional | A link to include with the post. Used by YouTube, Google My Business, and Pinterest platforms. |
Example
curl -X POST https://api.feedhive.com/triggers/xxxxx \
-d '{
"text": "Check out our latest video!",
"title": "Amazing Tutorial Video",
"link": "https://example.com/more-info"
}'
Google My Business Only
Variable | Required | Description |
---|---|---|
couponCode | Optional | Coupon code for Google My Business posts. |
startDate | Optional | Start date for promotions (ISO date string). |
endDate | Optional | End date for promotions (ISO date string). |
cta | Optional | Call-to-action button. Must be one of the supported CTA values. |
termsAndConditions | Optional | Terms and conditions text for Google My Business posts. |
Example
curl -X POST https://api.feedhive.com/triggers/xxxxx \
-d '{
"text": "Special offer this week!",
"title": "Winter Sale",
"couponCode": "WINTER2024",
"startDate": "2024-01-01T00:00:00Z",
"endDate": "2024-01-31T23:59:59Z",
"cta": "SHOP_NOW",
"termsAndConditions": "Valid while supplies last. Cannot be combined with other offers."
}'
Custom Template Variables
When using a template, you can define custom variables using the [[variable-name]]
syntax in your template. These variables can then be passed in your trigger request.
Example
curl -X POST https://api.feedhive.com/triggers/xxxxx \
-d '{
"text": "Check out this blog post!",
"blog_title": "My Amazing Blog Post",
"blog_url": "https://example.com/blog-post",
"author_name": "John Doe"
}'
*Note: The text
parameter is required unless a template is assigned to the trigger that provides the post content.