# Phishing Detection

## Overview

Phishing Detection is one of the intelligence services of the Filestack platform. You can detect malicious html.

This task is only available at Filestack Workflows. Read more about Workflows [here](https://www.filestack.com/docs/workflows/overview/).

## Workflows Task Configuration

In order to learn how you can use Workflows UI to configure tasks and logic items, please visit [Creating Workflows Tutorial](https://www.filestack.com/docs/tutorials/create-workflow/).

Phishing Detection task is available in [Intelligence](https://www.filestack.com/docs/workflows/overview/#tasks) tasks category.

### Workflows Parameters

|     |     |     |
| --- | --- | --- |
| **Task Name** | [string](https://www.filestack.com/docs/transformations/intelligence/phishing-detection/#color-options) | Unique name of the task which will be included in the webhook response and can be used to build [logic](https://www.filestack.com/docs/transformations/intelligence/phishing-detection/#logic) below. |

## Logic

Phishing Detection task returns following response to the workflow:

```
{
  "data": {
    "phishing": false
  }
}
```

or

```
{
  "data": {
    "phishing": true
  }
}
```

### Logic Parameters

|     |     |     |
| --- | --- | --- |
| **data** | [dictionary](https://www.filestack.com/docs/transformations/intelligence/phishing-detection/#color-options) | Includes the information of phishing detection task. |
| **phishing** | [boolean](https://www.filestack.com/docs/transformations/intelligence/phishing-detection/#color-options) | Indicates whether the file is safe or not. |

Considering the response from the task, you can build [logic](https://www.filestack.com/docs/workflows/overview/#logic) in order to make independent flows with different executing tasks. For example, if you would like to run another task if the file is not safe, you can use the following rule:

`phishing eq true`

In Workflows UI this command would be similar to the example below:

Visit [Creating Workflows Tutorial](https://www.filestack.com/docs/tutorials/create-workflow/) to learn how you can use Workflows UI to configure your tasks and logic between them.

## Webhook

Below you can find an example webhook payload for a phishing detection task

- Uploaded file is not safe:

```
{
"id": 65374400,
"action": "fs.workflow",
"timestamp": 1551126123,
"text": {
      "workflow": "c518519f-3755-4fb5-85a4-15ae4b31d475",
      "createdAt": "2019-02-25T20:21:53.92966708Z",
      "updatedAt": "2019-02-25T20:21:56.71616556Z",
      "sources": [\
          "H2swKXwhRxKFrylkjUcz"\\
      ],
      "results": {
          "phishing_detection_1551120182170": {
              "data": {
                  "phishing": true
              }
          }
      },
      "status": "Finished"
}
}
```

- Uploaded file is safe:

```
{
"id": 65374401,
"action": "fs.workflow",
"timestamp": 1551126197,
"text": {
      "workflow": "c516519f-3755-4fb5-85a4-15ae4b31d475",
      "createdAt": "2019-02-25T20:21:53.929686791Z",
      "updatedAt": "2019-02-25T20:21:56.716186597Z",
      "sources": [\
          "H2swKXwhRxKFrylakLwcd"\\
      ],
      "results": {
          "phishing_detection_1551120182170": {
              "data": {
                  "phishing": false
              }
          }
      },
      "status": "Finished"
}
}
```

Please visit the [webhooks](https://www.filestack.com/docs/api/webhooks/#workflow) documentation page to learn more.
