ابدأ باستخدام إضافة Bird على Firebase

Bird

01‏/06‏/2021

امتداد Firebase

1 min read

ابدأ باستخدام إضافة Bird على Firebase

النقاط الرئيسية

    • The Bird | Firebase Extension allows developers to send messages and notifications across SMS, WhatsApp, Messenger, Google Business Messages, Telegram, LINE, Viber, and more—directly from Firestore document writes.

    • When a new document is added to the configured Firestore collection, the extension converts it into a readable message payload and sends it via Bird’s Conversations API, then updates the document with delivery status.

    • This extension removes the need for a backend integration with Bird’s API, enabling teams to ship messaging features faster with minimal code.

    • Firebase’s real-time and scalable infrastructure pairs with Bird’s global connectivity, ensuring reliable message delivery anywhere in the world.

    • A sample use case demonstrates how restaurants can automate SMS notifications to customers waiting for tables—only requiring a Firestore write.

    • Setup requires only a Bird API key and an SMS (or other channel) ID; configuration is done through Firebase’s extension installation wizard.

    • Developers define the Firestore collection the extension listens to—every new document becomes a message trigger.

    • After sending, the extension enriches the Firestore document with delivery data, status, and error messages if applicable.

    • Security best practices are essential: Firestore rules must tightly restrict read/write access to prevent abuse or unauthorized message sending.

    • Cloud Functions logs allow developers to inspect message failures, extension execution errors, and delivery outcomes.

    • The extension works seamlessly with the broader Bird ecosystem, enabling future enhancements like AI-based flows, image recognition, or CRM automation.

    • This integration creates a foundation for richer experiences, such as enabling customers to reply with keywords, building restaurant queue features, or connecting to external APIs via Flow Builder.

أبرز الأسئلة والأجوبة

  • What does the Bird Firebase extension do?

    It listens to changes in a Firestore collection and sends messages through Bird’s Conversations API whenever a new document is added.

  • Which channels can the extension send messages through?

    SMS, WhatsApp, Facebook Messenger, Google Business Messages, Telegram, LINE, Viber, and any other Bird-supported channels.

  • Do I need a backend server to send messages?

    No. The extension handles all API interactions—messaging becomes as simple as writing a document to Firestore.

  • What information is required from my Bird account?

    You’ll need your Bird API key and a channel ID (e.g., for SMS).

  • How do I install the extension?

    Through the Firebase console → Extensions → Install “Send Messages with Bird,” and then configure your API key and collection name.

  • How does the extension know when to send a message?

    It monitors the specified Firestore collection and triggers whenever a new document is created.

  • What does the message document format look like?

    A simple JSON containing the destination, channel ID, and message text (or payload for other channels).

  • What happens after a message is sent?

    The extension updates the Firestore document with delivery metadata like delivery.state, timestamps, and error details (if any).

  • How can I check for errors?

    Errors appear in the updated Firestore document and also in the Cloud Functions logs within Firebase.

  • How do I secure my Firestore collection?

    Use Firestore security rules to restrict read/write access only to authorized users or service accounts.

  • Can I use this extension for more advanced workflows?

    Yes — you can pair it with Flow Builder, external APIs, or machine-learning tools like Google Vision to build interactive, automated experiences.

  • What’s a real-world example of using this extension?

    A restaurant queue system that sends SMS notifications when a table is ready — triggered simply by adding a Firestore document.

تتيح لك Firebase تطوير ونشر تطبيقات عالية الجودة بسرعة، مقرونة بوظائف موسعة تمكنك من تحسين وتوسيع تطبيقك بشكل مستمر. تستضيف Firebase أيضًا امتدادات مفتوحة المصدر معبأة مسبقًا لمساعدتك في أتمتة مهام التطوير الشائعة.

اليوم، نحن متحمسون لمناقشة امتداد Bird | Firebase.

إرسال الرسائل والإشعارات مع Bird

The Bird extension on Firebase connects you to the world’s largest omnichannel portfolio to deliver messages and notifications on all of your customers’ preferred channels. Powered by Bird’s global connectivity, this means you can reach your customers quickly — and anywhere in the world! 

Communication app icons with platforms including WhatsApp, Telegram, Instagram, Messenger, and various social media apps.

To further streamline the process, when you add a document to a specific Firebase collection, the extension will utilize Bird’s Conversations API to convert that document into readable text and update the document with the delivery status.

In this article, you will learn how you can get sending in just a few steps!

مثال على حالة استخدام

عندما سمعت أن زملائي عملوا على إنشاء امتداد Firebase الذي سيسمح لك بسهولة دمج إرسال الرسائل في تطبيقك، كان علي أن أجربه وأبني شيئًا به.

ملاحظة: يمكنك العثور على امتداد Bird على Firebase هنا.

لإدخال الامتداد في السياق، سننظر في تطبيق مثالي صغير لإدارة الطوابير في مطعم.

