How to Integrate with Make
Learn how to use the SnackPrompt AI Engine API to build powerful automations and AI-powered scenarios in Make (formerly Integromat).
Overview
Make offers several ways to integrate external APIs into your automations:
HTTP Module
Direct API calls
Make HTTP requests to any API
Webhooks
Receive data
Trigger scenarios when external events occur
JSON Module
Data processing
Parse and create JSON structures
OpenAI/AI Modules
AI integration
Combine with AI models for intelligent workflows
Integration Architecture
┌─────────────────────────────────────────────────────────┐
│ Make │
│ ┌─────────────┐ ┌─────────────┐ ┌────────────┐ │
│ │ Trigger │───▶│ HTTP Module │───▶│ Action │ │
│ └─────────────┘ └──────┬──────┘ └────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ Router │ │
│ │ (optional) │ │
│ └──────┬──────┘ │
└────────────────────────────┼────────────────────────────┘
│
▼
┌──────────────────────────────┐
│ SnackPrompt AI Engine API │
│ /v1/kb/search or /v1/kb/chat│
└──────────────────────────────┘Method 1: HTTP Module (Recommended)
Use the HTTP > Make a request module to call the SnackPrompt AI Engine API directly.
Step 1: Create a New Scenario
Go to make.com and click Create a new scenario
Choose your trigger module (e.g., Webhook, Email, Schedule)
Step 2: Add HTTP Module
Click + to add a new module
Search for HTTP
Select Make a request
Step 3: Configure the Request
For Search Endpoint:
URL
https://api-integrations.snackprompt.com/v1/kb/search
Method
POST
Body type
Raw
Content type
JSON (application/json)
Headers:
x-api-key
YOUR_API_KEY
Request content (JSON):
Replace {{1.query}} with the appropriate variable from your trigger module.
Step 4: Parse the Response
Check Parse response to automatically parse the JSON response into usable variables.
Step 5: Use the Results
The API returns a list of relevant documents in items[]. You can use them in subsequent modules:
{{2.items[].payload.original_text}}- The document content{{2.items[].score}}- Relevance score{{2.items[].payload.snack_item_id}}- Document ID
Method 2: Webhooks (Receive Requests)
Use when you want to receive requests and respond with knowledge base information.
Step 1: Create Webhook Trigger
Create a new scenario
Add Webhooks > Custom webhook as the trigger
Click Add to create a new webhook
Copy the webhook URL provided
Step 2: Add HTTP Module
Configure as shown in Method 1, using the webhook data:
Request content:
Step 3: Return Response
Add Webhooks > Webhook response module at the end:
Status
200
Body
{{2.body}} or formatted response
Custom headers
Content-Type: application/json
Method 3: Chat Endpoint for Complete Responses
Use the /v1/kb/chat endpoint when you want the API to handle all the RAG and return a ready response.
Configuration
URL
https://api-integrations.snackprompt.com/v1/kb/chat
Method
POST
Body type
Raw
Content type
JSON (application/json)
Headers:
x-api-key
YOUR_API_KEY
Request content:
Response
The API returns:
answer: AI-generated response ready to usesources: Sources used to generate the response
Access with {{2.answer}} and {{2.sources}}.
Method 4: With AI Modules (RAG Pipeline)
Combine the search API with Make's AI modules for custom RAG workflows.
RAG Scenario Structure
Step 1: Search for Context
Use HTTP module to call /v1/kb/search as shown in Method 1.
Step 2: Format Context with Iterator + Aggregator
Add Iterator module:
Array:
{{2.items}}
Add Text Aggregator module:
Source module: Iterator
Text:
[{{3.i}}] {{3.payload.original_text}}Row separator:
\n\n
Step 3: Generate Response with OpenAI
Add OpenAI > Create a Completion module:
Model
gpt-4 or gpt-3.5-turbo
Messages
System + User messages
System Message:
User Message:
Practical Use Cases
1. Support Chatbot
Simple chatbot that answers questions using your knowledge base.
2. Email Auto-Responder
Automatically respond to customer emails with relevant information.
3. Slack Integration
Answer questions posted in a Slack channel.
4. Multi-Source RAG with Router
Route queries to different knowledge bases based on topic.
5. Scheduled Knowledge Digest
Generate weekly reports from your knowledge base.
6. Form Response with Fallback
Configuration Tips
1. Store Credentials Securely
Use Make's Connections or Data Stores for API keys:
Go to Connections in the left menu
Create a new HTTP Basic Auth or API Key connection
Use the connection in your HTTP modules
2. Use Variables and Data Stores
Store tenant_id and other config in a Data Store:
3. Handle Errors with Error Handler
Right-click the HTTP module and add an Error Handler:
4. Limit Results for Efficiency
Start with fewer results:
5. Use Filters for Context
Direct searches with tags:
6. Enable Parse Response
Always check Parse response in the HTTP module to easily access response fields.
Complete Example: Customer Support Automation
Scenario Overview
Customer submits question via form
Scenario searches knowledge base
If answer found, sends automated reply
If not found, creates support ticket
Step-by-Step Setup
Module 1: Typeform - Watch Responses
Connection: Your Typeform account
Form: Select your support form
Module 2: HTTP - Make a request
URL:
https://api-integrations.snackprompt.com/v1/kb/chatMethod:
POSTHeaders:
x-api-key: YOUR_API_KEYBody type:
RawContent type:
JSON (application/json)Request content:
Parse response:
Yes
Module 3: Router
Route 1:
{{length(2.sources)}} > 0(has results)Route 2:
{{length(2.sources)}} = 0(no results)
Module 4A: Gmail - Send an Email (Route 1)
To:
{{1.answers[email].email}}Subject:
Re: Your questionContent:
{{2.answer}}
Module 4B: Zendesk - Create Ticket (Route 2)
Subject:
Support Request: {{1.answers[subject].text}}Description:
{{1.answers[question].text}}
Working with Arrays
Iterating Over Results
Use Iterator to process each result:
Inside the iterator, access:
{{3.payload.original_text}}{{3.score}}{{3.payload.snack_item_id}}
Aggregating Results
Use Text Aggregator to combine results:
Source module
Iterator
Text
- {{3.payload.original_text}}
Row separator
\n
Result: A formatted list of all documents.
Array Functions
Useful functions for working with results:
first()
{{first(2.items)}}
Get first result
last()
{{last(2.items)}}
Get last result
length()
{{length(2.items)}}
Count results
slice()
{{slice(2.items; 0; 3)}}
Get first 3 results
Troubleshooting
Error: "tenant_id is required"
Make sure tenant_id is inside the filters object:
Error: "Invalid JSON"
Verify JSON syntax in the request content
Check for unescaped special characters in variables
Use the JSON > Create JSON module to build complex payloads safely
Empty Response / No Items
Verify your
tenant_idis correctCheck if the query matches content in your knowledge base
Remove
tag_namesfilter to search all contentIncrease the
limitparameter
Cannot Access Response Fields
Ensure Parse response is checked
Verify the response structure by checking execution history
Use
{{2.body}}to see the raw response
Rate Limiting (429 Error)
Add a Sleep module between API calls
Use Make's built-in Rate limiting in scenario settings
Consider using Queue for high-volume scenarios
Timeout Errors
Increase the Timeout setting in the HTTP module
Check if your query is too complex
Reduce the
limitparameter
Advanced Patterns
Caching with Data Stores
Cache frequent queries to reduce API calls:
Retry Pattern
Automatic retry on failure:
Batch Processing
Process multiple queries efficiently:
Related
External Resources
Last updated