# In Canvas

Follow the steps below to create a new CodeGrade assignment in Canvas:

1. Click the **"+ Assignment"** button in Canvas.
2. Under submission type, select **"External Tool"**.
3. Under **"Enter or find an External Tool URL"** click the **"Find"** button.
4. In the dialog, select **"CodeGrade"** and click **"select"**.
5. Add your Due date and other Canvas options and finally save your assignment.
6. Your assignment will automatically open in Canvas and the CodeGrade environment will be visible.

{% hint style="success" %}
Grades are automatically sent back to Canvas after setting [the **assignment state** to **Done** in CodeGrade.](https://help.codegrade.com/faq/releasing-grades-and-feedback) While the assignment is in the **Done** state, all grades and changes to grades are immediately sent back to Canvas.
{% endhint %}

Now, go ahead and set up the General Settings:

{% content-ref url="../general-settings" %}
[general-settings](https://help.codegrade.com/setup-assignment/build-assignment/general-settings)
{% endcontent-ref %}


---

# 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://help.codegrade.com/setup-assignment/build-assignment/creating-an-assignment/in-canvas.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.
