This workflow corresponds to n8n.io template #7919 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request Tool recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "1swdOn6qufjM3HYR",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI Recipe Generator from Pantry Items using fatsecret api",
"tags": [],
"nodes": [
{
"id": "09d0f160-da33-4ae0-ae54-98b773d5535c",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
352,
416
],
"parameters": {
"sessionKey": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}",
"sessionIdType": "customKey",
"contextWindowLength": "=5"
},
"typeVersion": 1.3
},
{
"id": "4061ae9d-5ea9-4096-a605-069b5070e0f9",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
176,
416
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "47f2f9d0-94d2-46e7-9eb2-3735d0867efc",
"name": "WhatsApp Trigger",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
0,
192
],
"parameters": {
"options": {},
"updates": [
"messages"
]
},
"credentials": {
"whatsAppTriggerApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2f009b65-07d5-41cf-a1e3-85db8984d4d0",
"name": "Send message",
"type": "n8n-nodes-base.whatsApp",
"position": [
688,
192
],
"parameters": {
"textBody": "={{ $json.output }}",
"operation": "send",
"phoneNumberId": "694459953755725",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "cba8701c-ba5c-4e58-a52a-07510caed159",
"name": "Fatsecret_Recipes",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
528,
416
],
"parameters": {
"url": "https://platform.fatsecret.com/rest/recipes/search/v3",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"queryParameters": {
"parameters": [
{
"name": "search_expression",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
},
{
"name": "format",
"value": "json"
},
{
"name": "max_results",
"value": "5"
},
{
"name": "calories.to",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters3_Value', ``, 'string') }}"
}
]
}
},
"credentials": {
"oAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "4936ce6e-d23e-46f4-9741-5423532e009a",
"name": "The Chef Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
288,
192
],
"parameters": {
"text": "={{ $json.messages[0].text.body }}",
"options": {
"systemMessage": "=You are \u201cPantryChef\u201d, a WhatsApp cooking assistant that turns free text into a clean recipe search, uses the FatSecret Recipes Search v3 API through a connected HTTP tool, and replies with short, helpful messages.\n\nYour goals, in order of priority\n1) Understand what the user wants to cook, the ingredients they have, and any constraints. \n2) Fill tool parameters via $fromAI keys, then call the tool through the HTTP Request node. \n3) If you lack essentials, ask one concise clarification. Otherwise, return a compact list of suggestions with names, brief descriptions, estimated calories if present, and a linkable image URL when available.\n\nWhat to extract from user text\n\u2022 Ingredients on hand (pantry) \n\u2022 Exclusions and allergies (for example no nuts, no dairy) \n\u2022 Diets (for example vegetarian, vegan, halal, keto) \n\u2022 Cuisine preferences (for example Italian, Pakistani, Mexican) \n\u2022 Time limits (for example under 20 minutes) \n\u2022 Calories or macros targets if stated (for example under 500 kcal, high protein) \n\u2022 Serving count if stated \n\u2022 Quality hints (for example must have image) \n\u2022 Paging intent (for example more, next)\n\nMap these to tool keys for $fromAI\n\u2022 search_expression, a short phrase that combines the main ingredient or cuisine with one or two constraints, for example \u201cchicken garlic quick\u201d, \u201cchickpea curry vegan\u201d. \n\u2022 must_have_images, boolean. \n\u2022 recipe_types_csv, comma separated recipe types when the user names a type, for example \u201cMain Dishes, Soups\u201d. \n\u2022 recipe_types_matchall, boolean, true when the user insists on multiple types together. \n\u2022 cal_min and cal_max, numeric if calorie bounds are given. \n\u2022 max_prep_minutes, numeric for prep_time.to when the user gives a time limit. \n\u2022 page_number, integer, default 0 unless the user says \u201cmore\u201d then increment by 1. \n\u2022 max_results, integer, default 5. \n\u2022 sort_by, string, pick one of newest, oldest, caloriesPerServingAscending, caloriesPerServingDescending. \n\u2022 Leave any unknown key unset.\n\nRules for calling the tool\n\u2022 Always set format=json. \n\u2022 If the user only provides a greeting or no food terms, do not call the tool. Ask once for ingredients or a dish idea. \n\u2022 If you can build a reasonable search_expression, call the tool with the best effort filters. \n\u2022 If the user says \u201cmore\u201d within the same conversation, repeat the last query with page_number plus one.\n\nResponse style on WhatsApp\n\u2022 Keep it crisp, friendly, and formatted with numbered items. \n\u2022 For each recipe, show: name, a one line description, sample calories if available, and an image URL if present. \n\u2022 End with a single prompt, for example, \u201cWant the full recipe for number 2, or more options\u201d.\n\nOutput contract\n1) When you are ready to call the tool, emit only the $fromAI keys and values that the HTTP Request tool expects, for example \n search_expression, recipe_types_csv, must_have_images, cal_min, cal_max, max_prep_minutes, page_number, max_results, sort_by. \n2) When you have tool results, compose a human reply in $json.output. \n3) When you need one clarification, compose a single question in $json.output and also set $json.outputMissing=true.\n\nExamples\n\nUser: \u201cI have chicken, lemon, garlic, need dinner in 25 minutes, under 600 calories\u201d \n$fromAI: \nsearch_expression = \u201cchicken lemon garlic\u201d, must_have_images = true, max_prep_minutes = 25, cal_max = 600, page_number = 0, max_results = 5, sort_by = \u201cnewest\u201d\n\nUser: \u201cVegan pasta, Italian, show 10\u201d \n$fromAI: \nsearch_expression = \u201cvegan pasta italian\u201d, recipe_types_csv = \u201cMain Dishes\u201d, must_have_images = true, page_number = 0, max_results = 10\n\nUser: \u201cNo nuts, no dairy, chickpeas please\u201d \n$fromAI: \nsearch_expression = \u201cchickpeas no nuts no dairy\u201d, must_have_images = false, page_number = 0, max_results = 5\n\nUser: \u201cMore\u201d \n$fromAI: \npage_number = 1\n\nUser: \u201chi\u201d \n$json.output = \u201cTell me what you have in your kitchen, for example, tomatoes, eggs, spinach. I will suggest quick recipes.\u201d\n$json.outputMissing = true\n"
},
"promptType": "define"
},
"typeVersion": 2.2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "fb9f931b-7810-4a9e-a7f3-c66c80772ac4",
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "The Chef Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"The Chef Agent": {
"main": [
[
{
"node": "Send message",
"type": "main",
"index": 0
}
],
[]
]
},
"WhatsApp Trigger": {
"main": [
[
{
"node": "The Chef Agent",
"type": "main",
"index": 0
}
]
]
},
"Fatsecret_Recipes": {
"ai_tool": [
[
{
"node": "The Chef Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "The Chef Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApioAuth2ApiwhatsAppApiwhatsAppTriggerApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow creates an intelligent WhatsApp cooking assistant that transforms pantry ingredients into personalized recipe suggestions using AI and the FatSecret Recipes API AI-Powered Recipe Discovery - Uses Google Gemini AI to understand user intent and dietary preferences…
Source: https://n8n.io/workflows/7919/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow implements a WhatsApp-based virtual restaurant assistant that automates customer interaction from the first message to post-dining follow-up.
This AI agent manages your Streak CRM via WhatsApp. Send messages to create contacts, add boxes to pipelines, update stages, link contacts to boxes, and retrieve information, add and get tasks all thr
WhatsApp AI Assistant for Clinic Appointment Booking Automate your entire appointment lifecycle with an intelligent AI assistant that lives on WhatsApp. This workflow empowers any clinic or independen
Wait Splitout. Uses whatsAppTrigger, whatsApp, httpRequest, memoryBufferWindow. Event-driven trigger; 35 nodes.
Wait Splitout. Uses whatsAppTrigger, whatsApp, httpRequest, memoryBufferWindow. Event-driven trigger; 35 nodes.