StackAI

The StackAI Node allows you to perform a variety of tasks within your workflow by leveraging built-in Stack AI tools. Each action is designed for a specific use case, and you can configure the node to perform the action you need by selecting the appropriate action ID and providing the required inputs.


Available Actions

1. Analysis Tool

  • Purpose: Analyze data, create charts, and translate natural language queries into Python code.

  • How to use: Provide a self-contained query describing the analysis you want to perform. The tool will generate and execute Python code in a stateless environment (no memory of previous runs).

  • Inputs:

    • Query (string, required): The natural language description of the analysis or chart you want.

  • Outputs:

    • Success (boolean): Whether the code ran successfully.

    • Code (string): The Python code that was executed.

    • Result (string): The result of the code execution.

    • Chart URL (string, optional): A public URL to any chart generated.


2. Send Email

  • Purpose: Send an email to a specified recipient.

  • How to use: Provide the subject, content (HTML supported), and recipient's email address.

  • Inputs:

    • Subject (string, required): The subject line of the email.

    • Content (string, required): The main body of the email (HTML supported).

    • To (string, required): The recipient's email address.

  • Outputs:

    • Status (string): Success or error.

    • Message (string): A human-readable message about the result.

    • Details (string): A summary of the sent email (from, to, subject, content).


3. StackAI Project

  • Purpose: Execute another Stack AI project as a subflow.

  • How to use: Select a Stack AI project and provide input data (as a list). Optionally, enable loop mode to run the project for each item in the list.

  • Inputs:

    • Project (select, required): The Stack AI project to execute.

    • Loop Mode (boolean, optional): If enabled, runs the project for each item in the input list.

    • Input Data (array of strings, required): The data to pass to the project.

  • Outputs:

    • Results (array of objects): The results from the project execution.


4. Send HTTP Request

  • Purpose: Make a custom API call to any HTTP endpoint.

  • How to use: Specify the URL, HTTP method, and optionally headers, query parameters, and request body.

  • Inputs:

    • URL (string, required): The endpoint to call.

    • HTTP Method (select, required): GET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS.

    • Headers (object, optional): HTTP headers as key-value pairs.

    • Queries (object, optional): Query parameters as key-value pairs.

    • Request Body (object, optional): Data to send as JSON.

  • Outputs:

    • Status Code (integer): The HTTP status code.

    • Headers (object): The response headers.

    • Body (object/string/array): The response body.


5. Create Slides

  • Purpose: Generate HTML slides from a prompt.

  • How to use: Provide a prompt describing the slides you want to create.

  • Inputs:

    • Query (string, required): The prompt for the slides.

  • Outputs:

    • Success (boolean): Whether the slides were created.

    • Slides (array): The generated slides (each with a title and content).

    • Title (string): The title of the slide deck.


6. Image to Image

  • Purpose: Transform an image using a vision model, guided by a prompt.

  • How to use: Provide the URL of the source image, a prompt describing the transformation, and select a model.

  • Inputs:

    • Source Image URL (string, required): The image to transform.

    • Transformation Prompt (string, required): Description of the desired transformation.

    • Vision Model (select, required): The model to use (e.g., Flux Kontext Max).

  • Outputs:

    • Transformed Image URL (string): The URL of the transformed image.


7. List Actions

  • Purpose: List all available actions for every provider.

  • How to use: No input required.

  • Outputs:

    • Actions by Provider (object): A mapping of provider IDs to lists of available action IDs.


8. Get Actions Info

  • Purpose: Get detailed information about a specific action (input/output schema, etc.).

  • How to use: Provide the provider ID and action ID.

  • Inputs:

    • Provider ID (string, required): The provider (e.g., stackai, gmail, slack).

    • Action ID (string, required): The action (e.g., send_email, list_actions).

  • Outputs:

    • Action Info (object): Complete information about the action, including input and output schemas.


9. Generate Workflow

  • Purpose: Validate and generate a workflow structure from a list of nodes and edges.

  • How to use: Provide arrays of nodes and edges as dictionaries.

  • Inputs:

    • Nodes (array, required): List of workflow nodes.

    • Edges (array, required): List of workflow edges.

  • Outputs:

    • Nodes (array): The validated list of workflow nodes.

    • Edges (array): The validated list of workflow edges.

Last updated

Was this helpful?