Skip to main content
Setting up the AI Integrations

How to connect Planhat to your choice of AI provider

Carly Hammond avatar
Written by Carly Hammond
Updated over a month ago

Summary

  • Planhat has Integrations for OpenAI, Microsoft Azure OpenAI Service, and Google PaLM 2

  • You can use your choice of Integration to link Planhat to your own AI account, entering an API token from your AI provider into Planhat

  • You then use Planhat Automations to send prompts to your Generative AI provider (by making API calls), receive the responses and carry out actions in Planhat

Who is this article for?

  • Planhat users who are setting up an AI integration (e.g. Tech/Ops)

Article contents


Introduction

This is a technical deep-dive article

Read on if you're an Admin / CS Ops / Tech Specialist etc. will be connecting your AI account to Planhat.

If instead you'd like an overview of AI in Planhat, including the full range of features, use cases and security considerations, please refer to our main article for a summary.

While Planhat includes the native AI features "Writing Assistant" and "Account Summary", which work via Planhat's connection to Azure OpenAI Service, with Planhat's AI Integrations it's also possible for you to connect Planhat to your choice of AI provider (OpenAI, Microsoft Azure OpenAI Service, or Google PaLM 2), via your own business license.

Rather than having to choose from pre-set prompts and actions, using Planhat Automations you have free rein to prompt your choice of AI connection how you wish, potentially referring to both public data the LLM has been trained on, and your own Planhat data, and then you can decide what happens to the response in Planhat, e.g. whether it's saved as a specific custom Conversation Type or sent as a notification.

This is incredibly flexible! Check out the use case examples in our "AI in Planhat" overview article to give you some inspiration.

The setup process in Planhat has two main parts:

  1. You connect up your chosen Integration using your credentials from the relevant AI provider

  2. Then, you set up Automations using your AI connection

This article covers step 1 of the process.

Security considerations

Using your choice of AI Integration has the advantage that the AI account is yours - your choice of AI provider, and your connection. This means you have control over it, as opposed to using Planhat's connection to an AI provider. You can conduct your own internal security review, and choose the AI provider (LLM) that best meets your needs, and then connect your account to Planhat. If you have any questions about data location and AI training etc., those would be answered by your AI provider.

Once you set up the connection in a Planhat AI Integration, Planhat then has access to the AI provider, and can send your choice of prompts to it via its API. Your AI provider does not have access to Planhat data and can't request data from Planhat, although you can fetch any Planhat data within a Planhat Automation and then include it in a prompt to your AI provider.


How to set up an AI Integration

πŸ“Œ Important to note

The AI Integrations look very similar to the form you will see to complete when creating a custom Integration, except that the relevant information is automatically filled in for you for the relevant AI provider. This means that although the AI Integration forms have lots of components and may - on initial look - seem a little complicated, there's actually very little for you to configure here, as most of it you can just ignore, so the setup process is simpler than you might have initially thought. We'll take you through the instructions below.

  1. Go to the Operations Module (star-like symbol with 3 spokes, at the bottom of the black bar on the left) ...

    • ... make sure you are in the "INTEGRATE" tab at the top ...

    • ... and then navigate to the relevant Integration.

      • πŸš€ Tip: You can find the Integration more quickly by clicking on the "AI" category on the left (shown below), or using the search box at the top.

  2. Follow the instructions for your specific provider/Integration below:

    If you're setting up the OpenAI Integration, enter the "organization ID", which you can find in OpenAI, into the box shown annotated below:

    If you're setting up the Azure OpenAI Service Integration:

    • In the "API Base URL with Base Path:" box, you will see https://[[resourceName]].openai.azure.com/

      • Enter your own "resourceName" in place of [[resourceName]] - so you will end up with a URL of the format https://myopenairesource.openai.azure.com/

      • The "resourceName" is the name of the specific Azure OpenAI resource that you've created in your Azure portal. It uniquely identifies your instance of the OpenAI Service in Azure.

      • To find the resourceName, go to the Azure portal, navigate to your OpenAI resource, and use the name assigned to that resource.

    • You don't need to enter anything in the "Auth Headers" section of the Integration. You will see values for "api-key" and "Content-Type" prefilled for you; leave these as-is.

    If you're setting up the PaLM 2 Integration, you won't see anything prefilled here, and you don't need to add anything.

    πŸ“Œ Note:

    • Other than for Azure (see instructions above), you can ignore "API Base URL with Base Path:" - this is automatically pre-filled for you.

    • You do not need to click the blue "Add" button by "Auth Headers".

    • You can also ignore the blue "Use <<connection>> to access the token" statement.

    • The reason these elements are present is that they are part of the general connection form when setting up a custom Integration, but they are not relevant when you are setting up a standard AI Integration.

  3. Next, click on the "Authenticate Now" button (blue button with symbol of plug and socket).

  4. You'll see a modal entitled "Set up basic auth", as shown below. In the "API Token" box, enter your API token, which you can find/generate in your AI provider. Then click the "Set up" button.

  5. That's it! You'll notice that the blue "Authentication" text next to the plug/socket button turns green and shows a checkmark (tick).

    Just leave everything else as-is - e.g. leave the toggle switch(es) under the "Endpoints" section (in the bottom left) turned on.

    • These endpoints will be selected when you set up your Automations.

    • "Prompt" is the main endpoint you will be using in your Automations in the vast majority of cases (and it's the only option for PaLM 2). This is used for one-time input without maintaining an interactive conversation flow.

    • "Chat" is for multi-turn interactions, maintaining context over several exchanges.


Next steps - Automations

Once you've connected your AI account to Planhat, initially you'll see the message:

"No related Actions found. Go to the Automate Tab to create an automation using this connection."

Click the image to view it enlarged

In order to use your AI connection, you'll need to set up Automations, which you also do in the Operations Module, but in the "AUTOMATE" tab rather than the "INTEGRATE" tab.

As a quick overview, your Automation will include:

  1. The trigger - the change in data in Planhat (or schedule) that prompts the Automation to run

  2. The prompt that Planhat sends to your AI provider (OpenAI, Azure or PaLM 2)

  3. The action(s) you want to happen when Planhat receives the response back

Note that this is a simplification. For example, your Automation may contain additional steps, such as gathering information from Planhat before using it in the prompt sent to your AI provider.

You can learn about Automations in our article series here. A specific article on AI Automations will be available in future.

When you've set up Automations using your AI connection, you will see them listed in the right-hand panel of the integration, similar to this:

Click the image to view it enlarged

You can click into each of these Automation titles to open up the Automation.


Further reading

  • Once you've connected your AI Integration, as described in this article, the next stage is to set up Automations using it - to learn more, see here. A specific article on AI Automations will be available in future.

  • To read an overview of all of Planhat's different AI features - AI Integrations, built-in native AI features, and functionality that uses Machine Learning (ML) - with information on use cases and security, see here.

Did this answer your question?