Article published on the 27th of June, 2024.
This functionality is released in a Beta version. The functionality may be subject to change as bugs are found a fixed.
Contents
1. Introduction
In this article, we will discuss how to set up a WorkPoint Automate process which can be run from inside an entity site in WorkPoint, and which will allow us to save messages posted in it's various Teams channels.
To implement this process, we will need two steps:
- Save Microsoft Teams chat form
- Save Microsoft Teams chat
The form will allow the user to select which Microsoft Teams channel on the entity to save posts from, as well as other options. The Save Microsoft Teams chats action will then take selected posts and export them as a file in the Documents library on the entity.
For this demonstration, we are using a Projects business module, which has Microsoft Teams integration set up. Our Master site team has two channels; General and Meeting discussions. Subsequent project entities are born with the same channels, as show with Project Blue in the following image:
2. Requirements
To save Microsoft Teams chats on WorkPoint entities, the business module containing entities from which you want to save chat posts/messages must use the Microsoft Teams integration in WorkPoint. You can read more about how to set up the Microsoft Teams integration in this article.
Additionally, in order to save Teams correspondence, you must give consent for WorkPoint to do so. You can do this in the "Connections" side panel in the front page of the Process Builder by clicking "Add a consent for saving Teams chat messages":
3. Process configuration
We start out with a blank user process titled "Save teams channel posts":
First, we add the "Save Microsoft Teams chats form" step to the process:
In the "Save Microsoft Teams chats form" the user can will be able to select which channels on a given entity to save posts from. In this instance, since we are running the process from WorkPoint 365 inside the web browser, we do not need to provide a step input for it.
We can instead take a look at the step options:
- In the "Business module" field, we select the business module containing the entities we want to be able to save Teams channel posts from. In this case, that's the Projects module.
- In the "Entity" field, we select which specific entity we want to save Teams channel posts from when running this process. In this instance, we select "Entity.ID", meaning when we run this process, it will display options relevant for the specific entity from which we run the process. Alternatively, we could have used a "Search entity form" as the first step, and used the ID output from that in the Entity field. With such a configuration, we could run this process from the root site (or anywhere else) and simply select the entity we want to save Teams channel posts from.
- In the "Channel" field, we can select one or more channels which will be selected by default in the form. This field only allows you to select channels present on the Master site team on the selected business module. In this instance, we do not select any default channels, but we will select which channels to save posts from in the form itself when we run the process.
- In the "Start Date" field, we can specify a default start date from which we want to save Teams channel posts. In this instance, we leave this field blank.
- In the "End Date" field, we can specify a default end date from which we want to save Teams channel posts. For this case, we also leave this field blank.
- In the "Include messages" field, we can select whether including message texts from posts in the exported file(s) saved in WorkPoint from Microsoft Teams. In this instance, we select "Yes", because when we save Teams channel posts, we want to include the text message contents from them.
- Similarly to text message contents, using the "Include attachments" field, we can select whether to extract Team channel post attachments as part of the exported file(s). In this instance, we select "No", but the user can change this setting on the form when running the process.
- The "Allow message preview" setting determines whether the user of the form can preview which messages are included in the scope they select in the form. If set to "Yes", a button will appear in the bottom of the form, which can be used to load the messages from the selected scope (e.g., channels and dates). These can then be previewed, and of one or more post messages should be excluded from the export, that can be done from here as well.
Next, we add the "Save Microsoft Teams chats" step to the process:
- In the Step Input field in the General tab of the "Save Microsoft Teams chat" step, we add the output from the previous step, the "Save Microsoft Teams chats form".
Next, we'll move on to the "Save location" tab:
- In the "Business module" field, we can specify a business module containing the entity on which we want to save the Teams channel posts. In this instance, we select the Projects module.
- In the "Entity" field, we can specify the ID of the entity on the selected business module on which we want to save the Teams channel posts.
- In the "List" field, we select the list or library where we want to save the Teams channel posts.
- Optionally, in the "Folder" field we can specify the name of a folder in which we want to save the Teams channel posts.
- In the "Output exists behaviour" field, we can select what should happen if we try to save one or more files where some with the same names already exists. The following options are available:
- Cancel: The save operation is canceled and no files are saved.
- Overwrite: The existing files are overwritten.
- Rename: The existing files are kept, and the new files will share the same name, but with a number as a suffix (e.g., "ChannelExport (2).html").
That's all we need for this process, and we can now save and publish it.
4. Process execution
When we execute the "Save teams channel posts" process, we are met with the following form:
- In the "Messages" section, we can select whether we want to save all messages in the channel we select, or messages within a given date range. If we select "Save messages by range", the form is extended with a field for Start- and End dates. Messages that fall within these dates will then be exported by the Save Microsoft Teams chats step.
- In the "Channels" section, we can select from which channels we want to export Teams posts. This drop-down menu displays the various channels which exist for the team related to the current entity. In this case, we select the "Meeting discussions" channel.
- In the "Include message content" and "Include attachments" options, we can select which content to save in the specified entity, specifically inside the Documents library of the current entity, as per our process configuration. Message content refers to the texts inside the posts, and attachments refer to whatever attachments the posts may contain.
- Clicking the "Preview" button will load the posts which fall within our selected criteria in the form. With these selections, our form loads the following messages:
- Clicking the recycle bin for a post will exclude it from the saved file(s), and that message will thus not be exported.
- To proceed to the next step, we click the "Continue" button.
The "Save Microsoft Teams chats" step now saves our chats in the specified location:
Once they are saved, they should appear in the specified location. Once file will be output for each channel selected to export, and they will be named after their respective channels:
Inside the HTML file, we can inspect all the different posts that have been exported:
Comments
0 comments
Please sign in to leave a comment.