Giter Site home page Giter Site logo

helpscout-app-template's Introduction

Helpscout App Template

Build Status

Do you use Help Scout for handling customer queries?

This project contains a Flask template which allows you setup custom app integration on Help Scout to display information from your user database. An example of such integration can be seen in this screenshot:

Screenshot of Help Scout custom app

It is easy to get started! Simply edit the configuration file to point to your PostgreSQL (for now) instance, and the web app will be ready. It is also fully customizable to your liking.

If you have not configured a Help Scout custom app before, please read their Developer Documentation for Custom Apps before proceeding. This would save you from having tons of headaches later.

Requirements

Python >= 2.6

At this stage, this project is only tested on Python 2.x. Support for Python 3.3 will be coming very soon!

Getting Started

First, clone the project off Github to your server, as Help Scout requires a publicly accessible IP / Domain to access the Flask instance. Then, install the requirements (preferbly into a virtualenv) before editing the configuration file:

pip install -r requirements.txt
# copy config.example.py to config.py
# edit config.py

cp config.example.py config.py
$EDITOR config.py

Notable configurations:

  • HELPSCOUT_SECRET: This is the secret key you have set when creating a Help Scout custom app.
  • DB_HOST, DB_NAME, ...: Database connection parameters to your PostgreSQL database.

By default, Help Scout will force a HTTPS connection to your predefined callback URL when setting up the custom app. For debugging purpose, you can enable Debug mode for your custom app to use HTTP.

** Warning **: Do not use plain HTTP after debugging!

You can run the Flask development server by running the following command:

python manage.py runserver

The default callback URL is http://<your-server-ip-or-domain/get-user/

Point your callback URL for your custom app to the server, and check there are any misconfigrations. If all is well, you should see the following reply from the Flask application:

{'html': '<h3>some-username</h3>'}

Customizations

HTML output

The HTML output is rendered using Jinja2's templating engine. You can modify the default template by editing this file: helpscout_django/templates/api/helpscout.html

SQL queries

This Flask template uses MoSQL, a lightweight Database library which allows queries to be constructed using Python data structures. More complicated queries can be constructed using join and select helpers from the library.

Of course, there is nothing stopping you from running SQLAlachemy to handle your database needs.

Callback endpoints

This callback API endpoints are available as a Flask blueprint. You can modify the callback URL or add your own endpoints by editing the helpscout_django/api/views.py file.

Upcoming plans

Pull requests are welcome for the following features, or any feature requests you may have.

  • Python 3.x support
  • Support for more databases apart from the default PostgreSQL at the moment
  • Better docs!

License

Copyright 2014 Carousell Pte Ltd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

helpscout-app-template's People

Contributors

victorneo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

victorneo arie-w

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.