---
title: "Source mode for custom emails"
slug: "source-mode-for-custom-emails"
updated: 2026-04-29T16:44:55Z
published: 2026-04-29T16:44:55Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.quickbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Source mode for custom emails

The email editor offers a way to customize content. Use source mode when you need direct control over HTML.

## Open source mode

Select **Source** from the controls in the email editor.

![Email editor toolbar showing the Source button](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/26794742663956.png)

To exit source mode, select **Source** again.

## Work in source mode

Learn more about [HTML tags supported by Quickbase](/v1/docs/what-html-tags-are-allowed-by-quickbase).

Email elements, fields, and markers added in the editor have the following translations in source mode:

| **Email element** | **HTML tag in source code** | **Notes** |
| --- | --- | --- |
| Record change | <qb-changes></qb-changes> |  |
| Report | <qb-report report-id="6"></qb-report> |  |
| Form | <qb-form form-id="123"></qb-form> | Include a specific record ID to send a specific record out, for example: If a record ID is not included, Quickbase sends the changed record. |
| Table field | <qb-field field-id="6"></qb-field> |  |
| Marker | <qb-marker type="marker-type"></qb-marker> | Marker types include: - realm-name - app-id - table-id - notification-id - record-link |

## Functionality available only in source mode

Source mode allows you to add reports to your email from any related table in your app. Reports will be inserted as a table with simple formatting. Then you can customize the table, just like the [Report as a customizable table element](/v1/docs/report-as-customizable-table-element-in-document-templates) available in document templates.

Here's an example of the code for a table like this in source mode:

```xml
<h1>Project Tasks</h1>
<figure class="table">
  <table qb-wrapper-tag="qb-run-report" data-report-id="32" 
data-table-id="bqn7eauji" data-report-link-field-id="35" width="100%">
    <thead>
      <tr>
        <th>Task Name</th>
        <th>Assigned To</th>
      </tr>
    </thead>
    <tbody>
      <tr qb-wrapper-tag="qb-run-report-repeat">
        <td>
          <qb-field field-id="6" source="report"></qb-field>
        </td>
        <td>
          <qb-field field-id="125" source="report"></qb-field>
        </td>
      </tr>
    </tbody>
  </table>
</figure>
```

To create the table in source mode:

1. Use the `&lt;figure&gt;` HTML tag, with a class of table `class="table"`.
2. Add a table tag and include:
  - `qb-wrapper-tag="qb-run-report"&nbsp;`
  - `data-report-id="x"` – substitute "x" with the report ID of the report you want to include
  - `data-table-id="dbid"` – substitute "dbid" with the table ID where the report is located
  - `data-report-link-field-id="x"` – substitute "x" with the field ID of the report link field on the table
3. Code an HTML table with a heading row and a body row . In the heading row, add labels for the columns. The labels will likely match the field names from the report you intend to pull in. For example:

```xml
  <thead>
      <tr>
        <th>Task Name</th>
        <th>Assigned To</th>
      </tr>
    </thead>  
```
4. Add a table body. Make sure:
  - Table rows contain `qb-wrapper-tag="qb-run-report-repeat"`
  - Table data references report fields by using `qb-field field-id="x" &nbsp;source="report"`, where "x" is replaced by the field ID you want to reference. For example:

```xml
   <tbody>
      <tr qb-wrapper-tag="qb-run-report-repeat">
        <td>
          <qb-field field-id="6" source="report"></qb-field>
        </td>
        <td>
          <qb-field field-id="125" source="report"></qb-field>
        </td>
      </tr>
    </tbody>
```
5. Double-check your work—did you add all the necessary closing tags? Then close source mode. In the editor, there will be a table that looks like this: ![Report displayed as a formatted table in the email editor](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/31773112901140.png)
