AutomationFlowsGeneral › Send Notification to Topic

Send Notification to Topic

Send Notification to Topic. Uses n8n-nodes-firebase-cloud-message, writeFile. Scheduled trigger; 4 nodes.

Cron / scheduled trigger★★★★☆ complexity4 nodesN8N Nodes Firebase Cloud MessageWrite File
General Trigger: Cron / scheduled Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Send Notification to Topic",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      },
      "id": "b8b8eb4e-e4b1-5b4e-af06-8b6d58fc065d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Sample data - in a real scenario, this would come from a database or another service\nreturn {\n  topic: \"news\",\n  title: \"Breaking News\",\n  body: \"This is a breaking news notification sent to all subscribers!\",\n  data: {\n    category: \"world\",\n    articleId: \"12345\",\n    timestamp: Date.now()\n  }\n};"
      },
      "id": "e5f1f92d-3e2g-5f33-997d-e4d88f5b9c9a",
      "name": "Prepare Topic Notification",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        470,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "serviceAccount",
        "operation": "sendToTopic",
        "topic": "={{ $node[\"Prepare Topic Notification\"].json[\"topic\"] }}",
        "options": {
          "notification": {
            "title": "={{ $node[\"Prepare Topic Notification\"].json[\"title\"] }}",
            "body": "={{ $node[\"Prepare Topic Notification\"].json[\"body\"] }}"
          },
          "data": "={{ $node[\"Prepare Topic Notification\"].json[\"data\"] }}",
          "android": {
            "priority": "high",
            "notification": {
              "clickAction": "OPEN_NEWS_ACTIVITY"
            }
          }
        }
      },
      "id": "9e0c8f9d-7g6b-5c8b-0f2e-4d3e5f6g7h8i",
      "name": "Firebase Cloud Message",
      "type": "n8n-nodes-firebase-cloud-message",
      "typeVersion": 1,
      "position": [
        690,
        300
      ],
      "credentials": {
        "firebaseCloudMessageApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrCreate",
        "fileName": "={{ 'notification_log_' + $now.format('YYYY-MM-DD') + '.txt' }}",
        "options": {
          "append": true
        },
        "content": "={{ $now.format('YYYY-MM-DD HH:mm:ss') + ' - Sent notification to topic \"' + $node[\"Prepare Topic Notification\"].json[\"topic\"] + '\" with title \"' + $node[\"Prepare Topic Notification\"].json[\"title\"] + '\"\\n' }}"
      },
      "id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
      "name": "Write Log",
      "type": "n8n-nodes-base.writeFile",
      "typeVersion": 1,
      "position": [
        910,
        300
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Prepare Topic Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Topic Notification": {
      "main": [
        [
          {
            "node": "Firebase Cloud Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Firebase Cloud Message": {
      "main": [
        [
          {
            "node": "Write Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "staticData": null,
  "tags": [
    {
      "name": "example",
      "color": "#00cc00"
    }
  ],
  "versionId": "2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Send Notification to Topic. Uses n8n-nodes-firebase-cloud-message, writeFile. Scheduled trigger; 4 nodes.

Source: https://github.com/jaimeneto85/n8n-nodes-firebase-cloud-message/blob/21d8abcec869d9b8cef6985ab56b3a4c90a4fa4c/examples/send-notification-to-topic.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Add Liked Songs To A Spotify Monthly Playlist. Uses stickyNote, spotify, nocoDb, noOp. Scheduled trigger; 30 nodes.

Spotify, Noco Db
General

&gt; This Workflow is a port of Add saved songs to a monthly playlist from IFTTT.

Spotify, Noco Db
General

This automation template allows you to automatically receive news from RSS feeds, process their content, and publish or schedule posts on various social media platforms using PostPulse.

@Postpulse/N8N Nodes Postpulse, RSS Feed Read
General

Send Google Analytics Data To A I To Analyze Then Save Results In Baserow. Uses scheduleTrigger, manualTrigger, stickyNote, googleAnalytics. Scheduled trigger; 22 nodes.

Google Analytics, HTTP Request, Baserow
General

This n8n template automates daily backups of workflows and credentials to S3-compatible storage with automatic retention management. Designed for self-hosted n8n instances requiring disaster recovery

n8n, S3, Execute Command +1