---
title: AES_DECRYPT
url: https://www.tines.com/docs/formulas/functions/aes-decrypt/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# AES_DECRYPT

*[View on tines.com](https://www.tines.com/docs/formulas/functions/aes-decrypt/)*

Note: AES_ENCRYPT and AES_DECRYPT are now deprecated. Please use either TINES_ENCRYPT/TINES_DECRYPT or OPENSSL_ENCRYPT/OPENSSL_DECRYPT instead.

Decrypts text using AES

The input must be AES-256-CBC Base64 encoded or be the direct output of AES_ENCRYPT. An initialization vector can optionally be passed as a third argument.

**Categories:** Encryption

## Syntax

```
AES_DECRYPT(encoded_text, key, [iv])
```

## Examples

### Example 1

Formula:

```
AES_DECRYPT(my_action.encrypted_message, CREDENTIAL.secret_key)
```

## Sample actions

### Sample action 1

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": "otZMcEgEhODINSIB1g3Yz9lqUBZymCp7QiP0ajBeXFAWRfZerTYkDF5jormeYSBr"
        }
      },
      "position": {
        "x": 1980,
        "y": 1740
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "AES_DECRYPT",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "aes_decrypt": "=AES_DECRYPT(my_action.message, CREDENTIAL.aes_secret_key, CREDENTIAL.aes_iv)"
        }
      },
      "position": {
        "x": 1980,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```

### Sample action 2

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "AES_DECRYPT",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "aes_decrypt": "=AES_DECRYPT(my_action.message, CREDENTIAL.aes_secret_key)"
        }
      },
      "position": {
        "x": 2160,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": "kexGSJpw8MUpqJ8BZsZau3sCeX6t29GzrJNRIAiM7oTmqw9KRUxaPT/qCufj5hpE"
        }
      },
      "position": {
        "x": 2160,
        "y": 1740
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 1,
      "receiverIdentifier": 0
    }
  ],
  "diagramNotes": []
}
```
