Facebook Workplace
Facebook Workplace is an online collaborative tool that helps businesses and organizations to communicate and collaborate with internal team members. Using this tool, you can create various channels that help you to manage work-related activities such as group discussions, project management; file, image, or video sharing, and updates related to specific projects. You can have both public and private channels.
On Facebook Workplace, bots are represented as pages. A page is automatically created for a custom integration app. Only system administrators of a workplace community can create apps and generate access tokens in that community.
Character limitations of Facebook workplace channel
In this section, you can view the character limitations of Facebook workplace channel.
Message types
Message types options | Character limit |
---|---|
Text | The maximum number of characters supported is 2000. |
Image | The maximum size of an image is 8 MB. |
Video, audio, and other file types | The maximum size is 25 MB. |
Quick Reply
Quick Reply options | Character limit |
---|---|
Quick reply title | The maximum number of characters supported is 2000. |
Quick Reply buttons | A maximum of 13 quick reply buttons are supported. |
Quick Reply button title | The maximum number of characters supported is 20. |
Carousel
Carousel options | Character limit |
---|---|
Cards | A maximum of 10 cards per message is supported. |
Title | The maximum number of characters supported is 80. |
Subtitle | The maximum number of characters supported is 80. |
Buttons | A maximum of 3 buttons per card are supported. |
Setup Facebook workplace channel using developer portal
You need to register for a new system admin account in the Facebook Workplace Developers Portal (https://<Domain name>.workplace.com/work/admin
) to create a Facebook Workplace channel.
To setup Facebook workplace channel to your bot, configure the following:
- Create Custom Integration
- Get App ID, App Secret, and Access token
- Provide Permissions to interact with your bot
Step 1: Create a Custom Integration
To create a Custom Integration, follow these steps:
Log in to your Facebook Workplace admin account and click Integrations.
On the Home page, click Admin Panel.
Click Create Custom Integration to provide authorization to create a channel between Facebook Workplace and Yellow bot.
Under Create Custom Integration, enter the following details: i. Enter the Name of your integration. ii. Enter a short Description of your integration. iii. Click Create.
You will see the integration details. You can update the integration details if required.
Step 2: Get App ID, App Secret, and Access token
To get the App ID, App Secret, and Access token from Facebook Workplace developer portal, follow these steps:
On the Integration details page, click on the below highlighted icon and copy the App ID and App Secret.
Click Create access token.
Select the I Understand box to agree to access token guidelines and click Copy to copy the access token, then click Done.
- Access tokens cannot be retrieved but new token can be generated.
Step 3: Provide permissions to interact with your bot
You need to select your preferred permissions for your users to interact with the bot in the workplace.
To grant permissions, follow these steps:
On the Integration details page, click Permissions.
Select the following permissions:
Message any member - Send a message to any member in the workplace.
Read user email - See any group member's email address.
Read work profile - See any group member's complete profile, including phone number, department, and location.
Click Save.
Connect Facebook workplace to your bot
Prerequisite
- Copy the App ID, App Secret, and Access token from the developer portal to connect the Facebook workplace channel to your bot on the platform.
To connect Facebook workplace channel to your bot on the platform, follow these steps:
On the left navigation bar, click Extensions.
Click Channels > Messaging > Facebook workplace.
Enter the App ID, App secret, Access token that you have copied from the workplace developer portal admin account and click Save.
- Your Facebook workplace channel will be successfully connected.
Navigate to the Overview page, under the Active channels section, to verify that the Facebook workplace channel is successfully connected to your bot.
Configure Webhook for custom integration
After connecting your bot to the Facebook workplace channel, you need to subscribe to events under Page section of the Configure Webhooks.
To setup a Webhook on the workplace, follow these steps:
On the Integration details page, click Webhooks.
Click Edit icon corresponding to the Page.
By default, a callback URL is displayed after successfully connecting your bot to the Facebook workplace channel. Select messages and messaging_postbacks and click Save.
Test your bot on Facebook workplace
After connecting your bot to the Facebook workplace, you can test your bot.
Prerequisites
- Ensure that you have created the bot with intents and configured the flows with the same intent. For more information, click here.
To test your bot on Facebook workplace, follow these steps:
Go to your Facebook workplace developer account.
On the Home page, select your bot.
Start the conversation to test your bot based on the configured flow.