يمكن لمالك المطعم أو المضيف تسجيل العملاء على واجهة المستخدم على الويب أو يمكن للعملاء تسجيل أنفسهم. عندما تكون طاولتهم جاهزة، بمجرد نقرة زر واحدة من موظف المطعم، سيتم إرسال إشعار إلى العميل للعودة إلى المطعم.

بينما توجد العديد من الطرق لبناء نظام لإخطار المستخدمين، أفضل الحلول تقلل من العمل قدر الإمكان للعملاء. يساعد هذا الشركات في تقديم تجربة ممتازة لعملائها.

لهذا السبب سنستخدم الامتداد الجديد Bird | Firebase للتأكد من إخطار العملاء عبر رسالة SMS. بهذه الطريقة، يمكن للعملاء الاستمتاع بوقت انتظارهم وعدم القلق بشأن تفويت الفرصة، بينما أيضًا تسهل على موظفي المطعم إدارة الطابور.

بينما يرسل هذا المثال إشعارًا عبر SMS، داخل الامتداد يمكنك استخدام أي قناة يفضلها العميل (WhatsApp، رسائل Google للأعمال، فيسبوك ماسنجر، تيليجرام، لاين، فايبر، إلخ) بحيث يمكنك تكييف الإشعار حسب تفضيلات العميل.

عندما سمعت أن زملائي عملوا على إنشاء امتداد Firebase الذي سيسمح لك بسهولة دمج إرسال الرسائل في تطبيقك، كان علي أن أجربه وأبني شيئًا به.

ملاحظة: يمكنك العثور على امتداد Bird على Firebase هنا.

لإدخال الامتداد في السياق، سننظر في تطبيق مثالي صغير لإدارة الطوابير في مطعم.

يمكن لمالك المطعم أو المضيف تسجيل العملاء على واجهة المستخدم على الويب أو يمكن للعملاء تسجيل أنفسهم. عندما تكون طاولتهم جاهزة، بمجرد نقرة زر واحدة من موظف المطعم، سيتم إرسال إشعار إلى العميل للعودة إلى المطعم.

بينما توجد العديد من الطرق لبناء نظام لإخطار المستخدمين، أفضل الحلول تقلل من العمل قدر الإمكان للعملاء. يساعد هذا الشركات في تقديم تجربة ممتازة لعملائها.

لهذا السبب سنستخدم الامتداد الجديد Bird | Firebase للتأكد من إخطار العملاء عبر رسالة SMS. بهذه الطريقة، يمكن للعملاء الاستمتاع بوقت انتظارهم وعدم القلق بشأن تفويت الفرصة، بينما أيضًا تسهل على موظفي المطعم إدارة الطابور.

بينما يرسل هذا المثال إشعارًا عبر SMS، داخل الامتداد يمكنك استخدام أي قناة يفضلها العميل (WhatsApp، رسائل Google للأعمال، فيسبوك ماسنجر، تيليجرام، لاين، فايبر، إلخ) بحيث يمكنك تكييف الإشعار حسب تفضيلات العميل.

عندما سمعت أن زملائي عملوا على إنشاء امتداد Firebase الذي سيسمح لك بسهولة دمج إرسال الرسائل في تطبيقك، كان علي أن أجربه وأبني شيئًا به.

ملاحظة: يمكنك العثور على امتداد Bird على Firebase هنا.

لإدخال الامتداد في السياق، سننظر في تطبيق مثالي صغير لإدارة الطوابير في مطعم.

يمكن لمالك المطعم أو المضيف تسجيل العملاء على واجهة المستخدم على الويب أو يمكن للعملاء تسجيل أنفسهم. عندما تكون طاولتهم جاهزة، بمجرد نقرة زر واحدة من موظف المطعم، سيتم إرسال إشعار إلى العميل للعودة إلى المطعم.

بينما توجد العديد من الطرق لبناء نظام لإخطار المستخدمين، أفضل الحلول تقلل من العمل قدر الإمكان للعملاء. يساعد هذا الشركات في تقديم تجربة ممتازة لعملائها.

لهذا السبب سنستخدم الامتداد الجديد Bird | Firebase للتأكد من إخطار العملاء عبر رسالة SMS. بهذه الطريقة، يمكن للعملاء الاستمتاع بوقت انتظارهم وعدم القلق بشأن تفويت الفرصة، بينما أيضًا تسهل على موظفي المطعم إدارة الطابور.

بينما يرسل هذا المثال إشعارًا عبر SMS، داخل الامتداد يمكنك استخدام أي قناة يفضلها العميل (WhatsApp، رسائل Google للأعمال، فيسبوك ماسنجر، تيليجرام، لاين، فايبر، إلخ) بحيث يمكنك تكييف الإشعار حسب تفضيلات العميل.

كيفية الإعداد

In this example, we will assume you have a Firebase and Bird account.

If you don't have a Bird account, you can create one here.

To begin, it requires information from your Bird account.

