## IGmailClientAsync.CreateFilterAsync method

Asynchronously creates a Gmail filter.

```csharp
public Task<string> CreateFilterAsync(Filter filter, CancellationToken cancellationToken = default)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filter | Filter | The filter to create. |
| cancellationToken | CancellationToken | A cancellation token. |

### Return Value

A task that represents the asynchronous operation. The task result contains the filter ID.

### See Also

* class [Filter](../../filter/)
* interface [IGmailClientAsync](../)
* namespace [Aspose.Email.Clients.Google](../../igmailclientasync/)
* assembly [Aspose.Email](../../../)


