Connect external apps to Gorgias and create sidebar widgetsUpdated an hour ago
In the Gorgias App Store, you can browse apps that connect to third-party platforms and allow you to bring their data into your helpdesk. If you're looking to connect to a platform that doesn't have an existing app in our App Store, you can build an HTTP integration using the third-party's public API. You might use an HTTP integration to automatically fetch data to display alongside tickets, or to trigger an action in an external system whenever a ticket event occurs.
Requirements
- Available on all Helpdesk plans
- The account owner and admins can create and manage HTTP integrations
Set up an HTTP integration
Before you start, you'll need the API endpoint URL from the third-party app you'd like to connect, the HTTP method it expects, and any authentication details; such as an API key. Refer to the app's API documentation for these details.
- From your helpdesk, click the Settings icon in the bottom-left corner.
- In the menu, locate Account, then select HTTP integration.
- Click the Manage tab, then click Add HTTP integration.
- In the Integration name field, enter a descriptive name for your integration.
- In the URL field, enter the endpoint URL from the third-party app.
- Set the HTTP Method to match what the external API requires (
GET,POST,PUT, orDELETE). - If the method is not
GET, select the Request content type (application/jsonorapplication/x-www-form-urlencoded) and configure the request body. - If your API requires authentication, you have two options:
- Header-based: Add the necessary key-value pairs under Headers, for example
Authorization: Bearer <your-api-key>. - OAuth2: Toggle on Enable authentication method: OAuth2 and fill in the Token URL, Client ID, Client Secret, Token Location (Header or Query String), Token Key, and optionally Scopes.
- Header-based: Add the necessary key-value pairs under Headers, for example
- Under Triggers, select the ticket events that should fire this integration. The available triggers are Ticket created, Ticket updated, Ticket self unsnoozed, Ticket message created, and Ticket message failed. Ticket assignment updated and Ticket status updated can't be combined with other triggers. If you select either one, you can't select the others. Triggers can't be filtered by channel, tag, or status, so the integration runs for every ticket that has the selected event.
- Click Add integration.
Display fetched data in the ticket sidebar
If your integration fetches customer data from an external system, you can surface it in the ticket sidebar as a custom widget.
- Open a ticket relevant to the data your integration is built to return.
- Click the nut icon in the ticket sidebar, then select Custom integrations to open widget settings.
- Click the six dots icon on the section that contains your integration's data, then drag it into the sidebar.
- You can customize which variables the widget displays in the ticket sidebar, and how they're displayed. Hover over a variable, then click the trash can icon to remove it from the widget, or the pencil icon to change the name or type of variable. To restore a variable that you've deleted, drag it over to the sidebar from the left-hand side of the page.
- To change widget's border color, click Customize Widget. To remove the widget from the ticket sidebar, click Delete Widget.
Once set up, the widget shows the fetched data on a ticket when the integration has returned data for that ticket's customer. The widget can only show a response returned as JSON. You can also reference this data in macros using back-office variables — see the Macro variables article for details.
Reliability and event delivery
HTTP integrations rely on the configured endpoint being reachable when ticket events fire. Each request has a 5-second timeout, and Gorgias handles failures differently depending on what goes wrong:
- The endpoint can't be reached at all (for example, it's down, or the connection is refused): Gorgias retries the request, regardless of which authentication method your integration uses.
- The endpoint accepts the connection but doesn't respond within 5 seconds: Gorgias retries the request only if your integration uses OAuth2 authentication. For Header-based authentication, requests are not retried.
- The endpoint returns an error status code (like a 429 or 500): Gorgias doesn't retry requests for these responses, for either authentication method. If you're seeing these status codes in your event logs, check your endpoint's rate limits and error handling.
When a retry does happen, Gorgias tries up to 3 times with exponential backoff: starting at 10 seconds, then 20, then 40.
When Gorgias turns off an integration
Gorgias turns off an HTTP integration automatically if 500 consecutive requests to your endpoint fail. Common causes include downtime on the receiving service, latency issues causing requests to time out, an expired API key or token, or a misconfigured endpoint URL.
Gorgias resets the failure count to 0 after a successful request is delivered. This means an occasional failure won't turn off the integration. Only a sustained run of 500 consecutive failures will.
These requests count as failures:
- A response with an error status code, such as 401, 429, or 500
- A request that times out or can't connect to your endpoint
- Each retry that fails
These don't count as failures:
- A response with a 404 status code
- An event where Gorgias can't build the request because of an error in a template variable. No request is sent, and the event log shows the error.
When an integration is turned off, Gorgias sends an email to every admin on the account. If you received that email, review the event logs to find the cause, fix it, then turn the integration back on.
Review integration event logs
To find the requests that failed, check the event logs for your integration. Gorgias keeps event logs for 7 days.
- From your helpdesk, click the Settings icon in the bottom-left corner.
- In the menu, locate Account, then select HTTP integration.
- Click the Manage tab, then select an existing integration from the list.
- Click the Events tab to review the latest requests sent by the integration.
- Click any request to view more details.
Turn an integration back on
Fix the cause of the failed requests first. Otherwise, Gorgias turns off the integration again after another 500 consecutive failures.
- From your helpdesk, click the Settings icon in the bottom-left corner.
- In the menu, locate Account, then select HTTP integration.
- Click the Manage tab.
- Turn on the toggle next to the integration.
You can also open the integration and click Re-activate HTTP integration. Turning an integration back on resets its failure count to 0.
FAQ
Can I use an HTTP integration to send data to a third-party app, not just receive it?
Yes. In addition to fetching customer data, you can configure an HTTP integration to send a payload to an external system whenever a ticket event fires. Set the HTTP method to `POST`, `PUT`, or `DELETE` depending on what the external API requires, and configure the request body and headers accordingly.
What's the difference between an HTTP integration and an HTTP hook in a macro?
HTTP integrations fire automatically based on ticket events. In contrast, an HTTP hook in a macro is triggered manually when an agent applies the macro to a ticket. Use HTTP integrations for ongoing, event-driven data syncs, and HTTP hook macros for on-demand, agent-initiated actions.
Can I use an HTTP integration to create or update tickets in Gorgias?
No. An HTTP integration sends requests from Gorgias to another system when a ticket event happens. It can't receive requests. To create or update tickets from another system, use the Gorgias REST API.