# Announce every Contentful publish in Slack with an AI summary

> The second a blog post, landing page, or release note goes live in Contentful, your team gets a Slack message with the title, author, live link, and a 2-3 sentence plain-English summary.

- Workflow type: agent
- Services: Contentful, Slack Bot
- Categories: Marketing, Operations
- Published: 2026-07-17

## What it does

- Listens for Contentful publish events in real time and reacts within seconds
- Only announces content types you care about (blog posts, landing pages, release notes) and quietly ignores fixtures, snippets, and reference data
- Pulls the freshly published entry back from Contentful to grab the title, content type, author, and body
- Writes a friendly 2-3 sentence 'what this is about' summary in plain English from the body or summary fields
- Posts a tidy Slack message to a channel of your choosing with the title, content type, author, a link to view it live, and a link back to Contentful to edit

## What you'll need

- A Contentful account with permission to create outgoing webhooks in your space
- A Slack workspace and a channel where publish announcements should land
- The list of content type IDs you want announced (for example: blogPost, landingPage, releaseNote)
- The public URL pattern for your site so links in Slack point to the live page

## Prompt

Whenever a Contentful entry is published, post a short "what just shipped" announcement to a designated Slack channel. This is a webhook-triggered agent: Contentful fires an outgoing webhook on the Entry.publish topic (see https://www.contentful.com/developers/docs/webhooks/overview/), the agent picks it up, and one Slack message goes out per qualifying publish.

Trigger: a Contentful outgoing webhook configured for the Entry.publish topic on the relevant space/environment. The webhook payload includes sys.id, sys.contentType.sys.id, sys.space.sys.id, sys.environment.sys.id, and sys.updatedBy — enough to identify the entry and refetch it.

Configuration the workflow should surface as inputs: (1) an allowlist of content type IDs to announce (default example: blogPost, landingPage, releaseNote); (2) the Slack channel ID or name to post to; (3) the public URL template for the live page, using {slug} as a placeholder (for example https://example.com/blog/{slug}); (4) optionally, the Contentful space/environment IDs if not carried by the webhook payload.

Steps to run on each webhook: 1) Read sys.contentType.sys.id from the payload. If it is NOT in the configured allowlist, exit silently — do not post to Slack. This is how we skip fixtures, snippets, and reference data. 2) Use Contentful's Get Entry to fetch the freshly published entry by its sys.id from the correct space and environment. 3) Extract the human-facing fields: title (fall back to name/heading if title is missing), slug, body/content/summary/description (whichever the content type uses), and the author reference if present. 4) If the entry has an author reference field pointing to another entry, call Get Entry a second time on that reference to resolve the author's display name. If the payload only carries a Contentful user id in sys.updatedBy or sys.publishedBy, surface it as a plain string — do not fail the workflow on a missing name. 5) Optionally call Get Content Type to resolve the content type's display name (for example "Blog Post" instead of "blogPost") so the Slack message reads nicely.

Compose the summary: write 2-3 sentences of plain-English prose describing what the entry is about, drawn strictly from the body/summary/description fields on the entry. Keep it factual and readable — no hype, no invented details. If the body is empty or the entry has no summarizable text yet, say so honestly ("No body content yet — this entry was published as a stub.") rather than fabricating a summary.

Post to Slack using the Slack Bot Send a Message action to the configured channel. The message should include: the entry title (bold), the resolved content type display name, the author name (or "unknown" if not resolvable), a "View page" link built from the configured URL template + slug, an "Edit in Contentful" link of the form https://app.contentful.com/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}, and the 2-3 sentence AI-drafted summary underneath. Use Slack's mrkdwn conventions: *bold*, <url|text> for links, and short line breaks between sections so it renders cleanly in the channel.

Guardrails: exactly one Slack message per Entry.publish event (no threading, no follow-ups). Silently skip Entry.create, Entry.save, Entry.archive, Entry.unpublish, and Entry.delete — only Entry.publish qualifies. If Contentful returns 404 on Get Entry (rare — the entry was deleted between publish and fetch), skip that event without alerting. If the resolved content type is missing from the allowlist, exit before any Slack call. Never post partial or malformed messages if a required field is missing — degrade gracefully with sensible placeholders.

## How to customize

- Change the allowlist of content types — add product pages, help articles, case studies, or narrow it down to just the blog
- Point it at a different Slack channel per team, or fan out to multiple channels based on content type
- Rewrite the tone of the summary — keep it neutral, make it playful, or add a call-to-action ('give it a read')

## FAQ

### Does this fire the moment something is published, or on a delay?

The moment. Contentful sends an outgoing webhook the instant an editor hits Publish, so the Slack message usually lands within a few seconds.

### Will it spam my channel with every tiny content change?

No. It only reacts to the Publish event, and it filters by content type. Reference data, snippets, page fragments, and any content type you don't include in the allowlist are silently ignored.

### How does it decide what the summary should say?

It reads the body or summary fields on the entry and drafts a 2-3 sentence overview in plain English. It never invents facts — if the body is empty, it says so instead of guessing.

### Can it handle draft-then-publish updates on the same entry?

Yes. Each publish is announced independently, so republishing an updated post triggers a fresh Slack message reflecting the new version.

### What about entries with an author reference field?

If the entry links to an author (a common blog-post pattern in Contentful), the workflow follows that reference to pull the author's name for the Slack message.

Use this prompt in General Input: https://www.generalinput.com/prompts/announce-every-contentful-publish-in-slack-with-an-ai-summary