Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

210
Visualizações
How do I create a Trigger function to listen to changes/updates in a subcollection in firebase?

My goal is to create a trigger functions that listens to updates/changes being made in a subcollection inside of firebase.

Here's how the firebase database is structured. There's a collection named "searchRequests"(PARENT COLLECTION), with the sub-collection named "offers" with the data that i'll like to trigger when a change or update has been made inside the "status" field. image of my firebase database image of firebase database with subcollection

Here's what I have tried so far and many other options but no luck. Hoping a fellow mate from StackOverflow could help :)

const functions = require("firebase-functions");
const admin = require('firebase-admin')
admin.initializeApp()




exports.sendEmailforNewBid = functions.firestore.document('offers/{projectId}')
.onUpdate((snap,ctx)=>{

    const data=snap.data();
    

});
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda