■Overview
When you post "Clock In" or "Clock Out" on Slack, it will be used to record the time in KING OF TIME.
■Setup Instructions
1. Set up a Slack trigger for "New message posted to channel," configure the desired channel for posting, make a demo post, and test it.
※ After that, click the + mark next to the ts in the response result to obtain the timestamp in the output.
2. Create a branch, set the "Message Content" in the operation and output from step 1, and configure the condition to match the regular expression with values like "Clock In|Clock Out."
3. Prepare a separate spreadsheet and set headers and functions on the spreadsheet provided in the URL below or the attached spreadsheet.
※ How to convert UNIXTIME to a regular date/time: https://intercom.help/yoom/ja/articles/8343335
※ At this time, change cell A2 to plain text format and date cells to YYYY-MM-DD format in advance.
4. In "Integrate with App," select the action to copy the sheet (tab) of the spreadsheet and set it to copy the tab from the spreadsheet prepared in step 3.
5. In "Integrate with App," select the action to input values into the spreadsheet cells, and embed the ts output obtained in step 1 into cell A2 of the spreadsheet copied in step 4.
※ The sheet name is embedded from the output of the copy action in step 4.
6. In "Operate Database," select to retrieve records from the spreadsheet, set the range to A1:B in the spreadsheet prepared in step 3, search for non-empty UNIXTIME, and retrieve records.
※ The sheet name is embedded from the output of the copy action in step 4.
7. In "Integrate with App," select the action to delete the sheet (tab) of the spreadsheet and set it to delete the tab copied in step 4.
※ The sheet ID is embedded from the output of the copy action in step 4.
8. Prepare two tables in advance in the Yoom database and synchronize Slack and KING OF TIME with Data Connect.
※ For Slack, display items include user ID and display name or full name.
※ For KING OF TIME, display items include last name, first name, and identification number.
9. In the table connected to KING OF TIME, create a column for functions and set it to concatenate the full name using "JOIN("",{Last Name},{First Name})."
10. In "Operate Database," select Yoom, retrieve records from the table connected to Slack, and set the user ID to equal {{Sender}} obtained in step 1.
11. In "Operate Database," select Yoom, retrieve records from the table connected to KING OF TIME, and set the concatenated full name to equal {{Full Name}} or {{Display Name}} obtained in step 10.
12. In "Switch Destination," set the operation to step 1, output to message content, and directly input Clock In and Clock Out into the destination.
13. For each destination, set the registration of clock-in data in KING OF TIME from "Integrate with App," and embed values such as identification number and clock-in time obtained in steps 6 and 11.
■Notes
・When connecting data between Slack and KING OF TIME, the full name on the Slack side must match the full name information in KING OF TIME.
・This setup is intended for Clock In and Clock Out only, but if there are breaks, etc., you can handle them by changing the branch or destination switch settings.
・Branching is a feature (operation) available with plans above the Mini Plan. If you are on the Free Plan, the operation of the flow bot you set will result in an error, so please be careful.
・Paid plans such as the Mini Plan offer a 2-week free trial. During the free trial, you can use restricted apps and AI features (operations).