API Documentation
  • 🦸User
    • 🐔requestDeveloperVerification
    • ☑️Accept Developer verification
    • 🚫Reject developer verification
    • 🆕NEW Authentication Trigger
  • 📧Send emails
  • 📂Projects
    • 📩Invite a new Team member
  • 📔Tasks
    • 💣Cancel Task
    • 🔎Submit task
    • 👨‍💻Assign Task
  • Step 1 taskflow
    • ✅Accept task
    • ❌Reject task
    • ⏳Deadline reached
  • Step 2 taskflow
    • ✅Accept developer (creator)
    • ❌Reject developer (creator)
  • Step 3 taskflow
    • 🚦Submit for review
    • ⏳Review Deadline reached
    • ✅Accept work result
    • ❌Reject work result
  • Step 4 Taskflow
    • 💸Generate Invoice
    • 💸Mark invoice as paid
Powered by GitBook
On this page
  • Input parameters
  • How to call from app
  • Logic

Send emails

Send emails docu

Input parameters

  1. to_email_adress

  2. template_name

  3. data (Data will be some other documents defined in each separate API call)

How to call from app

import { httpsCallable } from 'firebase/functions';

await httpsCallable(functions, 'sendEmail')({ 
  to: to_email_adress,  
  template: { 
    name: template_name, 
    data: {taskData: currentTask, taskId: task.id}
  }
});

Logic

1.

emailData = {
  to: to_email_adress
  template: {
    name: template_name
    data: data
  }

2. addDoc(collection(db, "send-emails"), emailData)

PreviousNEW Authentication TriggerNextProjects

Last updated 1 year ago

📧