> For the complete documentation index, see [llms.txt](https://docs.friggframework.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.friggframework.org/2.0/api-modules/module-list/helpscout/configuration.md).

# Configuration

Help Scout has different kinds of apps. The Frigg integration works with the Mailbox API, which allows **your app** to interact with Help Scout in the most flexible way.

### Getting started

This guide assumes you already have a Frigg App working.

1. Sign up/in to your Help Scout account, for free ([site link](https://www.helpscout.com/)).
2. Follow the [official instructions](https://developer.helpscout.com/mailbox-api/overview/authentication/#oauth2-application) for creating an App under your profile (not in the *App Directory*).
3. Specify a Redirection URL that follows this pattern: `https://{your domain}/redirect`. This is an example for localhost: `http://localhost:3000/redirect`.
4. In your Frigg App env file, add the following entries:

```js
"HELPSCOUT_CLIENT_ID": "{{ your app client id }}",
"HELPSCOUT_CLIENT_SECRET": "{{ your app secret }}"
```

5. Add a Help Scout integration file to your Frigg app (you can find an example at the end of this document).
6. Implement any calls you need (use the `getSampleData` method as an example).
7. Add the integration in your appDefinition in `backend.js`:

```js
const appDefinition = {
    integrations: [
        helpscoutIntegration
    ],
    user: {
        password: true,
    }
}
```

8. Done! You are ready to run the app and test the integration live.

### Example integration file

```js
class HelpscoutIntegration extends IntegrationBase {
    static Config = {
        name: 'helpscout',
        version: '1.0.0',
        supportedVersions: ['1.0.0'],
        events: ['EXAMPLE_EVENT'],
    };

    static Options =
        new Options({
            module: HelpscoutModule,
            integrations: [HelpscoutModule],
            display: {
                name: 'Help Scout',
                description: 'Mailbox integration',
                category: 'CRM',
                detailsUrl: 'https://helpscout.com',
                icon: '',
            }
        });

    static display =  {
        name: 'Help Scout',
        description: 'Help Scout Mailbox integration',
        category: 'CRM',
        detailsUrl: 'https://helpscout.com',
        icon: '',
    }

    static modules = {
        helpscout: HelpscoutModule
    }

    /**
     * HANDLE EVENTS
     */
    async receiveNotification(notifier, event, object = null) {

    }

    /**
     * ALL CUSTOM/OPTIONAL METHODS FOR AN INTEGRATION
     */
    async getSampleData() {
        const list = await this.target.api.listConversations()
        
        const formatted = list._embedded.conversations.map(conversation => {
            return {
                id: conversation.id,
                type: conversation.type,
                subject: conversation.subject,
                preview: conversation.preview,
            }
        });
        return { data: formatted }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.friggframework.org/2.0/api-modules/module-list/helpscout/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
