# Welcome to Automateo

Automateo is a powerful LLM prompt chain builder that allows you to create, manage, and execute complex language model workflows with ease. Using a drag-and-drop interface, you can construct advanced prompt chains, integrate various language models, and automate your AI-powered processes.

### Key Features

* Drag-and-drop workflow builder
* Multiple node types (Input, Output, LLM)
* Webhook triggers for workflow execution
* Flexible output options (webhook or email)
* Support for various LLM models
* Customizable prompt templates
* Execution history and analytics
* API key management

Navigate through the sidebar to learn more about Automateo's features and how to use them effectively.


# Getting Started

To begin using Automateo, follow these steps:

1. Sign up for an account on the Automateo website - <https://automateo.app>.
2. Once logged in, navigate to your account settings.
3. Generate an API key for authentication. You'll need this to interact with Automateo programmatically.
4. (Optional) Add your API keys for OpenAI, Together AI, or Fireworks AI if you plan to use your own accounts with these services.

With your account set up, you're ready to start building workflows and leveraging the power of Automateo!

###


# Building Workflows

Automateo uses a node-based system for building workflows. Here's how to create your first workflow:

1. Click on "Workflows" link in the side menu, and then "Create" to start a new project.
2. You'll see a blank canvas where you can start building your workflow.
3. Drag and drop nodes onto the canvas. You'll have three types of nodes to work with: Input, LLM, and Output.
4. Connect the nodes by drawing lines between them. The output of one node becomes the input for the next.
5. Configure each node according to your needs (more details in the Node Types section).
6. Use "{}" separators in prompt templates to reference inputs from previous nodes.

Remember, the flow of data goes from left to right, starting with Input nodes, passing through LLM nodes, and ending with Output nodes.


# Node Types

Automateo currently supports three types of nodes:

1. **Input Node**
   * Purpose: Acts as the starting point for your workflow. Each workflow has only one input node
   * Configuration:
     * Specify input format (text, markdown, JSON schema)
     * Define variable names for use in subsequent nodes
2. **LLM Node**
   * Purpose: Processes input through a language model
   * Configuration:
     * Set up prompt templates
     * Choose LLM model (e.g., ChatGPT 3, ChatGPT 4, Mixtral, LLaMA...)
     * Define output format (text, markdown, JSON schema)
3. **Output Node**
   * Purpose: Defines how the workflow results are delivered
   * Configuration:
     * Choose between webhook or email output
     * Set up necessary details (webhook URL or email parameters)

Each node type plays a role in creating a complete and functional workflow.


# Triggering Workflows

Automateo workflows are triggered via webhooks. Here's how to set up and use webhook triggers:

1. When you save a workflow, Automateo generates a unique webhook URL for that workflow.
2. You can find this URL in the workflow details page.
3. To trigger the workflow, send a POST request to this webhook URL.
4. Include any necessary input data in the request body, formatted according to your Input node specifications.
5. Authenticate the request by including your Automateo API key in the Authorization header as "Bearer {token}".

Example curl command to trigger a workflow:

```
Copycurl -X POST https://api.automateo.app/api/w/{workflow_id} \
     -H "Authorization: Bearer {YOUR_API_KEY}" \
     -H "Content-Type: application/json" \
     -d '{ "input": { "some_property": "value" } }'
```

Replace `{workflow_id}` with your actual workflow ID, `YOUR_API_KEY` with your Automateo API key, and adjust the JSON payload to match your workflow's input requirements.


# Running and Debugging

Automateo provides powerful tools for testing and refining your workflows directly in the workflow builder. This page covers two essential features: running the entire workflow and debugging individual steps.

### Running the Workflow

To test your entire workflow with different inputs:

1. In the workflow builder, locate the "Run" button (at top right of the interface).
2. Click the "Run" button. This will open a modal window.
3. In the modal, you'll have to input the starting values in text or JSON depending on your input node's configuration.
4. Click "Execute" to begin the workflow execution.
5. The modal will display the progress of your workflow, showing outputs of each step as it's completed.
6. Once the workflow finishes, you'll see the final output in the modal.

