Facebook Workplace Module Reference

Applies to

Bridge by Smartsheet

Add/Remove Group Member

This module allows you to add and remove members from a given workplace group.

Add/Remove Group Member fields

  • Group Name: The group that you want to add or remove users to/from.
  • Do: Select the operation that you want to perform.
  • Current User: If you want to add or remove the current user who is invoking the conversation please select this option.
  • E-Mail: If you want to run the operation on a specific user please enter a specific user email address.

Workplace Add and Remove Group Member fields


Broadcast Conversation

With the Broadcast Conversation module you can start a conversation with all or some of your Workplace user base.

Broadcast Conversation fields

  • Group: If this is set, the broadcast will only happen with the workplace users who are members of the group
  • Department: If this is set, the broadcast will only happen with the workplace users who are in the particular department.
  • Workflow Name: The name of the workflow that will be started with the user.
  • State Values: An array of state name and values to be pre filled in the conversation.

If Group Name and the Department are both set, the broadcast will happen to all the group members who are in specified department.

Workplace Broadcast Conversation

 


Button Template

This module lets you add a Workplace Chat button to a conversation.

Button Template fields

  • Return Media As: Choose if the element should be set as the question of the next state or as the answer to end the conversation.
  • Title Text: Text for the title of button.
  • Buttons: You can create up to three buttons. Set a title, the type of button (postback, link or call) and the value of the button.

Workplace Button Template


Create Group

This module can be used to create a new workplace group.

Create Group fields

  • Group Name: The name of the group you want to create.
  • Description: The description of the group.
  • Privacy: The privacy setting of the group, either OPEN, SECRET, CLOSE.
  • Make User Admin: By selecting this you can set the user having the conversation to be an admin of the newly created group.

Group Privacy Settings

  • OPEN: Anyone in your company can see the group, its members and their posts.
  • SECRET: Only members can find the group and see posts.
  • CLOSE: Anyone in your company can find the group and see who's in it. Only members can see posts.

The user who initiates the conversation will be automatically added as a member of the group.

Workplace Create Group


Get Managers

This module returns the list of managers for the current user who is invoking the conversation.

Workplace Get Managers

Get Managers returned data

JSON

{

   "data":[

      {

         "id":"XXXXXXXXXXXXXX",

         "email":"tony@example.com",

         "first_name":"Tony",

         "last_name":"Example",

         "locale":"en_US"

      }

   ],

   "length":1

}

 

The length attribute denotes the number of managers linked with the user, and the data array will contain a list of user details for each manager. If the value is 0 that means that the user has no managers listed and data will be set to null.


Get User

Get the Workplace user details for a given user.

Get User fields

  • E-Mail: Email address of the user.

Workplace Get User

Get User returned data

Return a Workplace user matching the email.

JSON

{

   "data":[

      {

         "id":"XXXXXXXX",

         "email":"gihan@testing.com",

         "first_name":"Gihan",

         "last_name":"Testing",

         "locale":"en_US"

      }

   ],

   "length":1

}

If the user is available in Workplace you will get the result with length =1 and the data array carrying the user detail object. If no user is found for the given email, the length will be 0 and data will be set to null.


Post Message

Use Post Message to submit a post on to a Workplace group.

Post Message fields

  • Group Name: The name of the group that you want to post in.
  • Message to Send: The message that you want to post.
  • Link: A web link you want to add to the post.
  • Post as User: Select this option if you want the post to be made as the current workplace user who is invoking the conversation with your bot. If this option is not selected the post will be made as the Workplace app you have configured.
  • Markdown Used: If the message uses markdown you need to check this option.

Workplace Post Message

Markdown Syntax

Workplace posts allow for a subset of markdown options. Please refer to the following workplace documentation for supported syntax, here.


Post Element

Use this to post a media element to a given workplace group.

Post Element fields

  • Group Name: The name of the group that you want to post in.
  • Element Type: The type of media element that you want to post. (Currently only images are supported.)
  • Message to Send: The message that you want to attach to the post.
  • URL: A public accessible url to your media element.
  • Post as User: Select this option if you want the post to be made as the current workplace user who is invoking the conversation with your bot. If this option is not selected the post will be made as the Workplace app you have configured.

Workplace Post Element


Start Conversation

This module will start a conversation in Work Chat with a given user.

Start Conversation fields

  • E-Mail: The e-mail address of the workplace user.
  • Workflow Name: The name of the conversation template that will be started with the user.
  • State Values: An array of state name and values to be pre filled in the conversation.

Workplace Start Conversation