0-CodeKit icon

0-CodeKit

A toolbox of no-code utilities

Overview

The Crypto - Encrypt a Message operation in this custom n8n node allows you to encrypt a given message using a specified cryptographic algorithm and secret key. This is useful for securely transmitting sensitive information, storing confidential data, or integrating encryption into automated workflows.

Common scenarios:

  • Encrypting user credentials before saving them to a database.
  • Securing API tokens or secrets before sending them over the network.
  • Automating secure messaging between systems.

Practical example:
You can use this node to encrypt a password with AES before storing it in a Google Sheet, ensuring that only authorized users with the secret key can decrypt and access the original password.


Properties

Name Meaning
Message The text message you want to encrypt.
Secret Key The secret key used for encryption. Must be kept safe to allow decryption later.
Crypto Type The encryption algorithm to use. Options: AES, DES, TripleDES, Rabbit, RC4, RC4Drop.

Output

The output will be a JSON object containing the result of the encryption operation. The structure typically includes:

{
  "result": "<encrypted_message>"
}
  • result: The encrypted version of your input message, encoded as a string (often base64 or hex, depending on the algorithm).

Dependencies

  • External Service: Requires valid credentials for the codeKitApi (as configured in n8n).
  • n8n Configuration: You must set up the codeKitApi credential in your n8n instance.

Troubleshooting

Common issues:

  • Invalid Secret Key: If the secret key is missing or does not meet the requirements of the chosen algorithm, encryption may fail.
  • Unsupported Crypto Type: Selecting an unsupported or misspelled crypto type will cause errors.
  • API Credential Errors: If the codeKitApi credential is not set up or is invalid, the node will throw authentication errors.

Error messages and resolutions:

  • "Missing required parameter: message": Ensure you provide a value for the Message property.
  • "Invalid cryptoType": Double-check that you selected one of the supported algorithms.
  • "Authentication failed": Verify your codeKitApi credentials in n8n.

Links and References

Discussion