<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv" -->

---
title: Firebase AI Logic Tutorial #5 - AI Logic with Firestore
description: A hands-on tutorial demonstrates integrating a Firebase Extension called 'Multimodal tasks with the Gemini API' with Firestore to avoid an extra...
canonical: https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Firebase AI Logic Tutorial #5 - AI Logic with Firestore | daily.dev
og:description: A hands-on tutorial demonstrates integrating a Firebase Extension called 'Multimodal tasks with the Gemini API' with Firestore to avoid an extra...
og:url: https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv
og:image: https://api.daily.dev/og/posts/PYlXEkAKV.png
og:image:alt: Firebase AI Logic Tutorial #5 - AI Logic with Firestore
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Firebase AI Logic Tutorial #5 - AI Logic with Firestore

**[Net Ninja](https://daily.dev/sources/netninja)** · 11 min read · 1 upvotes · 0 comments

## Summary

A hands-on tutorial demonstrates integrating a Firebase Extension called 'Multimodal tasks with the Gemini API' with Firestore to avoid an extra browser-to-backend round trip when generating AI text. The extension listens for new documents added to an 'entries' collection, sends the original text and personality to a Gemini model via Vertex AI, and writes the response back into a 'glorified' field, which the frontend picks up via a real-time Firestore listener. Setup requires upgrading to Firebase's Blaze (pay-as-you-go) plan, enabling Cloud Functions, Cloud Storage, and Secret Manager, and configuring the collection path, prompt template, and response field. The video ends with a plug for the creator's Net Ninja Pro course library.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=sOeMAP5pf-c>

## Questions this post answers

### How can I trigger a Gemini AI response automatically when a new Firestore document is created?

Install the Firebase Extension called 'Multimodal tasks with the Gemini API' and configure it to listen to a specific Firestore collection path. When a new document is added, the extension sends a configured prompt (referencing document fields like personality and original text) to a Gemini model via Vertex AI, then writes the response into a specified response field on that same document, avoiding a second round trip from the browser.

_daily.dev surfaces practical Firebase and Gemini integration patterns for developers wiring AI into their data layer._

### Do I need a paid Firebase plan to use Firebase Extensions with the Gemini API?

Yes, installing Firebase Extensions requires upgrading from the free Spark plan to the pay-as-you-go Blaze plan, which needs a linked Google billing account. This applies even though sending prompts directly from the browser to a Gemini model does not require Blaze. The Blaze plan includes generous free usage limits, so small development apps often incur no charge.

_developers weighing Firebase pricing before adding AI features can track plan requirements like this on daily.dev._

## Similar posts on daily.dev

- [Build intelligent Android apps: Cloud and hybrid inference](https://daily.dev/posts/build-intelligent-android-apps-cloud-and-hybrid-inference-eyctih4y9) · Android Developers Blog · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#genai](https://daily.dev/tags/genai), [#firebase](https://daily.dev/tags/firebase), [#google-gemini](https://daily.dev/tags/google-gemini), [#firestore](https://daily.dev/tags/firestore)

[View this post on daily.dev](https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Firebase AI Logic Tutorial #5 - AI Logic with Firestore","url":"https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv"},"datePublished":"2026-08-28T16:15:20.153Z","dateModified":"2026-09-14T07:56:21.608Z","description":"A hands-on tutorial demonstrates integrating a Firebase Extension called 'Multimodal tasks with the Gemini API' with Firestore to avoid an extra...","image":"https://i.ytimg.com/vi/sOeMAP5pf-c/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/sOeMAP5pf-c/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Net Ninja","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Net Ninja","logo":"https://media.daily.dev/image/upload/s--IXsAE5jo--/f_auto/v1718348103/logos/netninja","url":"https://daily.dev/sources/netninja"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,genai,firebase,google-gemini,firestore","timeRequired":"PT11M","video":{"@type":"VideoObject","name":"Firebase AI Logic Tutorial #5 - AI Logic with Firestore","description":"A hands-on tutorial demonstrates integrating a Firebase Extension called 'Multimodal tasks with the Gemini API' with Firestore to avoid an extra...","thumbnailUrl":"https://i.ytimg.com/vi/sOeMAP5pf-c/sddefault.jpg","uploadDate":"2026-08-28T16:15:20.153Z","duration":"PT11M","url":"https://api.daily.dev/r/PYlXEkAKV","embedUrl":"https://www.youtube.com/embed/sOeMAP5pf-c"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Net Ninja","item":"https://daily.dev/sources/netninja"},{"@type":"ListItem","position":3,"name":"Firebase AI Logic Tutorial #5 - AI Logic with Firestore"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/firebase-ai-logic-tutorial-5---ai-logic-with-firestore-pylxekakv#faq","mainEntity":[{"@type":"Question","name":"How can I trigger a Gemini AI response automatically when a new Firestore document is created?","acceptedAnswer":{"@type":"Answer","text":"Install the Firebase Extension called 'Multimodal tasks with the Gemini API' and configure it to listen to a specific Firestore collection path. When a new document is added, the extension sends a configured prompt (referencing document fields like personality and original text) to a Gemini model via Vertex AI, then writes the response into a specified response field on that same document, avoiding a second round trip from the browser. daily.dev surfaces practical Firebase and Gemini integration patterns for developers wiring AI into their data layer."}},{"@type":"Question","name":"Do I need a paid Firebase plan to use Firebase Extensions with the Gemini API?","acceptedAnswer":{"@type":"Answer","text":"Yes, installing Firebase Extensions requires upgrading from the free Spark plan to the pay-as-you-go Blaze plan, which needs a linked Google billing account. This applies even though sending prompts directly from the browser to a Gemini model does not require Blaze. The Blaze plan includes generous free usage limits, so small development apps often incur no charge. developers weighing Firebase pricing before adding AI features can track plan requirements like this on daily.dev."}}]}
```

