# Using Conditionals When Publishing to Production

### About this export

| Field | Value |
| --- | --- |
| **content_type** | lesson |
| **platform** | contentstack-academy |
| **source_url** | https://www.contentstack.com/academy/courses/automate-foundations/using-conditionals-when-publishing-to-production |
| **course_slug** | automate-foundations |
| **lesson_slug** | using-conditionals-when-publishing-to-production |
| **markdown_file_url** | /academy/md/courses/automate-foundations/using-conditionals-when-publishing-to-production.md |
| **generated_at** | 2026-05-11T07:02:18.532Z |

> Part of **[Automate Foundations](https://www.contentstack.com/academy/courses/automate-foundations)** on Contentstack Academy. **Academy MD v3** — structured for retrieval; no quiz or assessment keys.

<!-- ai_metadata: {"lesson_id":"14","type":"video","duration_seconds":125,"video_url":"https://cdn.jwplayer.com/previews/LHUBP0RN","thumbnail_url":"https://cdn.jwplayer.com/v2/media/LHUBP0RN/poster.jpg?width=720","topics":["Using","Conditionals","When","Publishing","Production"]} -->

#### Video details

#### At a glance

- **Title:** Ah-conditionals With Email Notification
- **Duration:** 2m 5s
- **Media link:** https://cdn.jwplayer.com/previews/LHUBP0RN
- **Publish date (unix):** 1713750111

#### Streaming renditions

- application/vnd.apple.mpegurl
- audio/mp4 · AAC Audio · 113550 kbps
- video/mp4 · 180p · 180p · 143174 kbps
- video/mp4 · 270p · 270p · 159853 kbps
- video/mp4 · 360p · 360p · 176680 kbps
- video/mp4 · 406p · 406p · 188231 kbps
- video/mp4 · 540p · 540p · 222882 kbps
- video/mp4 · 720p · 720p · 274420 kbps
- video/mp4 · 1080p · 1080p · 390936 kbps

#### Timed text tracks (delivery)

- **thumbnails:** `https://cdn.jwplayer.com/strips/LHUBP0RN-120.vtt`

#### Video transcript

In this video, we're going to send an email notification whenever we publish our blog to production. To do this, we're going to create a conditional. Let's get started. First, create the new automation. We're going to call this send email when publishing blog to production. We're going to use a publish event. So start with the content stack connector, then entry trigger, and publish event. Select our stack, and go ahead and here we can also choose our content type. So we want to filter on blog content, and then we're going to proceed. Let's test our trigger. Go ahead and publish something to any environment, and now let's retest, and that looks good. So let's go save and exit, and then on the next step, we want to choose our conditional path. Conditional path, add condition, and here we're going to choose our environment. So you can see down here I have body.data environment name. That's the one we want to choose. So you can see it has a value of production right now. Our operator is going to be matches, and then over here under input, we're going to say type in the string production. So only when this matches production, we're going to do something. So I hit save and configuration. You can also name this too. So I'm going to name this of publish to production. So if we are publishing to production, then come over here and we want to send the email notification. So over here I can do email by automation hub, and here fill in my values. That's about it for this video. Thank you very much.

#### Key takeaways

- Connect **Using Conditionals When Publishing to Production** back to your stack configuration before moving to the next module.
- Capture one concrete artifact (screenshot, Postman call, or code snippet) that proves the step works in your environment.
- Re-read the delivery versus management boundary for anything you changed in the entry model.

## Supplement for indexing

### Content summary

Using Conditionals When Publishing to Production. Using Conditionals When Publishing to Production in Automate Foundations (automate-foundations).

### Retrieval tags

- Using
- Conditionals
- When
- Publishing
- Production
- automate-foundations
- lesson 14
- Using Conditionals When Publishing to Production
- automate-foundations lesson

### Indexing notes

Index this lesson as a primary chunk tagged with lesson_id "14" and topics: [Using, Conditionals, When, Publishing, Production].
Parent course slug: automate-foundations. Use asset_references URLs as thumbnail hints in search results when present.
Never surface LMS quiz content or assessment answers from this file.

### Asset references

| Label | URL |
| --- | --- |
| Video thumbnail: Using Conditionals When Publishing to Production | `https://cdn.jwplayer.com/v2/media/LHUBP0RN/poster.jpg?width=720` |

### External links

| Label | URL |
| --- | --- |
| Contentstack Academy home | `https://www.contentstack.com/academy/` |
| Training instance setup | `https://www.contentstack.com/academy/training-instance` |
| Academy playground (GitHub) | `https://github.com/contentstack/contentstack-academy-playground` |
| Contentstack documentation | `https://www.contentstack.com/docs/` |
