# \_setNote

Sets a Note for an Email which Tasks will be Imported to.

### Parameters

#### id

The ID of the Email.

#### val

The Notes to be put onto the email

### Example

```
FM_api('ImportTasksEmail_setNote',[
    'id'=>'90186',
    'val'=>'Test Note'
    ]
);
```

### Results

#### On Failure

If the "id" parameter is not given a value or has a value less than 1:

```
{"error":"missing or invalid parameter: id"}
```

If the "val" parameter has no value after being trimmed:

```
{"error":"missing or invalid parameter: val"}
```

If the "val" parameter has over 65535 characters in length:

```
{"error":"parameter val too long. max length 65535"}
```

If the "id" parameter does not match the ID of an existing email:

```
{"error":"that import does not exist"}
```

#### On Success

```
{"ok":1,"id":90186}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/importtasksemail/_setnote.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
