Speedy Question Node icon

Speedy Question Node

speedy Question Node for sending a speedy Question, A Wait Field is Mandatory afterwards!

Overview

This node, named "Speedy Question Node," is designed to send a question message with a specified recipient, subject, and text. It supports two types of questions: a simple Yes/No question or a multiple-choice question with up to three options. The node constructs a message payload including the question and sends it via a stored procedure call to a backend database. This node is useful in scenarios where you want to prompt users for quick feedback or decisions within an automated workflow, such as confirming actions, gathering user preferences, or conducting polls.

For example, you might use this node to send a Yes/No question asking a user to confirm an appointment or to present a multiple-choice question to select a preferred delivery time.

Properties

Name Meaning
Empfänger Sets the recipient of the message (string).
Betreff Sets the subject of the message (string).
Text Sets the text content of the message (string).
AntwortURL URL to which the response should be sent back (string). Defaults to a webhook URL.

Note: Although the node supports an "Antworttyp" (answer type) property with options "Ja/Nein" (yesno) and "Auswahlfeld" (switch), for the selected operation "Ja/Nein" only the yes/no question type is relevant here.

Output

The node outputs an array of JSON objects representing the results of executing SQL queries that send the messages. Each output item contains a queryResult field holding the result returned from the database after calling the stored procedure to send the message.

The output structure looks like this:

[
  {
    "queryResult": { /* result of the SQL call */ }
  },
  ...
]

There is no binary data output by this node.

Dependencies

  • Requires access to a MySQL-compatible database.
  • Uses a stored procedure named n8n_sendMessage in the database to send the message.
  • Reads configuration from an external INI file whose path is defined in a JSON config (speedy_config.json).
  • Requires proper credentials and connection details (server, database, user, password, port) either from input data or from the INI configuration file.
  • The node expects a webhook URL for receiving responses, typically provided by n8n's resume webhook URL.

Troubleshooting

  • Database Connection Issues: Errors may occur if the database credentials or connection parameters are incorrect or missing. Verify the server address, port, username, password, and database name.
  • Stored Procedure Not Found: If the stored procedure n8n_sendMessage does not exist or has a different signature, the node will fail. Ensure the procedure is correctly installed in the target database.
  • Missing Required Parameters: The node requires at least the recipient and text properties to be set. Missing these may cause the message not to be sent.
  • Invalid Response URL: The response URL must be valid and reachable; otherwise, responses cannot be received.
  • SQL Injection Risk: Since the SQL query is constructed by interpolating parameters directly into the query string, ensure inputs are sanitized to avoid injection vulnerabilities.

Common error messages include:

  • "Error executing SQL query:" followed by the database error. Check credentials, network connectivity, and stored procedure existence.
  • JSON parsing errors if the configuration files are malformed.

Links and References

Discussion