Demo Video
Watch the demo video for an overview of building and refining workflows
A clear and detailed workflow description is the foundation of an effective workflow. The workflow description in Beam is auto-filled when you create a new workflow, providing a structured template that you can verify and modify as needed. This description should encompass:
Crafting Comprehensive Workflow Descriptions
Workflow Steps: A step-by-step breakdown, where each step includes:
Input(s): Data or information required to perform the step.
Output(s): The result or data produced after the step is completed.
Process: A brief explanation of what the step entails.
Questions to Consider
Workflow Goal: A concise statement outlining the primary objective of the workflow.
Workflow Selection Criteria: Conditions or triggers that determine when the workflow should be executed.
Workflow Steps
Example Workflow Description
Workflow Goal:
Automate the processing of customer return requests to enhance efficiency and customer satisfaction.
Workflow Selection Criteria:
Triggered when a customer sends an email requesting a product return.
Step 1: Extract Customer Details
Input: customer_email_content
Output: customer_name, order_number
Process: Extract the customer's name and order number from the email content.
Step 2: Verify Order Information
Input: order_number, Order Database.xlsx
Output: order_verification_status
Process: Cross-check the order number against "Order Database.xlsx" to verify its validity.
Step 3: Assess Return Eligibility
Input: order_verification_status, ReturnPolicy.pdf
Output: return_eligibility_status
Process: Determine if the product is eligible for return based on the company's return policy in "ReturnPolicy.pdf".
Step 4: Generate Return Instructions
Input: return_eligibility_status, customer_name
Output: return_instructions
Process: Create detailed return instructions if the product is eligible for return.
Step 5: Send Response Email
Input: customer_email_address, return_instructions
Output: email_sent_confirmation
Process: Send an email to the customer with the return instructions.
Alignment Between Workflow Steps and Descriptions
When modifying your workflow—whether adding, removing, reordering, or renaming steps—it’s essential to update the workflow description accordingly. This alignment ensures:
Example
If you add a new step to handle special return cases, update the workflow description:
Step 3: Handle Special Return Cases
Input: order_details, customer_history
Output: special_handling_instructions
Process: Determine if the return requires special handling based on customer history.
Selecting Appropriate Tools for Each Workflow Step
Choosing the right tool for each step is critical for the success of your workflow. Tools can be either:
Beam Tools: Actions from your connected integrations (e.g., Gmail, Slack, Google Sheets).
GPT Tools: AI-driven tools designed to generate or process content (e.g., drafting emails, summarising text).
Guidelines for Tool Selection
Match Tools to Task Requirements: Ensure the tool’s capabilities align with the desired output of the step.
Understand Tool Functions: Beam Tools interact with external services, while GPT Tools handle content generation and analysis.
Custom Tools: If existing tools don’t meet your needs, create custom tools tailored to your specific requirements.
Example
Step 1 (Extract Customer Details): Use a GPT Tool to process the email content and extract necessary information.
Step 5 (Send Response Email): Use a Beam Tool to send the email via Gmail.
Understanding and Managing Task Dependencies
Task dependencies determine the order in which steps should be executed. Managing these dependencies ensures that each step has the necessary inputs to produce the correct outputs.
Strategies
Sequential Logic: Arrange steps so that each one follows logically from the previous.
Data Flow: Ensure that outputs from earlier steps are correctly passed as inputs to subsequent steps.
Dependency Mapping: Visualise dependencies to identify potential bottlenecks.
Example
Step 4 (Generate Return Instructions) depends on the output of Step 3 (Assess Return Eligibility).
Ensure that return_eligibility_status is available before Step 4 begins.
Aligning Custom Tools with Workflow Steps
When creating custom tools, it’s crucial to ensure they align with your workflow steps and descriptions.
Alignment Strategies
Parameter Consistency: The inputs defined in the tool prompt should match those in the workflow description.
Process Matching: The tool’s functionality should reflect the process outlined in the corresponding workflow step.
Output Formatting: Ensure the tool’s output is in the expected format for the next step.
Example of Tool Prompt Alignment
Template Description
Workflow Steps:
Step 1: Extract Customer Details
Input: customer_email_content
Output: customer_name, order_number
Process: Extract the customer's name and order number from the email content.
Tool Prompt
Role:
You are an extractor designed to pull customer details from emails.
Task Instructions:
Analyse the email content provided in @customer_email_content.
Extract the customer's name and order number.
Present the extracted information clearly.
@customer_email_content: '#customer_email_content'
Output Format:
Customer Name: [Name]
Order Number: [Number]
Constraints:
Focus only on the required details.
Ensure accuracy and clarity in the extracted information.
Utilising Database Sources as Task Inputs
Incorporating external data sources enhances your agent’s ability to perform complex tasks.
Implementation Steps:
Add Data Sources: Use the Memory feature to upload documents or databases relevant to your workflow (e.g., “Order Database.xlsx”, “ReturnPolicy.pdf”).
Reference in Workflows and Tools: Clearly mention these sources in your workflow descriptions and tool prompts.
Ensure Accessibility: Confirm that the agent can access and retrieve data from these sources during execution.
Example of Tool Prompt Alignment
In Step 2, the tool should be able to access “Order Database.xlsx” to verify the order number.
Tool Prompt Reference:
Cross-reference the order number with entries in "Order Database.xlsx" to verify its validity.
Defining Workflow Selection Criteria and Triggers
When an agent has multiple workflows, specifying selection criteria ensures the correct workflow is executed in response to specific events.
Setting Up Selection Criteria
Define Clear Conditions: Use specific triggers like email subject lines, sender addresses, or keywords.
Utilise Triggers: Configure triggers in the Triggers tab to automate workflow initiation based on defined events.
Available Triggers
Email Platforms: Gmail, Outlook
Messaging Apps: Slack
Webhooks: Custom triggers via webhooks
File Storage: Google Drive
Example
Workflow Selection CriteriaI
Trigger the “Customer Return Workflow” when an email with the subject “Return Request” is received.
Setting Up the Trigger
In the Triggers tab, create a new trigger for Gmail.
Set the condition to activate when an email with the specified subject is received.
Testing and Iteration
Regular testing and refinement are essential for workflow optimisation.
Testing Strategies
Simulate Scenarios: Run the workflow using test inputs to observe behaviour.
Monitor Outputs: Check that each step produces the expected output.
Adjust as Needed: Modify steps, tools, or dependencies based on testing outcomes.
Example
Test Case:
Use a sample email with mock customer details to trigger the workflow.
Verification:
Confirm that customer details are accurately extracted.
Ensure the order number is correctly verified.
Check that the email response is appropriately generated and ready to send.
Monitoring Workflow Progress
Once a workflow is running, it’s important to monitor its progress to ensure smooth execution and handle any interruptions.
States Where Tasks May Pause
Input Required
Scenario: The execution requires additional input from the user because a tool parameter is missing or unclear.
Example: A step needs the link to “Order Database.xlsx”, but the link is not provided.
Action: The agent will prompt you to provide the necessary input, and the task can continue once provided.
Consent Required:
Scenario: Applicable for all Beam actions that perform external operations (e.g., sending an email).
Default Setting: Such tasks are marked as “Consent Required” by default, and the user must approve the action.
Option: You can remove the consent requirement for specific actions within the tool settings if automatic execution is desired.
Monitoring Multiple Executions
Use the Inbox to monitor all tasks requiring action from your end.
The Inbox consolidates tasks needing input or consent, allowing you to manage them without navigating to individual task screens.
How to Use the Inbox
Accessing the Inbox:
Navigate to the Inbox tab from the main menu.
Providing Input or Consent
Review the tasks listed that require your action.
For tasks needing input
Enter the required information directly in the provided fields.
Example: A task is paused because it requires the “Order Database.xlsx” file link.
Your Action: Upload the file link directly in the Inbox interface.
For Tasks Needing Consent
Approve or deny the action as appropriate.