This feature is particularly useful for:

* Testing your workflow with various inputs
* Verifying that all steps are working as expected
* Observing how changes in input affect the final output
* Demonstrating the workflow's functionality to team members or stakeholders

### Debugging the Workflow

For more granular testing and troubleshooting, Automateo offers a debugging mode:

1. In the workflow builder, find the "Debug" button (located next to the "Run" button).
2. Click "Debug" to enter debugging mode. This will open a modal window.
3. In the modal, you'll have to input the starting values in text or JSON depending on your input node's configuration.
4. Click "Execute" to start debugging.
5. In debug mode, you can:
   * Step through the workflow one node at a time
   * Inspect the input and output of each node
6. The workflow will pause at each breakpoint, allowing you to examine the data at that point.

Debugging mode is invaluable for:

* Identifying issues in complex workflows
* Understanding how data transforms between nodes
* Testing specific parts of your workflow in isolation
* Optimizing your workflow's performance and accuracy

Tips for Effective Testing and Debugging:

* Start with simple, known inputs to verify basic functionality
* Gradually introduce more complex or edge-case inputs
* Use debugging mode to focus on problematic areas of your workflow
* Keep track of your test cases and results for future reference
* Regularly test your workflows, especially after making changes

By utilizing both the run and debug features, you can ensure your Automateo workflows are robust, efficient, and produce the expected results across a wide range of inputs.


# Testing Workflows from Outside Automateo

While Automateo provides robust internal testing capabilities, it's also crucial to test your workflows as they would be triggered in real-world scenarios. To facilitate this, we've created a tool called webhoook.me.

#### Using webhoook.me for External Testing

1. Visit <https://webhoook.me/> in your web browser.
2. This tool allows you to trigger your Automateo workflow and observe the response, simulating how it would behave when integrated into your application.

Key features of webhoook.me:

* Triggers workflows using the same HTTP requests your application would use
* Displays the full request and response
* Allows you to customize payload and headers for thorough testing
* Provides a history of recent requests for comparison and debugging

Benefits of using webhoook.me:

* Verify that your workflow responds correctly to external triggers
* Test different input payloads to ensure robust handling
* Debug integration issues by examining the exact request and response
* Simulate various API clients or third-party services that might trigger your workflow

To use webhoook.me with your Automateo workflow:

1. Copy your workflow's webhook URL from Automateo
2. Paste this URL into webhoook.me
3. Configure the request payload and headers as needed (Authorization header)
4. Send the request and observe the response

This external testing complements Automateo's internal tools by providing a realistic simulation of how your workflow will perform when integrated into your broader system architecture.

Remember to test your workflows both internally using Automateo's tools and externally using webhoook.me to ensure comprehensive validation of your workflow's functionality and integration capabilities.


# Output Options

At the moment, Automateo offers two output options for your workflows:

1. **Webhook Output**
   * Sends a POST request to your specified server
   * Configuration:
     * Provide the webhook URL where you want to receive the results
   * Payload format:
     * JSON object with keys named after each input node
     * Values are the corresponding outputs from those nodes
   * Example payload:

     ```json
     {
       "input_node_1": "Output from input 1",
       "input_node_2": { "json_value": "Output from input 2" },
       "llm_node_1": "Generated content from LLM"
     }
     ```
2. **Email Output**
   * Sends the workflow results via email
   * Configuration:
     * Requires specific input format in your workflow:
       * `email_to`: Recipient's email address
       * `email_subject`: Subject line of the email
       * `email_body`: Content of the email
   * These fields should be set either in your Input nodes or generated by your LLM nodes
   * When using the email option, the output node can have only one input providing all the required inputs
   * The emails will always be sent from `hi@automateo.aoo`

Choose the output option that best fits your use case and integrate it into your existing systems or processes.

###


# LLM Node Configuration

LLM (Language Model) nodes are the core of Automateo's functionality. Here's how to configure them:

1. **Prompt Templates**
   * Use "{variable}" syntax to reference outputs from previous nodes
   * Example: "Summarize the following text: {input\_text}"
