AI Connector
The AI Connector message source enables ThinkAutomation to act as a Model Context Protocol (MCP) server. This allows external AI providers such as ChatGPT to securely execute automations on demand, allowing the AI to request context information for specific items when it needs it, or perform custom workflow actions (such as creating a support ticket).
For example, if a user asks “What is the balance for invoice 5678?”, a Get Invoice automation can be executed with “5678” already extracted. The automation retrieves the invoice details and returns it to the AI as structured context, ready to be used in the reply.
Within a ThinkAutomation solution, you can create one or more AI Connector message sources. Each solution exposes an MCP endpoint URL, through which external AI clients can automatically discover available tools. When an MCP request is received, ThinkAutomation finds the relevant message source and executes the automation. The automation return value is returned to the AI for use as context. This allows ThinkAutomation to serve as a bridge between your business data and AI assistants, making your automations directly callable and dynamic context seamlessly retrievable.
You would typically create a ThinkAutomation Solution with a Web Chat message source for conversing with an AI and a local knowledge store, along with multiple AI Connector message sources within the same solution for handling specific context requests or performing specific actions.
Tool Name And Description
Enter the tool Name. This must be unique for all AI Connector message sources within a solution. For example: 'policydocument', 'getinvoice' or 'serviceStatus'.
The Description should be a clear instruction to the AI on how it should use this tool. The description is important as it tells the AI when to make a call to this message source.
For example:
Use this tool whenever the user asks about invoices. 
Always use this tool before answering invoices related questions.
Parameters
One or more parameters can be defined. Each parameter has a Name, Type and Description. When a user asks the AI a question and the AI has decided it needs to call this tool, the parameter values will be automatically obtained by the AI and will be available in your automation.
Example: Looking Up Specific Information
For example, we could create an AI Connector message source for looking up invoice details:
- Name: GetInvoice
- Description: Use this tool whenever the user asks about a specific invoice.
- Parameters: Name: InvoiceNumber, Type: String, Description: The invoice number to lookup.
When a user asks the AI a question such as 'What is the balance for invoice 5678'. The '5678' value will be passed to your automation - ready for you to obtain the data and return it.
Example: Executing Actions
Tools can also be used to perform actions, not just return context. For example, we could create an AI Connector message source to send emails:
- Name: SendEmail
- Description: Use this tool if the user asks to send an email.
- Parameters:
| Name | Type | Description | 
|---|---|---|
| ToAddress | String | The email address to send the email to. | 
| Subject | String | The subject text. | 
| Body | String | The body text. | 
If the user asked 'Can you send an email' or 'Send an email to xxx' - the AI will ask for the subject and body if it doesn't already have it. These values will then be passed to your automation. The automation can then send the email and return 'Email sent successfully' back to the AI.
When you create a new AI Connector Message Source, the New Message Source wizard will ask you if you want to create a new default automation. If this option is enabled, a new Automation will be automatically created with the relevant Extract Field actions to extract the tool parameter values. You would then edit the automation to perform data lookups. The Return Value for the automation should be set to the context information you want to return to the AI.
Returning Context
The automation that executes when the AI Connector message source is called by the AI can return any value. Whatever value is returned by your automation will be used by the AI as context, to help it answer the user's question.
For example: The 'GetInvoice' AI Connector automation could look on the local file system for an invoice PDF file for the supplied invoice number. If it exists it could return the invoice content, otherwise it could return a 'Not found' message.
You should always return something. Even if your automation is performing an action only (such as sending an email, updating a database, creating a support ticket etc.) - it should return a 'Successfully updated' message - so that the AI can respond to the user.
Returning Document Files
If the Return value is a file path and the file is a document that can be converted to text (PDF, Word, Excel, OpenDoc, txt, Markdown etc.), then ThinkAutomation will automatically convert the document to text and return the text content.
Returning Images
If the Return value is an image file path, then the image will be converted to base64 and sent back to the AI in a format that the AI recognizes as an image.
Endpoints
The Local MCP URL and Public MCP URL URLs are shown should you need to manually add a connector (for example, if using the ChatGPT desktop app). If you use the Ask AI automation action on any automations within the same solution, then the public URL will be provided to the AI automatically (currently for OpenAI provider only). When using on-premises OptimaGPT, then the local URL will be automatically provided.
How It Works
When you use the Ask AI automation action, on any automations within the same solution (for example, if you create a Web Chat message source/automation), ThinkAutomation will automatically include the public MCP URL with the AI request. The AI then knows what tools it has available. When a user asks a question, it may choose to call one of the AI Connector message sources. At this point the automation attached to the chosen AI Connector message source will be executed. The return value for this automation will then be sent back to the AI for it to use as context.