Send Notifications with FCM

How to send push notifications to your app's users using Firebase Console and third-party tools: including targeting, scheduling, and deep link configuration.

Once your app is built with Firebase integration and installed on users' devices, you can send push notifications through Firebase Cloud Messaging (FCM). This article covers the main methods for sending notifications.

Method 1: Firebase Console (Manual)

The Firebase Console is the simplest way to send notifications: no code or API integration needed.

  1. Open console.firebase.google.com and select your project
  2. In the left menu, go to Engage → Messaging
  3. Click New campaign → Notification messages

Composing the Notification

  • Notification title: Displayed in bold at the top of the notification. Keep it short: 30–40 characters.
  • Notification text: The body of the notification. 1–2 sentences. Specific and actionable.
  • Notification image: Optional. An image URL to display with the notification (banner image).
  • Additional options → Android → Link: The URL to open when the notification is tapped. Enter your full URL (e.g., https://yourwebsite.com/new-post). With deep linking configured, this opens in your app. Without it, it opens in Chrome.

Target

Choose who receives the notification:

  • App: All users with your app installed who have notification permission
  • Topic: Users subscribed to a specific topic (requires topic subscription code in the app)
  • Segment: Users matching certain criteria (requires Google Analytics integration)

For most WebView apps, sending to App (all users) is the primary method.

Scheduling

Send immediately or schedule for a future date and time. Firebase allows scheduling up to 30 days in advance. Scheduled notifications are useful for time-sensitive events: an event reminder sent at 8am the day before, a sale notification at the start of a promotion.

Method 2: OneSignal (Automated / WordPress)

OneSignal is a notification management platform that integrates with FCM and adds automation capabilities. The free tier covers most small business needs.

For WordPress sites, OneSignal's WordPress plugin (OneSignal – Web Push Notifications) can automatically send a push notification to all app subscribers every time you publish a new post. This is the "publish a post → notification goes out → readers open the app" workflow that many bloggers use.

Setup summary for WordPress + OneSignal:

  1. Create a OneSignal account at onesignal.com
  2. Add a new Android app in OneSignal and connect your Firebase project credentials (Server key from Firebase Console → Project Settings → Cloud Messaging)
  3. Configure your WebToAppConvert app to use the OneSignal SDK: contact support for the SDK integration configuration
  4. Install and configure the OneSignal WordPress plugin
  5. Publish a test post and verify the notification arrives

Method 3: FCM HTTP API (Programmatic)

If you have a backend system that triggers notifications (order status updates, booking confirmations, inventory alerts), use the FCM HTTP v1 API to send notifications programmatically.

The Firebase Admin SDK is available for Node.js, Python, Java, Go, and C#. For a simple implementation:

// Node.js example using Firebase Admin SDK
const admin = require('firebase-admin');
admin.initializeApp({ credential: admin.credential.applicationDefault() });

const message = {
  notification: {
    title: 'Your order has shipped',
    body: 'Tap to track your delivery',
  },
  data: {
    url: 'https://yourwebsite.com/orders/12345',
  },
  topic: 'all_users', // or a specific device token
};

admin.messaging().send(message)
  .then(response => console.log('Notification sent:', response))
  .catch(error => console.error('Error:', error));

Notification Best Practices

  • Be specific: "New post: How to save 30% on your next order" converts better than "Check out our latest update"
  • Time it right: Send at times when users are active. Lunch hour and early evening tend to have higher open rates. Avoid early morning and late night.
  • Don't overdo frequency: 1–4 notifications per week is the range where most apps see high engagement without causing uninstalls. Daily notifications work for news apps and e-commerce; weekly or less for most other categories.
  • Include a link: Notifications that tap through to specific content convert better than notifications that open the app to the home page
  • Use deep links: Configure App Links so notification taps open in the app, not Chrome: see Deep Linking: How It Works

Still need help?

Can't find the answer you're looking for? Reach out to our support team.

Contact Support