2. **Model Selection**
   * Choose from various LLM models:
     * ChatGPT 3
     * ChatGPT 4
     * Mixtral
     * LLaMA
     * (Other available models)
3. **Output Format**
   * Specify the desired output format:
     * Text: For general text output
     * Markdown: For formatted text
     * JSON schema: For structured data output

Remember to test your LLM nodes with sample inputs to ensure they produce the expected outputs before integrating them into your production workflows.


# Execution History

Automateo provides detailed execution history for each of your workflows. To access this information:

1. Navigate to your workflow dashboard
2. Select the workflow you want to analyze
3. Click on the "Details" tab

In the execution history, you can view:

* Execution timestamps: When each run of the workflow was triggered
* Input values: The data provided to the workflow for each execution
* Output results: The final output of the workflow
* Amount of tokens: How many input and output tokens were used
* Runtime duration: How long each execution took to complete
* Average cost: The estimated cost per execution based on the models used
* Even more details: Click the "View Execution Details" button to see a step-by-step inputs and outputs

This information is valuable for:

* Debugging your workflows
* Optimizing performance
* Tracking usage and costs
* Ensuring reliability of your AI processes


# API Keys and Authentication

Proper authentication is crucial for secure use of Automateo. Here's what you need to know:

1. **Automateo API Key**
   * Generate this key from your "API Keys" page
   * Used to authenticate all requests to Automateo
   * You can create multiple API keys
   * Include in the Authorization header as "Bearer {token}"
2. **Third-party API Keys**
   * Add your own API keys for:
     * OpenAI
     * Together AI
     * Fireworks AI
   * These allow you to use your own accounts with these services
   * To add: Go to  API Keys > Create API Key
3. **Security Best Practices**
   * Never share your API keys
   * Rotate keys regularly
   * Use environment variables to store keys in your code
   * Monitor key usage for any suspicious activity

Remember, protecting your API keys is essential to maintain the security of your Automateo account and associated services.


# Pricing and Usage

Understanding Automateo's pricing structure and usage limits is important for managing your costs effectively.

1. **Monthly Plans**
   * Automateo offers various monthly plans
   * Each plan comes with a maximum usage allowance
   * Allowances are measured in workflow executions, number of Premium AI calls and number of Standard AI calls
2. **Exceeding Allowances**
   * Once you've used your monthly allowance, you have two options:
     1. Upgrade to a higher tier plan
     2. Continue using Automateo with your own API keys for supported services
3. **Using Your Own API Keys**
   * Add API keys for OpenAI, Together AI, or Fireworks AI
   * Charges for usage will go directly to your accounts with these services
   * Automateo does not charge additional fees when using your own keys
4. **Usage Monitoring**
   * Monitor your usage through the Automateo dashboard
   * Set up alerts on AI provider services for when you're approaching your usage limits
5. **Cost Optimization**
   * Use the execution history to identify high-cost workflows
   * Optimize prompts and model choices to reduce costs
   * Consider caching results for frequently run workflows with similar inputs

For detailed pricing information and current plans, please visit the Automateo pricing page on our website.


# Implementing Automateo Workflows in Your Applications

Automateo workflows are designed to be easily integrated into a wide variety of applications, from custom-coded solutions to no-code platforms. This guide will walk you through the process of implementing Automateo workflows in different environments.

### Understanding the Workflow Execution Process

Before diving into implementation details, it's crucial to understand how Automateo workflows are executed:

1. **Triggering the Workflow**: When you send a request to trigger a workflow, Automateo immediately returns a workflow execution ID.
2. **Asynchronous Execution**: The workflow then begins executing asynchronously.
3. **Result Delivery**: Once the workflow completes, Automateo sends a webhook request to your specified server with the output data.
4. **Result Handling**: Your application needs to match the received results with the original execution ID to process and display the data correctly.

This asynchronous process allows for efficient handling of long-running workflows and provides flexibility in how you manage and display results to your users.

### Implementing in Custom Coded Applications

When integrating Automateo workflows into your custom-coded applications, you'll need to handle both the initial workflow triggering and the subsequent result webhook. Here's how to do this using JavaScript:

1. **Triggering Workflows** Use the Fetch API or a library like Axios to send POST requests to your workflow's webhook URL.

   ```javascript
   async function triggerWorkflow(inputData) {
     const url = "https://api.automateo.com/workflow/trigger/{workflow_id}";
     const headers = {
       "Authorization": "Bearer YOUR_API_KEY",
       "Content-Type": "application/json"
     };
     
     try {
       const response = await fetch(url, {
         method: 'POST',
         headers: headers,
         body: JSON.stringify(inputData)
       });
       
       const result = await response.json();
       const executionId = result.id;
       
       // Store the executionId for later use
       saveExecutionId(executionId);
       
       return executionId;
     } catch (error) {
       console.error("Error triggering workflow:", error);
     }
   }

   function saveExecutionId(executionId) {
     // Implement this function to store the executionId for the current user
     // This could be in a database, local storage, or state management system
   }
   ```
2. **Handling Webhook Results** Set up an endpoint in your server to receive the webhook with the workflow results.

   ```javascript
   const express = require('express');
   const app = express();

   app.post('/workflow-result', express.json(), (req, res) => {
     const executionId = req.body.workflow_execution_id;
     const outputData = req.body.output;

     // Process and store the result
     processWorkflowResult(executionI
     res.sendStatus(200);
   });

   function processWorkflowResult(executionId, outputData) {
     // Implement this function to process and store the workflow result
     // This should match the result with the stored executionId
     // and update your application state or database accordingly
   }
   ```
3. **Displaying Results to Users** Implement a way to check for and display results once they're available.

   ```javascript
   async function checkWorkflowResult(executionId) {
     // Implement this function
     // This could involve querying your database or checking application state
     const result = await fetchResultFromDatabase(executionId);
     if (result) {
       displayResultToUser(result);
     } else {
       console.log("Result not available yet")
     }
   }

   function displayResultToUser(result) {
     // Implement this function to update your UI with the workflow result
   }
   ```

### Implementing in No-Code Platforms

The process for no-code platforms is similar, but the implementation details will vary based on the platform's capabilities.

#### Integrating with Bubble.io

1. **Triggering Workflows**
   * Use Bubble's API Connector to send a request to Automateo.
   * Store the returned execution ID in a custom state or database.
2. **Handling Results**
   * Set up a webhook endpoint in Bubble to receive the results.
   * In the webhook workflow, match the received execution ID with the stored one and update your app's data accordingly.

#### Integrating with Zapier

1. **Triggering Workflows**
   * Use Zapier's Webhook action to send data to your Automateo workflow.
   * Store the returned execution ID using a storage action or by updating a record in a connected app.
2. **Handling Results**
   * Create a webhook trigger in Zapier to receive the results.
   * Use subsequent steps in your Zap to process the results and update the relevant records or trigger further actions.

### Best Practices for Implementation

1. **Execution ID Management**
   * Implement a system for storing and retrieving execution IDs.
   * Consider implementing an expiration policy for old execution IDs.
   * Connect execution IDs with user IDs.
2. **Error Handling**
   * Implement error handling for both the initial trigger request and the result webhook.
   * Have a plan for handling cases where results are delayed or never received.
3. **User Experience**
   * Provide clear feedback to users about the status of their workflow (e.g., "Processing", "Complete").
   * Consider implementing a polling mechanism or websockets for real-time updates on workflow status.
4. **Security**
   * Validate incoming webhooks to ensure they're genuinely from Automateo.
   * Implement proper authentication in your app to control who can trigger workflows.
5. **Testing**
   * Thoroughly test your integration, including error cases and delayed results.
   * Use the webhoook.me tool (discussed in the Running and Debugging section) to simulate and verify your integration.
6. **Monitoring and Logging**
   * Implement logging for all workflow triggers and results.
   * Set up monitoring to alert you of any issues in the workflow execution process.

By following these guidelines and understanding the asynchronous nature of Automateo workflows, you can create robust integrations that leverage the power of AI and LLMs in your applications, providing enhanced functionality and value to your users.