First, you will need your API key to allow the Firebase extension to interact with the Bird API on your behalf. You can find your API key in the Bird API settings. Second, you will need an SMS number and an installed SMS channel. If you do not have a Channel ID already, navigate to the SMS channel setup page to get one.

Once you have both your API key and an SMS Channel ID, return to your Firebase console and navigate to the Extensions tab.

From here, install the [Send Messages with Bird] Firebase extension.

Firebase Extensions marketplace showing the 'Send Messages with Bird' integration among other available extensions, allowing developers to connect Firebase with Bird's messaging API.

During the install wizard, you will be prompted to add your API key and a collection name to use.

The collection name will be listened to by the Firebase extension.

When a document is added to the collection, it will trigger the extension.

Under the hood, the extension is a Cloud Function, which listens to changes on the specified collection, reads the added document and interacts with the Bird API to send the message.

Configuration page for installing the MessageBird Firebase extension, showing setup fields for API key, message collection name, and deployment options.

Once your extension installation is complete, navigate to Firestore within the Firebase console. Then, add a collection ID that matches the collection name you used when installing the extension.

Note: It is very important to restrict who can write and read to this collection. If the collection is left open, third parties may be able to read the numbers of users and even send messages with your account. We would recommend using the Firestore security rules so only specific users have these privileges and follow all the security best practices put forth by the Firebase team.

كيفية إرسال الرسائل

The messages collection that we configured during setup will store all your messages. To send an SMS message, you will need to add a document to the collection you named in the wizard using this format:

Code snippet showing the JSON structure for sending messages through Bird API with fields for channel ID, recipient, and message content.

Once the document is added to the collection, the Bird extension will then interact with the Bird API and update the document with extra fields as below. The delivery.state field below depicts the different statuses the message can be in.

JavaScript code example showing how to send SMS notifications through Firebase and Bird integration, with template for restaurant table readiness alerts and delivery status monitoring.

If sending a message results in a failure, the state field will be ERROR, and the error field will be populated with an error message string.

It is also possible to observe errors from the extension and usage via in the Cloud functions tab in the Firebase console:

Firebase Cloud Functions dashboard showing the deployed MessageBird extension triggered by document writes to the messages collection.

التجربة لك ولعملائك

Restaurant waitlist form with MessageBird logo, requesting customer name, party size, and phone number to send table availability notifications.Confirmation page showing a customer named Jim has been added to the restaurant waitlist, with notification that an SMS will be sent when their table is ready.Restaurant staff interface showing waitlist with customers and their party sizes, where three parties have been notified and Jim's party of four is ready to be notified.Restaurant management interface showing all waitlisted customers have been notified, including Jim's party of four who was previously pending notification.Mobile phone screen showing an SMS notification from a restaurant informing Jim that his table is almost ready.

قم بتثبيت امتداد Bird Firebase للتواصل مع عملائك - أسهل من أي وقت مضى

الآن، لم تعد بحاجة إلى تكامل API مباشر مع الواجهة الخلفية للتفاعل مع Bird API.

يمكنك تبسيط التنفيذ عبر امتداد Firebase وجعل إرسال الإشعارات بسيطًا مثل عمليات كتابة الوثائق — بغض النظر عن قناة الاتصال التي تريد استخدامها.

هذا فقط يلامس السطح لما يمكنك القيام به مع الامتداد وAPI الخاص بنا.

نحن نقدم العديد من القنوات ولدينا أيضًا محرر مرئي قوي بشكل لا يصدق في Flow Builder يتيح لك إنشاء تجارب أكثر ديناميكية. للحالات المتقدمة، يمكنك حتى دمج Flow Builder مع APIs خارجية مثل Google Vision API وCloud Functions لإضافة التعرف على الصور بواسطة AI لتفاعلات عملائك. مع Flow Builder، يمكنك أيضًا أتمتة سير عمل CRM مثل إنشاء العملاء المحتملين والحالات في Salesforce مباشرة من تفاعلات العملاء.

وفقًا لحالة الاستخدام السابقة، سيتيح لك Flow Builder إضافة ميزة الرد على الإشعارات المرسلة، مما يمكن العميل من الرد بكلمة مفتاحية أو عبارة لإلغاء الحجز. ولكن هذا لمقال مستقبلي! 🙂

إذا كان لديك أي حالات استخدام أخرى تهتم بها، فإن مهندسينا المتخصصين في الحلول هنا لمساعدتك. من فضلك اتصل بفريقنا ودعنا نعرف!

أخبار أخرى

اقرأ المزيد من هذه الفئة

A person is standing at a desk while typing on a laptop.

المنصة الأصلية للذكاء الاصطناعي التي تتوسع مع عملك.

A person is standing at a desk while typing on a laptop.

المنصة الأصلية للذكاء الاصطناعي التي تتوسع مع عملك.

A person is standing at a desk while typing on a laptop.

المنصة الأصلية للذكاء الاصطناعي التي تتوسع مع عملك.