In the modern business landscape, companies often operate multiple different software systems serving distinct purposes. These might include sales management software, accounting systems, marketing tools, or custom-developed internal applications. Each of these systems holds valuable data and plays a crucial role in business operations.

The biggest challenge isn't a lack of data, but rather that this data exists in isolation across various platforms. Employees have to switch between systems, manually enter the same information multiple times, and lack a comprehensive view of the customer. This not only wastes time but also increases the risk of errors and missed business opportunities.

GTG CRM's Integration Hub & API is designed to fundamentally solve this problem. Instead of requiring businesses to replace their existing systems, this solution creates bridges to connect these systems together. Data can move freely between platforms, processes are automated, and most importantly, AI Agents can participate in processing to enhance operational efficiency.

This documentation will guide you step-by-step to successfully implement integrations, from creating applications and configuring access rights, to using the API to read and write data, setting up webhooks for automatic event notifications, and finally, integrating with AI Agents to create fully automated intelligent processing workflows.

Giao diện Integration Hub

Overview of Main Features

The Integration Hub & API provides a comprehensive suite of tools that allow businesses to connect GTG CRM with any application via the standard RESTful API protocol. The API Token management system with detailed scope-based authorization ensures high security, allowing precise control over the access rights of each integrated application.

AI Agent Integration is a key differentiator, enabling businesses to leverage artificial intelligence to automate data processing and perform complex tasks without coding. Businesses can manage multiple AI Agents with different roles, each trained for specific use cases.

The bi-directional data synchronization capability between GTG CRM and external systems ensures businesses always have a unified view of customer information. A complete API documentation with curl command examples helps developers easily integrate and debug. Businesses can query contact lists, tasks, deals, and update information in real-time.

Webhook endpoints allow for automatic reception of data from external systems without continuous polling. By combining Webhooks with Automation and AI Agents, businesses can build fully automated event processing workflows. The integrated Website Builder within the ecosystem allows for direct website creation from GTG CRM with full SEO and automatic Sitemap features.

Step-by-Step Usage Guide

Step 1: Create an Integration Application

The first step to begin integration is to create a new application within GTG CRM. Navigate to the "Integration & API" menu and click the "Create New Application" button. Give your application a meaningful name for easy management later, such as "Sales System Integration" or "Mobile Application". After entering the name, click "Create" to complete.

screenshot_08-18.webp

Step 2: Configure Access Rights

The scope-based authorization system allows for precise control over what the application can do with CRM data. After creating the application, select the newly created application and navigate to the "Access Rights" or "Scopes" tab. Here you will see a list of available permissions.

If the application only needs to read contact information, select the "contacts.read" scope. If it needs to create and update contacts, add the "contacts.write" scope. To allow the application to read information about AI Agents in the system, grant the "agents.read" permission. If you want the application to be able to request AI Agents to perform tasks, the "agents.execute" permission is required. After selecting the necessary permissions, click save to update the configuration.

Cấu hình quyền truy cập

Step 3: Create an API Token

A token is an authentication key that allows external applications to securely call GTG CRM's API. On the application's detail page, find the "API Token" section and click "Create Token" or "Generate Token". The token will be displayed only once in the format starting with "gtg_". Copy and store it securely immediately. This token must be used in the Authorization header of every API request.

screenshot_1776915277225.webp

Important Note: If you add new permissions to an application after a token has been created, the old token will not automatically have these new permissions. You will need to generate a new token to have all the configured permissions.

Step 4: Test API Connection

After obtaining the token, the next step is to verify that the integration is working correctly. The simplest way is to use a curl command from the terminal. The example below demonstrates how to retrieve a list of contacts from GTG CRM.

curl -X GET https://api.gtgcrm.com/v1/integration/contacts \
  -H "Authorization: Bearer YOUR_API_TOKEN"

If the connection is successful and the token has sufficient permissions, you will receive a JSON response containing a list of contacts with full information such as ID, name, email, phone number, and other data fields.

{
  "data": [
    {
      "id": "contact_123",
      "name": "Nguyễn Văn A",
      "email": "nguyenvana@example.com",
      "phone": "0901234567"
    }
  ]
}
Kết quả trả về từ API

Step 5: Integrate with Your System

After successful testing, you can integrate the API into your actual application. Below is an example using Node.js, one of the most popular languages for backend development. This code snippet demonstrates how to get a list of contacts and create a new contact in GTG CRM.

const axios = require('axios');

const API_URL = 'https://api.gtgcrm.com/v1/integration';
const API_TOKEN = 'your_api_token_here';

async function getContacts() {
  const response = await axios.get(`${API_URL}/contacts`, {
    headers: {
      'Authorization': `Bearer ${API_TOKEN}`
    }
  });
  return response.data;
}

