1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

ai → Ask AI

AI-generated

Overview

The Ask AI operation of the ai resource in this n8n node allows you to send a text prompt to an AI model (such as OpenAI's GPT-3.5-turbo or GPT-4) and receive a generated response. This is useful for automating tasks that require natural language understanding or generation, such as summarizing content, translating text, changing tone, anonymizing data, or generating custom responses based on user-defined templates.

Common scenarios:

  • Summarizing long documents or emails.
  • Translating text into different languages.
  • Checking grammar and spelling automatically.
  • Generating action items from meeting notes.
  • Custom AI-powered text transformations in workflows.

Practical examples:

  • Automatically translate customer support tickets to English.
  • Use "Find Action Items" to extract tasks from meeting transcripts.
  • Anonymize sensitive information before storing or sharing data.

Properties

Name Meaning
Text Text that will be sent to the AI. Required input for the prompt.
Temperature Sampling temperature (0–2). Higher values (e.g., 0.8) make output more random; lower values (e.g., 0.2) make it more focused and deterministic.
Max Tokens Maximum number of tokens to generate in the completion. Controls length of the AI's response.
Model AI model to use. Options: gpt-3.5-turbo, gpt-4. Defaults to gpt-3.5-turbo.
System Message Optional system message to guide the AI's behavior (e.g., "You are a helpful assistant.").
Prompt Template Predefined or custom template for the prompt. Options: Anonymize Text, Change Tone, Check Spelling and Grammer, Continue Writing, Custom, Explain This, Find Action Items, Make Longer, Make Shorter, Simplify, Summarize, Translate.
Additional parameters Input Mode How to provide additional parameters. Options: Expression, Manual.
Additional parameters (Expression) JSON object with extra parameters, used if Input Mode is "Expression".
Additional parameters (Manual) Collection of extra fields, used if Input Mode is "Manual":
- Custom Prompt: Used only if Prompt Template is "Custom". Include %TEXT% as placeholder.
- Translation Language: Used if Prompt Template is "Translate".
- Tone: Used if Prompt Template is "Change Tone".

Output

  • The node outputs a single field:
    • json: Contains the AI-generated response. The structure depends on the AI model's output, but typically includes fields like choices, text, or similar, depending on the API response.
  • If the API returns non-JSON data or an error, the raw response or error message will be included in the json field.

Example output:

{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Here is your summarized text..."
      }
    }
  ]
}

or, in case of error:

{
  "error": "API key missing or invalid"
}

Dependencies

  • External Service: Requires access to the 1001fx API, which acts as a proxy to AI models.
  • Credentials: You must configure the 1001fxApi credential in n8n.
  • Environment: No special environment variables required beyond standard n8n setup.

Troubleshooting

Common issues:

  • Invalid API Key: If credentials are not set up correctly, you may see errors like "API key missing or invalid".
  • Model Limitations: Exceeding token limits or using unsupported models can result in errors.
  • Malformed Input: If required fields (like Text or Prompt Template) are missing, the node may throw validation errors.
  • Incorrect Parameter Mode: Supplying additional parameters in the wrong mode (Expression vs. Manual) may cause unexpected results.

Error messages:

  • "API key missing or invalid": Ensure your 1001fxApi credentials are configured in n8n.
  • "Request failed with status code 400": Check your input parameters for correctness and completeness.
  • "Unexpected token < in JSON at position 0": The API returned non-JSON data; check for service outages or misconfiguration.

Links and References

Discussion