Creating a skill flow to onboard new hires
Create a skill flow to combine a custom skill and prebuilt skills to email new hires with a content based on their role. In this tutorial, learn how to connect to the Sample employee, Dropbox, and Microsoft Outlook apps, add skills from them to your personal skill set, and create the skill flow with these skills.
Before you begin
Before you start this tutorial, you must provide the following resources:
- Sign in to a Dropbox account. If you don't have an account, you can sign up for free here.
- Use a Microsoft Outlook account that is a work or school account. For more information, see Microsoft Outlook.
- Build the Sample employee app to watsonx Orchestrate:
- Download the OpenAPI file.
- Build it to watsonx Orchestrate.
- Enhance and publish it to your skill catalog.
Click the following buttons to download the OpenAPI (JSON and YAML formats) developed for this tutorial:
Connect to apps and add their skills to the personal skill set
The first step is to connect to the Sample employee, Dropbox, and Microsoft Outlook apps and add their skills to the personal skill set.
Sample employee
- On the watsonx Orchestrate home page, click Add skills from the catalog.
- Search for the Sample employee app.
- Click the Search apps field.
- Type
Sample employee
and press Enter.
- Select the Sample employee tile.
- Click the Connect app button.
- You can type any API key, for example, type
employee123
. - Click the Connect app button.
- In the Retrieve employees skill tile, click Add skill +.
Dropbox
- On the watsonx Orchestrate home page, click Add skills from the catalog.
- Search for the Dropbox app.
- Click the Search apps field.
- Type
Dropbox
and press Enter.
- Select the Dropbox tile.
- Click the Connect app button.
- You are redirected to the Dropbox webpage to log in and give watsonx Orchestrate permission to connect to your Dropbox account.
- Enter the email of your Dropbox account.
- Click Continue.
- Enter the password of your Dropbox account.
- Click Log in.
- On the warning page, click Continue.
- On the permissions page, click Allow.
- In the Download the content of a file skill tile, click Add skill +.
Microsoft Outlook
- On the watsonx Orchestrate home page, click Add skills from the catalog.
- Search for the Microsoft Outlook app.
- Click the Search apps field.
- Type
Microsoft Outlook
and press Enter.
- Select the Microsoft Outlook tile.
- Click the Connect app button.
- Select the email type according to your account permissions:
- If you don't have admin permission in your email account, select the Non-admin user option.
- If you have admin permissions in your email account, select the Admin user option.
- Click the Connect app button.
- You are redirected to the Microsoft Outlook webpage to log in and give watsonx Orchestrate permission to connect to your Microsoft Outlook account.
- Enter your email address.
- Click Next.
- Enter the password of your account.
- Click Sign in.
- In the Send an email using Outlook skill tile, click Add skill +.
Create the skill flow
The second step is to create the skill flow. In this skill flow, you combine the skills from the Sample employee, Dropbox, and Microsoft Outlook apps:
- From the main menu , select Skill studio.
- Click Create skill, and select Skill Flow.
- Click the edit icon to name and describe your skill flow:
- In the Name field, enter
Send onboarding content over email
. - In the Description field, enter
Send a content over email to onboard new hires.
- Click Save.
- In the Name field, enter
- Click the add icon to add a skill to your flow.
- Search for the Sample employee app and click its tile.
- In the Retrieve employees skill tile, click Add skill +.
- Click the add icon to add the next skill to the flow.
- Search for the Dropbox app and click its tile.
- In the Download the content of a file skill tile, click Add skill +.
- Click the add icon to add the next skill to the flow.
- Search for the Microsoft Outlook app and click its tile.
- In the Send an email using Outlook skill tile, click Add skill +.
The following image illustrates how the skill flow looks like.
Set input values
After you add the skills to your flow, you must define which values these skills must receive as input values.
First, set the input value to the Download the content of a file skill, which must receive the path to the file to send to an employee. The path is based on the employee's role that comes from the Retrieve employees skill, for example, "/${role}.txt
".
- From the skill flow, click the Download the content of a file skill tile.
- In the path input field, click the Specify default value icon .
- Click Insert variables icon.
- Click Retrieve employees, scroll down, and click role.
- Enter
.txt
after the variable.
The following image illustrates how the mapping for the Download the content of a file skill looks like.
Next, set the input values for the Send an email using Outlook skill. This skill must define the email body as the content from the Download the content of a file skill, and the email address from the Retrieve employees skill:
-
Click the Send an email using Outlook skill tile.
-
In the body.Content input field, click Download the content of a file, scroll down and click fileContent.
-
In the To input field, click Retrieve employees, scroll down and click email.
-
Click Actions > Save as draft to save the skill flow.
Skill flow saved successfully
when you save the skill flow as a draft.Enhance and publish the skill flow
The last step is to enhance the skill flow to generate the phrases to trigger it in the chat:
- From the Skill studio > Skills and apps > Create a Flow page, click Actions > Enhance.
- On the enhance page, click the Phrases tab.
- Click the Enter new train phrase field, enter
Send onboarding content over email
, and press enter. - Another field is loaded and you can add as many phrases as you want.
- Click the Enter new train phrase field again, enter
Onboard new hires
, and press enter. - Click Publish to finish.
Results
The skill flow is available in the Skill and apps page. In the Skills list, you can see the Send onboarding content over email skill flow with the Published status.
What to do next
Now that you learned how to connect to the Sample employee, Dropbox, and Microsoft Outlook apps, add skills from them to your personal skill set, and create the skill flow with these skills, you can use this skill flow. For more information, see the "Add the skill flow to the personal skill set" and "Use the skill flow" topics in the "Using the skill flow to onboard new hires" tutorial.