async function createContact(contactData) {
  const response = await axios.post(`${API_URL}/contacts`, contactData, {
    headers: {
      'Authorization': `Bearer ${API_TOKEN}`,
      'Content-Type': 'application/json'
    }
  });
  return response.data;
}

Similarly, you can use any other programming language such as Python, PHP, Java, or C# for integration. The general principle is to always send the token in the Authorization header with the format "Bearer YOUR_TOKEN" and use "application/json" as the Content-Type for POST or PUT requests.

Step 6: Utilize AI Agents in Practical Workflows

To truly see the value of the Integration Hub, let's consider a real-world business scenario. When a new customer completes registration on your company's e-commerce website, instead of an employee manually creating a profile in the CRM and sending a welcome email, the entire process can be automated.

The workflow is as follows: First, the customer fills out the registration form on the e-commerce website. The website's backend immediately calls the GTG CRM API to create a new contact with all customer information such as name, email, phone number, and customer source.

curl -X POST https://api.gtgcrm.com/v1/integration/contacts \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Trần Thị B",
    "email": "tranthib@example.com",
    "phone": "0987654321",
    "source": "Website"
  }'

As soon as the contact is created in GTG CRM, an AI Agent automatically identifies this as a new customer from the website. The Agent analyzes the customer's information to send a personalized welcome email, not a generic template. Simultaneously, the Agent creates a follow-up task for the sales representative with instructions to call within 24 hours to consult the customer.

The benefits of this automated process are clear. Customers receive a welcome email immediately after registration, creating a professional impression and increasing trust. No manual employee intervention is needed, saving time and reducing errors. Emails are personalized based on customer information, not generic content. Sales representatives are notified and have specific tasks for follow-up, ensuring no opportunity is missed. All these factors combined help increase the conversion rate from lead to actual customer.

Step 7: Set Up Webhooks to Receive Data Automatically

Webhooks are a technology that allows external systems to proactively send data to GTG CRM when an event occurs, eliminating the need for constant polling. To start, navigate to the "Integration & API" page and select the "Webhook" tab, then click "Create New Webhook" and give your webhook a meaningful name.

Tạo Webhook endpoint

After creation, the system will provide two important pieces of information. The Webhook URL is the endpoint where external systems will send data via HTTP POST. The Signing Secret is a secret code used to authenticate that the request truly comes from an authorized system and not a spoofed source.

screenshot_08-48.webp

It is crucial to note that the Signing Secret is only displayed once when the webhook is created. Copy and store it immediately in your company's secure secret management system. If this secret is lost, you will have to create a new webhook.

To test if the webhook is working correctly, send a test event using a curl command. The request must include the Content-Type header as application/json and the X-Webhook-Signature header containing the signing secret for authentication.

curl -X POST "YOUR_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Signature: YOUR_SIGNING_SECRET" \
  -d '{
    "event": "order.completed",
    "eventId": "evt_123456",
    "data": {
      "orderId": "ORD-001",
      "customerName": "Nguyễn Văn A",
      "amount": 500000
    }
  }'

If the webhook is working correctly, you will see this event appear in the list of received events.

Test Webhook thành công

Step 8: Combine Webhooks with Automation and AI Agents

The true power of the Integration Hub is fully realized when combining Webhooks with automation workflows and AI Agents. This allows businesses to build intelligent processing workflows that automatically respond to events from external systems without manual intervention.

To set up a workflow, navigate to the "Automation" menu in GTG CRM and click "Create New Workflow".

Tạo quy trình tự động mới

The most critical part is configuring the trigger so the workflow knows when to activate. Select the "External Integration" module, the "Webhook" object, and the "Receive Data" action. This means that every time the webhook receives an event from an external system, this workflow will be automatically triggered.

Cấu hình trigger Webhook

After configuring the trigger, add an AI Agent task to the workflow. Click "Add Task", select the "AI" module, then choose "AI Agent Task". This is where you will write instructions for the AI Agent on how to process the data received from the webhook.

Thêm tác vụ AI Agent vào quy trình

The prompt writing section for the AI Agent is where businesses express their business logic. For example, you could write: "When the event is order.completed, create a document noting the time the event was received and the order details. Then, send a thank you email to the customer and notify the sales team."

Prompt cho AI Agent xử lý event

After completing the configuration, change the workflow status to "Active". From now on, every time an external system sends an event to the webhook, the AI Agent will automatically perform tasks according to the instructions.

Quy trình tự động đang hoạt động

When an event is received, you can monitor the processing progress in the workflow's execution history. The AI Agent will log the processing results for the business to review and audit.

AI Agent xử lý thành công

Generated document as requested:

Document được AI tạo tự động

Real Case Study: MM3.vn Automates Marketing Content

MM3 is a company operating the website mm3.vn that has used the Integration Hub combined with AI Agents to fully automate their content creation process – from receiving market data, generating AI images, writing analytical articles, publishing to the website, to automatic social media posting and SEO. The result: reduced content staff from 2-3 to 0, with unlimited article output.

