1. Why Use Custom Integrations?
With a custom integration, you can:- Connect your agent to any API endpoint you control or have access to.
- Extend agent capabilities to trigger workflows in other systems.
- Handle use cases not covered by predefined integrations.
2. Set Up a Custom Integration
- Open Integration Settings
- Go to Add Custom Integration in your Inya dashboard.
- Enter Basic Details
- Integration Name: Use letters, numbers, or underscores only.
- Description: Briefly explain the integration’s purpose.
- Choose API Call Method & URL
- Select the Method (e.g.,
GET
,POST
,PUT
,DELETE
). - Enter the API URL where the request should be sent.
- Select the Method (e.g.,
- Add Authentication (If Needed)
- If your API requires authentication, enter the Key and Value.
- Example:
Key: Authorization Value: Bearer <your-token>
- Save Integration
- Click Integrate to complete the setup.
3. Create a Custom API Action
- Navigate to Actions
- Go to Manage Agents → Select Agent → Action Tab.
- Create Action
- Click + to open the Create Action card.
- Fill in Details
- Name: Use only letters, numbers, or underscores.
- Description: Describe when the action should trigger.
- Example: “Send lead details to the CRM when the user shares contact info.”
- Select Integration
- Choose your custom integration from the dropdown.
- Method & URL will be pre-filled from the integration setup.
- Enable Request Components
- Based on your API method, you can turn on/off:
- Headers: For sending additional information about your API request, such as authentication or metadata.
- Example:
Key: Authorization Value: Bearer <your-token>
- Example:
- Params: For adding filters or modifying the request. You can add multiple key-value pairs.
- Example:
Key: age Value: 30
will filter by age
- Example:
- Body: Data to send in the request (usually JSON).
-
Example:
-
Example:
- Headers: For sending additional information about your API request, such as authentication or metadata.
- Based on your API method, you can turn on/off:
- Set Timout
- Define the maximum wait time (in seconds) before the request times out.
- If the server doesn’t respond in time, the request fails with a timeout error.
- Choose Trigger
- Post-Call: Executes after the conversation ends.
- If Post-Call is selected, you can:
- Add Variables (sent to the API).
- If Post-Call is selected, you can:
- On-Call: Executes during the conversation.
- If On-Call is selected, you can:
- Write a message in the Speak During Action section.
- Add Before API Call Variables (sent to the API).
- Add After API Call Variables (received from the API).
- If On-Call is selected, you can:
- Post-Call: Executes after the conversation ends.
4. Test Your Custom API Action
- Open Testing Mode
- Go to Manage Agents → Select Agent → Test.
- Start a Test Conversation
- Speak or chat with your agent.
- Trigger the Action
- Use the same instructions or keywords from your Action’s Description to activate it.
- Check API Logs
- In Inya, click More Options (⋮) on the Action card → View Logs.
- Review request/response details and confirm the API executed correctly.
- Validate in External System
- If your API triggers a process (e.g., record creation), check the connected system to confirm results.
✅ Your Custom API integration is now ready! You can now expand your agent’s abilities to virtually any API-enabled service.