Jump to a Section

Overview

Authorization

The first time you add a Workplace by Facebook card to a Flow, you will need to create a configuration. This will allow you to connect to your Workplace by Facebook account, save your account information, and reuse that configuration next time you build a Flow with the connector. That way, you don’t have to sign in every time you want to build a Flow with this Connector. Instead, use the configuration you have already set up. You can create and save multiple configurations and share them with your teammates.

In order to create a Workplace by Facebook configuration you must be an administrator. Here’s how to create a new configuration for the Workplace by Facebook connector:

  1. Log into Workplace by Facebook.
  2. Inside Workplace, select “Manage Integrations” from the left-hand menu. If you do not see this option, you may not have the permissions necessary to create a new configuration. 

  3. Inside the Integrations dashboard, scroll to the bottom and select “Create Custom Integration.”

  4. Give your custom integration a name–this will be how you reference the integration in messages and mentions, so choose something that is easy to remember. Provide a description of your integration, and select “Create.”

  5. Select the following permissions for your integration: Read content, manage content, manage groups, impersonate account, message any member. Without all of these capabilities, some actions will not be will not be functional.

  6. Select “Create Access Token.” This will generate a unique access token that will allow you to authenticate your integration in Azuqua. Copy it and save it securely for later use. If you lose your token and have to regenerate it, your Flows will break until you update your configuration with the new access token.

  7. Select “Save” to save your new integration.

  8. Inside Azuqua, add the Workplace by Facebook card you would like to use to your Flow. Click “+ Connect Workplace by Facebook” to add a new configuration.

  9. Choose a nickname for your configuration. Choose something unique, since you may need to be able to tell your configurations apart in the future after you have created more than one.

  10. Paste in the access token you obtained from Workplace by Facebook into the “Access Token” field.

  11. Select “Create” to finish creating your configuration.

    Events

    • Group Membership Updated

      Start FLO when the membership of a group changes

    • New Bot Mention

      Start your Flow whenever someone mentions your bot by name in a group post (e.g. @YourBotName). After adding the New Bot Mention card to your Flow and authenticating it, you will need to follow these steps to manually configure the webhook in Workplace:

      1. Save your Flow and turn it on (you do not need to have other cards in your Flow yet, you can come back and add them later).
      2. At the bottom of the New Bot Mention card, select the “Webhook Settings” icon.

      3. This brings up a dialog with the webhook URL. Click copy.

      4. Inside Workplace by Facebook, find and open the custom integration that you created during the authentication step.

      5. Inside the “Configure Webhooks” panel, select the “Page” tab. Paste in the webhook URL from Azuqua and select the “mention” subscription field. You do not need to provide a “Verify Token.“ 

      6.  Select “Save” to save your webhook. If you receive an error, it is possible that your Flow is not turned on.

      7. Return to Azuqua and finish building your Flow. You will see one empty execution in your Flow history. This is a test sent by Workplace when you saved your webhook to check that the URL was valid. All future executions will contain data sent to your webhook.

      NOTE: Because Workplace only allows you to configure one bot webhook URL, you will only be able to have one Flow that uses either New Bot Mention or New Bot Message at any given time. After configuring New Bot Mention you cannot make a different Flow that begins with New Bot Message and vice versa. You may also not have multiple Flows that begin with New Bot Mention. Creating a new Flow that begins with New Bot Mention the will invalidate the previous URL and cause your existing Flow to break.

      Fields

      • Post
        • Post ID (text): The ID of the post in which the bot was mentioned.
        • Message Text (text): The text of the post. This will include the bot mention (e.g. “@YourBotName, say hello!”).
        • From Member ID (text): The ID number of the user who created the post.
        • From Member Name (text): The name of the user who created the post.
        • Mentions (list of text): A list of all the mentions in the post, including the bot.
        • Created At (number): The time when the post/mention was published.
    • New Bot Message

      Start your Flow whenever someone sends a direct message to your bot in Work Chat. After adding the New Bot Message card to your Flow and authenticating it, you will need to follow these steps to manually configure the webhook in Workplace:

      1. Save your Flow and turn it on (you do not need to have other cards in your Flow yet, you can come back and add them later).
      2. At the bottom of the New Bot Message card, select the “Webhook Settings” icon.

      3. This brings up a dialog with the webhook URL. Click copy.

      4. Inside Workplace by Facebook, find and open the custom integration that you created during the authentication step.

      5. Inside the “Configure Webhooks” panel, select the “Page” tab. Paste in the webhook URL from Azuqua, and select the “messages” subscription field. You do not need to provide a “Verify Token.”

      6.  Select “Save” to save your webhook. If you receive an error, it is possible that your Flow is not turned on.

      7. Return to Azuqua and finish building your Flow. You will see one empty execution in your Flow history. This is a test sent by Workplace when you saved your webhook to check that the URL was valid. All future executions will contain data sent to your webhook.

      NOTE: Because Workplace only allows you to configure one bot webhook URL, you will only be able to have one active Flow that uses either New Bot Message or New Bot Mention. After configuring New Bot Message you cannot make a different Flow that begins with New Bot Mention and vice versa. You may also not have multiple Flows that begin with New Bot Message. Creating a new Flow that begins with New Bot Message the will invalidate the previous URL and cause your existing Flow to break.

      Fields

      • Message
        • Message ID (text): The ID of the message to the bot.
        • Message Text(text): The text of the message.
        • From Member ID(text): The ID of the user who sent the message.
        • Created At (number): When the message was sent.
    • New Post in Group

      New Group Post

      Start your Flow whenever someone posts in a certain group in work chat. After adding the New Group Postcard to your Flow and authenticating it, you will need to follow these steps to manually configure the webhook in Workplace:

      1. Save your Flow and turn it on (you do not need to have other cards in your Flow yet, you can come back and add them later).
      2. At the bottom of the New Group Post card, select the “Webhook Settings” icon.

      3. This brings up a dialog with the webhook URL. Click copy.

      4. Inside Workplace by Facebook, find and open the custom integration that you created during the authentication step.

      5. Inside the “Configure Webhooks” panel, select the “Groups” tab. Paste in the webhook URL from Azuqua, and select the “posts” subscription field. You do not need to provide a “Verify Token.”

      6.  Select “Save” to save your webhook. If you receive an error, it is possible that your Flow is not turned on.

      7. Return to Azuqua and finish building your Flow. You will see one empty execution in your Flow history. This is a test sent by Workplace when you saved your webhook to check that the URL was valid. All future executions will contain data sent to your webhook.

      NOTE: Because Workplace only allows you to configure one group webhook URL, you will only be able to have one active Flow that uses New Group Post. Creating a new Flow that begins with New Group Post the will invalidate the previous URL and cause your existing Flow to break.

      Fields

      • Post
        • Group ID (text): The ID of the group where the post was created.
        • Post ID (text): The ID of the post.
        • Post URL (text):The URL for the post.
        • Message (text): The content of the post.
        • From Member ID (text): The ID of the member who made the post.
        • From Member Name (text): The name of the member who made the post.
        • Mentions (list of text): A list of mentions in the post.
        • Created At (text): When the post was created.

    Actions

    • Add Member to Group

      Adds someone to a group on Workplace.

      Input Fields

      • Group 
        • Group ID (text): Enter the ID of the group. This can be found in the link of the group page, and it is a sequence of numbers.
      • Member 
        • Member ID (text): Enter the ID of the person to add to the group.
        • Email (text): Enter the member’s email.

      Output Fields

      • There are no output fields for this card.
    • Comment on Post

      Comment on a certain post as a bot

    • Create Group

      This card creates a group in Workplace.

      Input Fields 

      • Group
        • Name (text): Enter a name for the group.
        • Description (text): Enter a description of the group.
        • Privacy (text): Choose the privacy status of the group, for example, OPEN, CLOSED, or SECRET.

      Output Fields 

      • Group ID (text): Returns the ID of the group created.
    • Post in Group

      Post in a group.

      Options

      • Post as: Select to post as a User or Bot.

      Input Fields

      • Group
        • Group ID (text): The ID of the group to post in. This can be found in the group page’s URL. Go to the group’s main page, then find the sequence of numbers confined by slashes on both sides.
      • Post
        • Message Text (text): The content of the message.
        • Message Format (text): Pick a message format, PLAINTEXT is standard.
        • Link (text): Add a link if desired.
        • Link Name (text): Add a name for the link if desired.
      • User (Note: Only appears if posting as a user and not a bot.)
        • User Email (text): The email of the account to post from.
    • Read All Groups

      This card returns information about all groups on an account.

      Input Fields

      • There are no input fields for this card.

      Output Fields

      • Groups (List of Objects):
        • Group ID (text): Returns ID of all groups.
        • Name (text): Returns names of all groups.
        • Description (text): Returns descriptions of all groups.
        • Privacy (text): Returns privacy status of all groups.
        • Updated At (text): Returns last update time of all groups.
    • Read Group

      This card returns information about a group on Workplace.

      Input Fields

      • Read By
        • Group ID (text): Enter the ID of the group to read.

      Output Fields

      • Name (text): Returns the nameof the group.
      • Description  (text): Returns the description of the group.
      • Owner ID (text): Returns the ID of the owner of the group.
      • Privacy (text): Returns the privacy status of the group. (Ex. Closed, Public)
      • Updated At (text): Returns the last time the group was updated.
    • Read Group Members

      Returns detailed information about the members of a group.

      Input Field

      • ReadBy 
        • Group ID (text): Enter the ID of the group to analyze. This number can be found in the link of the page.

      Output Fields

      • Group (List of Objects):
        • Members ID (text): Returns the IDs of the members of the group.
        • First Name (text): Returns the first name of the members of the group.
        • Last Name (text): Returns the last name of the members of the group.
        • Email (text): Returns the email of the members of the group.
        • Profile URL (text): Returns the profile URL of the members of the group.
        • Locale (text): Returns the first name of the members of the group.
        • Name (text): Returns the name of the members of the group.
        • Updated At (text): Returns the time that the member’s info was updated.
    • Read Member

      This card will return detailed information about a member on Facebook Workplace.

      Input Fields

      • Read By
        • Email (text): Enter the member’s email.
        • Member ID (text): Enter the member’s ID.

      Output Fields

      • Member 
        • Member ID (text): Returns the Member ID.
        • First Name (text): Returns the user’s first name.
        • Last Name (text): Returns the user’s last name.
        • Email (text): Returns the user’s email.
        • Profile URL (text): Returns the URL of the user’s profile.
        • Locale (text): Returns the location of the member.
        • Name (text): Returnsthe name of the member.
        • Updated At (text): Returns the last time the member’s profile was updated.
    • Remove Member from Group

      Read Member From Group

      This card removes a member from a group.

      Input Fields

      • Group
        • Group ID (text): Enter the ID of the group in which to remove a member from.
      • Member
        • Member ID (text): Enter the ID of the member to remove.
        • Email (text): Enter the user’s email.

      Output Fields

      • There are no output fields for this card.
    • Search Groups

      This card searches multiple groups for a group and returns its ID.

      Options

      Choose an option of what to search groups by.

      • Name (text)
      • Description (text)
      • Owner ID (text)
      • Privacy (text)
      • Updated At (text)

      Input Fields

      • Search
        • Value (text): Enter the value to search for. The type was specified earlier in options, for example, Name or Privacy.

      Output Fields

      • Result
        • Group ID (text): The ID of the group found is returned.
    • Send Bot Message

      This card will not use an account, but a bot to send an automatic message.

      Input Fields 

      • Recipient
        • Member ID (text): Write the recipient ID for who shall receive this message.
      • Message 
        • Message Text (text): Select the text format, and the standard is PLAINTEXT
        • Notification Type (text): Select either Regular, Silent Push, or No Push.

      Output Fields

      • There are no output fields for this card.
    • Update Group

      This card updates information about a group.

      Input Fields

      • Group
        • Group ID (text): Enter the ID of the group to edit. This can be found in the URL.
        • Name (text): Update the name of the group.
        • Privacy (text): Edit the privacy of the group, for example, change the group from public to private.

      Output Fields

      • There are no output fields for this card.