Posts & Content Types
Create updates, offers, CTAs, and other Google Business post types
Quick Start
Create a Google Business Profile post with an image:
const { post } = await zernio.posts.createPost({
content: 'We are open this holiday weekend! Stop by for our special seasonal menu.',
mediaItems: [
{ type: 'image', url: 'https://example.com/holiday-special.jpg' }
],
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});
console.log('Posted to Google Business!', post._id);Content Types
Text + Image Post
The most common and recommended post type. A single image with text. No topicType field is needed -- STANDARD is the default.
const { post } = await zernio.posts.createPost({
content: 'Fresh seasonal menu available now! Visit us to try our new dishes.',
mediaItems: [
{ type: 'image', url: 'https://example.com/seasonal-menu.jpg' }
],
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});Text-Only Post
Text-only posts are supported but have lower visibility on Google Search and Maps. Adding an image or CTA is recommended.
const { post } = await zernio.posts.createPost({
content: 'Happy Friday! We are offering 20% off all services this weekend. Mention this post when you visit!',
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});Post with CTA Button
Add a call-to-action button to drive traffic. The CTA appears as a prominent button below the post content.
const { post } = await zernio.posts.createPost({
content: 'Book your appointment today! Limited spots available this week.',
mediaItems: [
{ type: 'image', url: 'https://example.com/booking.jpg' }
],
platforms: [{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
callToAction: {
type: 'BOOK',
url: 'https://mybusiness.com/book'
}
}
}],
publishNow: true
});Available CTA Types:
| Type | Description | Best For |
|---|---|---|
LEARN_MORE | Link to more information | Articles, about pages |
BOOK | Booking/reservation link | Services, appointments |
ORDER | Online ordering link | Restaurants, food |
SHOP | E-commerce link | Retail, products |
SIGN_UP | Registration link | Events, newsletters |
CALL | Phone call action | Contact, inquiries |
Event Post
Promote an event with a title, date range, and optional CTA. Events appear prominently on your Google listing with the event title and schedule.
const { post } = await zernio.posts.createPost({
content: 'Join us for our Grand Opening Weekend! Free samples and live music.',
mediaItems: [
{ type: 'image', url: 'https://example.com/grand-opening.jpg' }
],
platforms: [{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
topicType: 'EVENT',
event: {
title: 'Grand Opening Weekend',
schedule: {
startDate: { year: 2026, month: 5, day: 15 },
startTime: { hours: 9, minutes: 0 },
endDate: { year: 2026, month: 5, day: 16 },
endTime: { hours: 17, minutes: 0 }
}
},
callToAction: {
type: 'LEARN_MORE',
url: 'https://mybusiness.com/grand-opening'
}
}
}],
publishNow: true
});Schedule dates also accept ISO 8601 strings, which are converted automatically:
{
"topicType": "EVENT",
"event": {
"title": "Grand Opening Weekend",
"schedule": {
"startDate": "2026-05-15T00:00:00Z",
"startTime": "2026-05-15T09:00:00Z",
"endDate": "2026-05-16T00:00:00Z",
"endTime": "2026-05-16T17:00:00Z"
}
}
}Offer Post
Promote a deal with coupon codes, redemption URLs, and terms. Offer posts include an event object that sets the offer period and title displayed on Google.
const { post } = await zernio.posts.createPost({
content: 'Holiday sale! 20% off everything through the end of December.',
mediaItems: [
{ type: 'image', url: 'https://example.com/holiday-sale.jpg' }
],
platforms: [{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
topicType: 'OFFER',
event: {
title: 'Holiday Sale - 20% Off',
schedule: {
startDate: { year: 2026, month: 12, day: 1 },
endDate: { year: 2026, month: 12, day: 31 }
}
},
offer: {
couponCode: 'HOLIDAY20',
redeemOnlineUrl: 'https://mybusiness.com/shop',
termsConditions: 'Valid in-store and online. Cannot be combined with other offers.'
}
}
}],
publishNow: true
});Offer fields (all optional, but at least one recommended):
| Field | Type | Description |
|---|---|---|
couponCode | string | Promo code customers can use |
redeemOnlineUrl | string (URI) | URL where the offer can be redeemed |
termsConditions | string | Terms and conditions text |
Edit Published Posts
Edit Post replaces the post body (summary) text of a published Google Business Profile post. It behaves the same way for every post type on this page (standard, EVENT, and OFFER): only the summary text changes. The call to action, the event title and schedule, the offer fields (coupon code, redemption URL, terms), and the media stay exactly as published. To change the image, publish a new post.
There is no time window and no limit on the number of edits, and the post keeps its id, so id in the response matches the id returned when it was published.
const result = await zernio.posts.editPost({
postId: 'YOUR_POST_ID',
platform: 'googlebusiness',
content: 'We are open this holiday weekend! Extended hours, 8am to 8pm.'
});
console.log('Edited post:', result.id, result.url);If the post was published to several Google Business Profile locations, pass accountId to pick which copy to edit. Without it, the first googlebusiness entry on the post is used.
The post must still exist on Google. A post deleted from the Business Profile dashboard, and an EVENT or OFFER post whose end date has already passed, no longer exists on Google's side, so the edit returns 404. Publish a new post instead.