The only requirement is requests
A requirements.txt
file is provided, alternatively you can use Poetry:
- Install Poetry if you don't have it already
- Clone this repo and move into the directory (
cd gorgias-python-tool
) - Run
poetry install
Although you can pass arguments on the command line, you can use a config file to configure the most common options.
- Rename
config.ini.sample
toconfig.ini
- Open it up in your preferred text editor and modify with your details. You'll need:
- Gorgias API Token
- Gorgias User name
- Gorgias Subdomain
- The email address to send your messages from
You can run python main.py --help
to see a full list of arguments you can pass. Please see below for examples of how you may want to use the tool.
⭐ Just omit
--ticket-id
and your arguments will generate a new ticket. A subject for your ticket/email (--subject
) is optional, but recommended.
python main.py --body-html "<p>Hi Edd</p><p>How are you?</p>" --customer-email [email protected] --subject "New ticket"
⭐ For the examples below,
--customer-email
is optional when not creating a new ticket, the original requester of the ticket will be used as the recipient.
python main.py --ticket-id 2376446 --body-html "<p>Hi Edd</p><p>How are you?</p>" --customer-email [email protected]
python main.py --ticket-id 2376446 --body-text "Hi Edd, How are you?"
python main.py --ticket-id 2376446 --body-text "Hi Edd, How are you?" --sender-email [email protected]
Add tags to the ticket (tags that don't exist will be created - can also be done during message creation):
python main.py --ticket-id 2376446 --tag tag1 tag2
python main.py --ticket-id 2376446 --body-text "Hi Edd, How are you?" --customer-email [email protected] [email protected]
python main.py --ticket-id 2376446 --body-html "<p>Hi Edd</p><p>How are you?</p>" --message-type internal-note
python main.py --ticket-id 2376446 --close-ticket
python main.py --ticket-id 2376446 --open-ticket