0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

AI → Detect Email Type

AI-generated

Overview

The node provides a utility to analyze an email's content and determine the type of the email based on its subject and body. This can be useful in scenarios such as automatically categorizing incoming emails, routing them to appropriate departments, or triggering specific workflows depending on the email type detected. For example, it could distinguish between order confirmations, support requests, marketing emails, or other categories by analyzing the text content.

Properties

Name Meaning
Email Subject The subject line of the email to analyze. Example: "Your order confirmation #12345"
Email Body The body content of the email to analyze. Example: "Thank you for your recent purchase..."

Output

The node outputs JSON data representing the detected email type based on the analysis of the provided subject and body. The exact structure of the output JSON is not detailed in the source code, but it typically would include fields indicating the classification or category of the email.

No binary data output is indicated.

Dependencies

  • Requires an API key credential for authentication with the external service at https://prod.0codekit.com.
  • The node sends a POST request to the endpoint /ai/detectemailtype with the email subject and body in the request payload.
  • Proper configuration of the API key credential in n8n is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Missing or invalid API key credential will cause authentication failures.
    • Providing empty or malformed email subject/body may result in errors or inaccurate detection.
    • Network connectivity issues to the external API endpoint can cause request failures.
  • Error messages:

    • Authentication errors usually indicate problems with the API key setup; verify the credential configuration.
    • Validation errors may occur if required properties (subject, body) are missing; ensure these inputs are correctly set.
    • Timeout or network errors suggest connectivity problems; check internet access and API availability.

Links and References

  • No direct links provided in the source code.
  • For more information, consult the documentation of the external AI service used at https://prod.0codekit.com.

Discussion