Skip to content

Latest commit

 

History

History

alerts-to-discord

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Quickstart: Send Firebase Alerts to Discord

This quickstart demonstrates how to trigger a function based on a Firebase Alert, and send information about the alert to a channel in a Discord server.

Screen Shot 2022-04-29 at 11 12 12 AM

Set up and Deploy

Discord Webhook URL

The sample uses Discord Webhooks to send alerts to a Discord channel. You'll need to create a Webhook and hook it up the function by creating an environment variable:

  1. Follow the "MAKING A WEBHOOK" instructions in the Discord docs.
  2. Copy the Webhook URL
  3. Create a .env file in the functions directory
  4. Add the DISCORD_WEBHOOK_URL variable and set it to your Webhook URL:
    DISCORD_WEBHOOK_URL="<your webhook url>"

Deploy

Deploy functions using the Firebase CLI:

$ firebase deploy

License

© Google, 2022. Licensed under an Apache-2 license.