Lleverage Documentation
WebsiteLegalPlatform
  • Get Started
    • Introduction
    • Co-Pilot
    • FAQ
  • Key Terms
  • Action Guide
    • Triggers
    • Output
    • Prompt
    • Agents
  • Extracting Information
  • Using Information
  • Custom Code
  • Subworkflows
  • Knowledge Bases
  • Intergrations
  • Canvas Guide
    • Canvas Controls
    • Action Cards
    • Action Connections
    • Variables and Data Flow
  • The Run Panel and Testing
  • Error Handling
  • Publishing Guide
    • How to Publish
    • API Endpoint
    • Chat App
    • Form App
    • Integration Configuration
    • Scheduling Workflows
  • Sharing
  • Settings
    • Account Setup
  • Projects
  • Subscription Management
  • Sharing & User Permissions
  • Technical
    • Models
    • Security & Performance
  • Analytics & Monitoring
  • Support
    • Release Notes
      • April 2025
      • March 2025
      • February 2025
      • January 2025
      • December 2024
      • November 2024
      • October 2024
      • September 2024
      • August 2024
      • July 2024
    • Getting Help and Troubleshooting
Powered by GitBook
On this page
  • Key Features
  • How to Add Advanced Coding Actions
  • How to Configure Advanced Coding Actions
  • Important Considerations for HTTP Requests
  • Important Considerations for Run Code
  • How Advanced Coding Actions Work in Your Workflow

Custom Code

Advanced Coding actions in Lleverage provide powerful capabilities for developers and technical users to integrate custom code and external services into their workflows. These actions allow for HTTP requests to external APIs and custom JavaScript code execution.

Key Features

  • External API integration through HTTP requests

  • Custom code execution using JavaScript

  • Flexible configuration options for different request types

  • Header customization for authentication and data formatting

  • Variable integration for dynamic request parameters

How to Add Advanced Coding Actions

  1. Open the Add Action menu using one of three methods:

    • Click the "Add Action" button in the top left corner

    • Click on a connection circle on an existing action card

    • Click and drag from one node to create a connection

  2. Find these actions in either:

    • The "All" tab

    • The "Tools" tab

  3. Choose one of the two available actions:

    • Send HTTP Request

    • Run Code

  4. Click on your chosen action to add it to your canvas

💡 While these are advanced coding actions, they appear in the general tools section rather than a dedicated "Advanced Coding" category.

How to Configure Advanced Coding Actions

How to Use Send HTTP Request

  1. Configure the required URL field with the endpoint you want to access

  2. Select the HTTP method (required):

    • GET: Retrieve data from the server

    • POST: Send data to the server

    • PUT: Update existing resources

    • DELETE: Remove resources

  3. Choose a Content-Type (required):

    • application/json: For sending JSON-formatted data

    • multipart/form-data: For sending files and form data

    • text/plain: For sending plain text

    • application/x-www-form-urlencoded: For sending form data as URL variables

  4. Set up headers:

    • Authorization: For authentication tokens or credentials

    • Additional Headers: Click "Add Headers" to include custom headers

    • For each additional header, provide a name and value

    • Delete individual headers as needed

⚠️ Follow the developer guidelines for any API you're connecting to, as requirements vary between services. Tools like Postman can help you understand how HTTP requests work.

How to Use Run Code

  1. The action provides a JavaScript code editor

  2. Enter your custom JavaScript code in the editor

  3. The code will execute when this action runs in your workflow

  4. This action doesn't require any input, as you can pass through this action if needed

💡 To use variables in your code, use the advanced variable syntax with double curly braces: {{ variableName }}

Important Considerations for HTTP Requests

  1. Different APIs require different headers and authentication methods

  2. Content-Type determines how your data will be formatted when sent

  3. You can add multiple custom headers for specialized API requirements

  4. Variables can be used in any field (URL, headers, etc.) for dynamic requests

  5. Responses from HTTP requests can be referenced as variables in subsequent actions

⚠️ Always test your HTTP requests thoroughly to ensure they're correctly formatted for your target API.

Important Considerations for Run Code

  1. Only JavaScript is supported in the Run Code action

  2. Code executes within Lleverage's environment, not locally

  3. Advanced variable syntax is required to access workflow variables

  4. The code can process data and return results to the workflow

  5. Complex operations may require careful error handling

💡 The Run Code action is particularly useful for data transformation, calculations, and conditional logic that's difficult to achieve with standard actions.

How Advanced Coding Actions Work in Your Workflow

  1. Add the appropriate advanced coding action to your workflow

  2. Configure the action with the necessary parameters or code

  3. Connect the action to subsequent steps that will use its output

  4. When the workflow runs, the action will execute its request or code

  5. The results become available as variables for other actions to process

💡 These advanced actions provide significant flexibility for extending your workflow capabilities beyond the standard actions.

Last updated 1 day ago

HTTP Request Action
Run Code Action with an example input