📖 Read the detailed case study about MM3.vn →

Core Benefits of Using the Integration Hub

Time savings is the most direct and noticeable benefit. Automating data synchronization between systems completely eliminates manual data entry, a task that is both time-consuming and prone to errors. Employees can focus on higher-value tasks instead of repetitive ones.

Leveraging existing infrastructure is a significant advantage for businesses that have invested in software systems. Instead of replacing all existing technology, businesses can simply connect GTG CRM to add AI and automation capabilities. This minimizes the risk of business operation disruption and protects existing technology investments.

Increased sales efficiency thanks to AI Agents that can handle customer service twenty-four/seven without rest. Every opportunity is monitored and processed promptly, ensuring no leads are missed due to staff being busy or outside of work hours.

Flexible expansion is a strength of API architecture. Businesses can easily add new features or connect with more systems as business needs grow. Not locked into a rigid platform, businesses can adapt and scale at their own pace.

Security control is ensured through a detailed access management system with scopes and tokens. Businesses can grant precise permissions to each integrated application, ensuring sensitive data is only accessed by authorized systems.

Bi-directional webhooks extend integration capabilities far beyond traditional API solutions. Businesses can not only proactively call APIs when needed but also receive data automatically from external systems in real-time.

Content automation is a unique capability of GTG CRM. When combining Webhooks with Automation and AI Agents, businesses can automatically generate articles, images, and social media posts from raw data. This is particularly useful for businesses in the content or marketing sectors.

Automatic SEO through the integrated Website Builder with Sitemap and Google Search Console ensures all new content is quickly discovered and indexed by search engines, driving organic traffic to the business.

Important Notes on Implementation

Token security is the top priority. API tokens grant access to critical business data, so they should never be shared with outsiders or committed to source code. Tokens should be stored in environment variables or a dedicated secret management system. If you suspect a token has been compromised, revoke it and generate a new one immediately.

Refreshing tokens when changing permissions is a mandatory rule. Every time a new scope is added to an application, the current token will not automatically have this new permission. Businesses must generate a new token so the new token includes all configured permissions. Forgetting this step often leads to difficult-to-debug "Permission Denied" errors.

Webhook security through the signing secret is similar to token security. This secret is only displayed once when the webhook is created, so it must be stored immediately. The external system sending events needs to include this secret in the header for GTG CRM to authenticate the request's validity.

Rate limiting is a mechanism to protect systems from overload. APIs have limits on the number of requests within a certain time frame. Integrated applications need to implement retry logic with exponential backoff and avoid making excessive API calls in a short period. If the rate limit is exceeded, requests will be rejected with an HTTP status code 429.

Validating data before sending it to the API helps prevent unnecessary errors. Check email formats, string lengths, and other data constraints on the client-side before calling the API. This helps save API quota and improves user experience.

Monitoring and logging are essential for early detection of integration issues. Monitor logs and automation execution history to ensure webhooks are receiving data correctly, AI Agents are processing as expected, and no errors are overlooked. GTG CRM provides a monitoring dashboard for businesses to track integration status.

AI Agent prompts need to be clear and specific. The more detailed the instructions on how to handle each type of event, the more accurate the AI's processing results will be. Instead of writing "process event," write "when the event is order.completed, create a document noting the time and order details, then send a thank you email to the customer with template A, and finally create a task for the sales team with a 24-hour deadline."

Conclusion

GTG CRM's Integration Hub & API is a comprehensive integration solution that helps businesses connect their existing systems with modern AI technology without requiring a complete overhaul of their technology infrastructure. Through detailed instructions from creating applications, configuring permissions, setting up webhooks, to integrating with AI Agents, businesses can build intelligent automation workflows and significantly save operational resources.

The real-world case study of MM3 clearly demonstrates the potential of this solution, not only in automating simple tasks but also in building an entire value chain from raw data to published content and automatic SEO. The key is that this solution does not require deep programming knowledge or a large technical team, but rather basic understanding of APIs and the ability to write natural language instructions for AI Agents.

With a detailed authorization system, multi-layered security, and flexible scalability, the Integration Hub is suitable for businesses of all sizes, from startups to large enterprises. Businesses can start with simple integrations such as contact list synchronization, then gradually expand to more complex workflows like content automation, automated customer service, or payment processing and invoice generation.

The recommendation for businesses new to this is to follow the steps, test thoroughly at each stage, and take advantage of GTG CRM's free trial to familiarize themselves with the system before official deployment. Start with a simple webhook test to understand how it works, then gradually upgrade to more complex tasks as experience is gained.

The GTG CRM support team is always available to provide detailed consultations on integration solutions tailored to the specific business characteristics and current technology infrastructure of each company. Do not hesitate to contact them for assistance during the implementation and optimization of your integration processes.