Triggers
Reference

Variables Reference

The following variables can be used when triggering a FeedHive automation:

Core Variables

VariableRequiredDescription
textOptional*The text content for the post. Required if no template is assigned to the trigger.
promptOptional*The prompt to generate post content using AI. Required if an AI model is assigned to the trigger.
scheduledOptionalISO date string for when the post should be scheduled (e.g., "2024-01-15T10:00:00Z"). Only used with "Create & Publish" action.
media_urlsOptionalArray 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

VariableRequiredDescription
titleOptionalThe title of the post. Used by YouTube, Google My Business, and Pinterest platforms.
linkOptionalA 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

VariableRequiredDescription
couponCodeOptionalCoupon code for Google My Business posts.
startDateOptionalStart date for promotions (ISO date string).
endDateOptionalEnd date for promotions (ISO date string).
ctaOptionalCall-to-action button. Must be one of the supported CTA values.
termsAndConditionsOptionalTerms 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.