feat: add folder support for workflows (fixes #70)

This commit is contained in:
Praveen Mudalgeri
2025-08-05 09:40:47 +05:30
parent 307d530f9b
commit c4885eee92
2057 changed files with 985290 additions and 974268 deletions

View File

@@ -0,0 +1,112 @@
{
"\"nodes\"": "[",
"\"id\"": "\"vBLHyjEnMK9EaWwQ\",",
"\"name\"": "\"Mark OpenAi \"",
"\"type\"": "\"main\",",
"\"position\"": "[",
"\"parameters\"": "[",
"\"options\"": "{},",
"\"credentials\"": "{",
"\"openAiApi\"": "{",
"\"typeVersion\"": "4.2",
"\"text\"": "\"={{ $('When chat message received').item.json.chatInput }}\",",
"\"agent\"": "\"openAiFunctionsAgent\",",
"\"maxIterations\"": "10,",
"\"systemMessage\"": "\"You are Airtable assistant. \\nYou need to process user's requests and run relevant tools for that. \\n\\nPlan and execute in right order runs of tools to get data for user's request.\\n\\nFeel free to ask questions before do actions - especially if you noticed some inconcistency in user requests that might be error/misspelling. \\n\\nIMPORTANT Always check right table and base ids before doing queries.\\n\\nIMPORTANT Use Code function to do aggregation functions that requires math like - count, sum, average and etc. Aggegation function could be recognized by words like \\\"how many\\\",\\\"count\\\",\\\"what number\\\" and etc.\\nUse Code function to generate graph and images.\\n\\nIMPORTANT If search with filter failed - try to fetch records without filter\\n\\nIMPORTANT Ask yourself before answering - am I did everything is possible? Is the answer is right? Is the answer related to user request?\\n\\nIMPORTANT Always return in response name of Base and Table where records from. \"",
"\"promptType\"": "\"define\"",
"\"height\"": "346,",
"\"content\"": "\"### Set up steps\\n\\n1. **Separate workflows**:\\n\\t- Create additional workflow and move there Workflow 2.\\n\\n2. **Replace credentials**:\\n\\t- Replace connections and credentials in all nodes.\\n\\n3. **Start chat**:\\n\\t- Ask questions and don't forget to mention required base name.\"",
"\"sessionKey\"": "\"={{ $('When chat message received').item.json.sessionId }}\",",
"\"sessionIdType\"": "\"customKey\"",
"\"webhookId\"": "\"abf9ab75-eaca-4b91-b3ba-c0f83d3daba4\",",
"\"assignments\"": "[",
"\"value\"": "\"assistants=v2\"",
"\"rules\"": "{",
"\"values\"": "[",
"\"outputKey\"": "\"code\",",
"\"conditions\"": "[",
"\"version\"": "2,",
"\"leftValue\"": "\"={{ $('Execute Workflow Trigger').item.json.query.filter_desc }}\",",
"\"caseSensitive\"": "true,",
"\"typeValidation\"": "\"strict\"",
"\"combinator\"": "\"and\",",
"\"operator\"": "{",
"\"operation\"": "\"notExists\",",
"\"rightValue\"": "\"\"",
"\"renameOutput\"": "true",
"\"aggregate\"": "\"aggregateAllItemData\"",
"\"mergeLists\"": "true",
"\"fieldsToAggregate\"": "{",
"\"fieldToAggregate\"": "\"records\"",
"\"singleValue\"": "true",
"\"includeOtherFields\"": "true",
"\"width\"": "280,",
"\"color\"": "7,",
"\"fields\"": "{",
"\"stringValue\"": "\"get_base_tables_schema\"",
"\"schemaType\"": "\"manual\",",
"\"workflowId\"": "{",
"\"__rl\"": "true,",
"\"mode\"": "\"id\",",
"\"cachedResultName\"": "\"Airtable Agent Tools\"",
"\"description\"": "\"Fetches the schema of tables in a specific base by id.\\n\\nInput:\\nbase_id: appHwXgLVrBujox4J\\n\\nOutput:\\ntable 1: field 1 - type string, fields 2 - type number\",",
"\"inputSchema\"": "\"{\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"base_id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"ID of the base to retrieve the schema for. Format - appHwXgLVrBujox4J\\\"\\n }\\n },\\n \\\"required\\\": [\\\"base_id\\\"]\\n}\",",
"\"specifyInputSchema\"": "true",
"\"jsCode\"": "\"// Example: convert the incoming query to uppercase and return it\\n\\nreturn `https://api.mapbox.com/styles/v1/mapbox/streets-v12/static/${query.markers}/-96.9749,41.8219,3.31,0/800x500?before_layer=admin-0-boundary&access_token=<your_public_key>`;\",",
"\"resource\"": "\"base\",",
"\"airtableTokenApi\"": "{",
"\"base\"": "{",
"\"onError\"": "\"continueRegularOutput\",",
"\"url\"": "\"https://api.openai.com/v1/threads\",",
"\"method\"": "\"POST\",",
"\"pagination\"": "{",
"\"completeExpression\"": "\"={{ $response.body.offset==undefined}}\",",
"\"paginationCompleteWhen\"": "\"other\"",
"\"jsonBody\"": "\"={\\n \\\"model\\\": \\\"gpt-4o-mini\\\",\\n \\\"messages\\\": [\\n {\\n \\\"role\\\": \\\"system\\\",\\n \\\"content\\\": {{ JSON.stringify($('Set schema and prompt').item.json.prompt) }}\\n },\\n {\\n \\\"role\\\": \\\"user\\\",\\n \\\"content\\\": \\\"{{ $('Execute Workflow Trigger').item.json.query.filter_desc }}\\\"\\n }],\\n \\\"response_format\\\":{ \\\"type\\\": \\\"json_schema\\\", \\\"json_schema\\\": {{ $('Set schema and prompt').item.json.schema }}\\n\\n }\\n }\",",
"\"sendBody\"": "true,",
"\"specifyBody\"": "\"json\",",
"\"authentication\"": "\"predefinedCredentialType\",",
"\"nodeCredentialType\"": "\"openAiApi\"",
"\"httpQueryAuth\"": "{",
"\"contentType\"": "\"multipart-form-data\",",
"\"bodyParameters\"": "{",
"\"parameterType\"": "\"formBinaryData\",",
"\"inputDataFieldName\"": "\"data\"",
"\"sendHeaders\"": "true,",
"\"headerParameters\"": "{",
"\"pinData\"": "{},",
"\"connections\"": "{",
"\"If1\"": "{",
"\"main\"": "[",
"\"node\"": "\"Merge\",",
"\"index\"": "1",
"\"Merge\"": "{",
"\"Switch\"": "{",
"\"Aggregate\"": "{",
"\"Get Bases\"": "{",
"\"Aggregate1\"": "{",
"\"Aggregate2\"": "{",
"\"Search records\"": "{",
"\"ai_tool\"": "[",
"\"Get base schema\"": "{",
"\"Create map image\"": "{",
"\"Get list of bases\"": "{",
"\"OpenAI Chat Model\"": "{",
"\"ai_languageModel\"": "[",
"\"Window Buffer Memory\"": "{",
"\"ai_memory\"": "[",
"\"OpenAI - Get messages\"": "{",
"\"OpenAI - Send message\"": "{",
"\"Set schema and prompt\"": "{",
"\"Get Base/Tables schema\"": "{",
"\"OpenAI - Create thread\"": "{",
"\"OpenAI - Download File\"": "{",
"\"OpenAI - Run assistant\"": "{",
"\"Process data with code\"": "{",
"\"Upload file to get link\"": "{",
"\"Execute Workflow Trigger\"": "{",
"\"Airtable - Search records\"": "{",
"\"When chat message received\"": "{",
"\"If filter description exists\"": "{",
"\"OpenAI - Generate search filter\"": "{"
}

View File

@@ -0,0 +1,131 @@
{
"meta": {
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
},
"nodes": [
{
"id": "939bb301-5e12-4d5b-9a56-61a61cca5f0d",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
640,
460
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "372777e8-ce90-4dea-befc-ac1b2eb4729f",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
780,
460
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "7a8f0ad1-1c00-4043-b3e5-c88521140a1a",
"name": "SerpAPI",
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
"position": [
920,
460
],
"parameters": {
"options": {}
},
"credentials": {
"serpApi": {
"id": "aJCKjxx6U3K7ydDe",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "a7624108-e3da-4193-a625-887314216b8b",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
360,
240
],
"webhookId": "53c136fe-3e77-4709-a143-fe82746dd8b6",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "6b8b7de8-fe3f-43b5-97ce-a52a9e44eb5e",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
680,
240
],
"parameters": {
"options": {}
},
"typeVersion": 1.6
}
],
"pinData": {},
"connections": {
"SerpAPI": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,201 @@
{
"\"meta\"": "{",
"\"instanceId\"": "\"408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9\",",
"\"templateCredsSetupCompleted\"": "true",
"\"nodes\"": "[",
"\"id\"": "\"23bca6e2-e16a-48a4-a7fc-96ce25846764\",",
"\"name\"": "\"Sticky Note20\",",
"\"type\"": "\"ai_outputParser\",",
"\"position\"": "[",
"\"parameters\"": "{",
"\"schemaType\"": "\"manual\",",
"\"inputSchema\"": "\"{\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\":\\\" A short title summarising the research topic\\\"\\n },\\n \\\"description\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"A short description to summarise the research topic\\\"\\n }\\n }\\n}\"",
"\"typeVersion\"": "1",
"\"options\"": "{}",
"\"assignments\"": "[",
"\"value\"": "\"={{ [] }}\"",
"\"model\"": "{",
"\"__rl\"": "true,",
"\"mode\"": "\"id\",",
"\"credentials\"": "{",
"\"openAiApi\"": "{",
"\"webhookId\"": "\"d4ea875f-83cb-49a8-8992-c08b4114c9bd\",",
"\"path\"": "\"deep_research\",",
"\"ignoreBots\"": "true,",
"\"buttonLabel\"": "\"Done\",",
"\"formTitle\"": "\"DeepResearcher\",",
"\"formFields\"": "{",
"\"values\"": "[",
"\"fieldType\"": "\"dropdown\",",
"\"fieldLabel\"": "\"={{ \\\"\\\" }}\",",
"\"formDescription\"": "\"=<img\\n src=\\\"https://res.cloudinary.com/daglih2g8/image/upload/f_auto,q_auto/v1/n8n-workflows/o4wqztloz3j6okfxpeyw\\\"\\n width=\\\"100%\\\"\\n style=\\\"border:1px solid #ccc\\\"\\n/>\"",
"\"text\"": "\"=Given the following contents from a SERP search for the query <query>{{ $('Item Ref').first().json.query }}</query>, generate a list of learnings from the contents. Return a maximum of 3 learnings, but feel free to return less if the contents are clear. Make sure each learning is unique and not similar to each other. The learnings should be concise and to the point, as detailed and infromation dense as possible. Make sure to include any entities like people, places, companies, products, things, etc in the learnings, as well as any exact metrics, numbers, or dates. The learnings will be used to research the topic further.\\n\\n<contents>\\n{{\\n$('Convert to Markdown')\\n .all()\\n .map(item =>`<content>\\\\n${item.json.markdown.substr(0, 25_000)}\\\\n</content>`)\\n .join('\\\\n')\\n}}\\n</contents>\",",
"\"messages\"": "{",
"\"messageValues\"": "[",
"\"message\"": "\"=You are an expert researcher. Today is {{ $now.toLocaleString() }}. Follow these instructions when responding:\\n - You may be asked to research subjects that is after your knowledge cutoff, assume the user is right when presented with news.\\n - The user is a highly experienced analyst, no need to simplify it, be as detailed as possible and make sure your response is correct.\\n - Be highly organized.\\n - Suggest solutions that I didn't think about.\\n - Be proactive and anticipate my needs.\\n - Treat me as an expert in all subject matter.\\n - Mistakes erode my trust, so be accurate and thorough.\\n - Provide detailed explanations, I'm comfortable with lots of detail.\\n - Value good arguments over authorities, the source is irrelevant.\\n - Consider new technologies and contrarian ideas, not just the conventional wisdom.\\n - You may use high levels of speculation or prediction, just flag it for me.\"",
"\"promptType\"": "\"define\",",
"\"hasOutputParser\"": "true",
"\"fieldToSplitOut\"": "\"tag\"",
"\"executeOnce\"": "true,",
"\"jsonOutput\"": "\"={{ $('Generate Learnings').item.json }}\"",
"\"onError\"": "\"continueRegularOutput\",",
"\"url\"": "\"=https://api.notion.com/v1/blocks/{{ $('Get Existing Row1').first().json.id }}/children\",",
"\"method\"": "\"PATCH\",",
"\"sendBody\"": "true,",
"\"authentication\"": "\"predefinedCredentialType\",",
"\"bodyParameters\"": "{",
"\"genericAuthType\"": "\"httpQueryAuth\",",
"\"httpQueryAuth\"": "{",
"\"httpHeaderAuth\"": "{",
"\"html\"": "\"<div class=\\\"form-group\\\" style=\\\"margin-bottom:16px;\\\">\\n <label class=\\\"form-label\\\" for=\\\"field-2\\\">\\n Enter research breadth (Default 2)\\n </label>\\n <p style=\\\"font-size:12px;color:#666;text-align:left\\\">\\n This value determines how many sources to explore.\\n </p>\\n <input\\n class=\\\"form-input\\\"\\n type=\\\"range\\\"\\n id=\\\"field-2\\\"\\n name=\\\"field-2\\\"\\n value=\\\"2\\\"\\n step=\\\"1\\\"\\n max=\\\"5\\\"\\n min=\\\"1\\\"\\n list=\\\"breadth-markers\\\"\\n >\\n <datalist\\n id=\\\"breadth-markers\\\"\\n style=\\\"display: flex;\\n flex-direction: row;\\n justify-content: space-between;\\n writing-mode: horizontal-tb;\\n margin-top: -10px;\\n text-align: center;\\n font-size: 10px;\\n margin-left: 16px;\\n margin-right: 16px;\\\"\\n >\\n <option value=\\\"1\\\" label=\\\"1\\\"></option>\\n <option value=\\\"2\\\" label=\\\"2\\\"></option>\\n <option value=\\\"3\\\" label=\\\"3\\\"></option>\\n <option value=\\\"4\\\" label=\\\"4\\\"></option>\\n <option value=\\\"5\\\" label=\\\"5\\\"></option>\\n </datalist>\\n</div>\\n\\n\",",
"\"ignore\"": "\"a,img,picture,svg,video,audio,iframe\"",
"\"destinationKey\"": "\"markdown\"",
"\"placeholder\"": "\"=\",",
"\"requiredField\"": "true",
"\"workflowInputs\"": "{",
"\"color\"": "7,",
"\"width\"": "180,",
"\"height\"": "260,",
"\"content\"": "\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n### UPDATE NOTION CREDENTIAL HERE!\"",
"\"operation\"": "\"notEmpty\",",
"\"completionTitle\"": "\"=Thank you for using DeepResearcher.\",",
"\"completionMessage\"": "\"=You may now close this window.\"",
"\"waitForSubWorkflow\"": "true",
"\"workflowId\"": "{",
"\"data\"": "\"={{ $json }}\",",
"\"jobType\"": "\"deepresearch_learnings\",",
"\"requestId\"": "\"={{ $('JobType Router').first().json.requestId }}\"",
"\"schema\"": "[",
"\"display\"": "true,",
"\"removed\"": "false,",
"\"required\"": "false,",
"\"displayName\"": "\"data\",",
"\"defaultMatch\"": "false,",
"\"canBeUsedToMatch\"": "true",
"\"mappingMode\"": "\"defineBelow\",",
"\"matchingColumns\"": "[],",
"\"attemptToConvertTypes\"": "false,",
"\"convertFieldsToString\"": "true",
"\"jsonBody\"": "\"={{\\n{\\n \\\"children\\\": $json.block\\n}\\n}}\",",
"\"sendQuery\"": "true,",
"\"specifyBody\"": "\"json\",",
"\"queryParameters\"": "{",
"\"dataToSave\"": "{",
"\"key\"": "\"Request ID|rich_text\",",
"\"rules\"": "{",
"\"outputKey\"": "\"report\",",
"\"conditions\"": "[",
"\"version\"": "2,",
"\"leftValue\"": "\"={{ $json }}\",",
"\"caseSensitive\"": "true,",
"\"typeValidation\"": "\"strict\"",
"\"combinator\"": "\"and\",",
"\"operator\"": "{",
"\"rightValue\"": "\"\"",
"\"renameOutput\"": "true",
"\"singleValue\"": "true",
"\"alwaysOutputData\"": "true",
"\"title\"": "\"={{ $json.output.title }}\"",
"\"resource\"": "\"databasePage\",",
"\"databaseId\"": "{",
"\"cachedResultUrl\"": "\"https://www.notion.so/19486dd60c0c80da9cb7eb1468ea9afd\",",
"\"cachedResultName\"": "\"n8n DeepResearch\"",
"\"propertiesUi\"": "{",
"\"propertyValues\"": "[",
"\"textContent\"": "\"={{ $('Set Variables').first().json.request_id }}\"",
"\"statusValue\"": "\"Done\"",
"\"notionApi\"": "{",
"\"limit\"": "1,",
"\"filters\"": "{",
"\"condition\"": "\"equals\",",
"\"richTextValue\"": "\"={{ $json.requestId.toString() }}\"",
"\"matchType\"": "\"allFilters\",",
"\"filterType\"": "\"manual\"",
"\"pageId\"": "{",
"\"date\"": "\"={{ $now.toISO() }}\"",
"\"tables\"": "true",
"\"markdown\"": "\"={{ $json.text }}\"",
"\"modelName\"": "\"models/gemini-2.0-flash\"",
"\"googlePalmApi\"": "{",
"\"maxTries\"": "2,",
"\"timeout\"": "\"={{ 1000 * 60 }}\"",
"\"sendHeaders\"": "true,",
"\"headerParameters\"": "{",
"\"nodeCredentialType\"": "\"notionApi\"",
"\"retryOnFail\"": "true,",
"\"waitBetweenTries\"": "3000",
"\"multiselect\"": "true,",
"\"fieldOptions\"": "{",
"\"option\"": "\"=I understand higher depth and breath values I've selected may incur longer wait times and higher costs. I acknowledging this and wish to proceed with the research request.\"",
"\"jsCode\"": "\"const urls = $('JobType Router').first().json.data.all_urls;\\nconst chunksize = 50;\\nconst splits = Math.max(1, Math.floor(urls.length/chunksize));\\n\\nconst blocks = Array(splits).fill(0)\\n .map((_, idx) => {\\n const block = urls\\n .slice(\\n idx * chunksize, \\n (idx * chunksize) + chunksize - 1\\n )\\n .map(url => {\\n return {\\n object: \\\"block\\\",\\n type: \\\"bulleted_list_item\\\",\\n bulleted_list_item: {\\n rich_text: [\\n { type: \\\"text\\\", text: { content: url } }\\n ]\\n }\\n }\\n });\\n return { json: { block } }\\n });\\n\\nreturn [\\n { json: {\\n block:[{\\n \\\"object\\\": \\\"block\\\",\\n \\\"type\\\": \\\"heading_2\\\",\\n \\\"heading_2\\\": {\\n \\\"rich_text\\\": [\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"text\\\": {\\n \\\"content\\\": \\\"Sources\\\"\\n }\\n }\\n ]\\n }\\n }]\\n } },\\n ...blocks\\n];\"",
"\"aggregate\"": "\"aggregateAllItemData\"",
"\"pinData\"": "{},",
"\"connections\"": "{",
"\"Item Ref\"": "{",
"\"main\"": "[",
"\"node\"": "\"Report Page Generator\",",
"\"index\"": "0",
"\"Create Row\"": "{",
"\"Web Search\"": "{",
"\"Valid Pages\"": "{",
"\"Confirmation\"": "{",
"\"Has Content?\"": "{",
"\"Has Results?\"": "{",
"\"Valid Blocks\"": "{",
"\"Append Blocks\"": "{",
"\"HTML to Array\"": "{",
"\"Page Contents\"": "{",
"\"SERP to Items\"": "{",
"\"Set Variables\"": "{",
"\"Tags to Items\"": "{",
"\"URLs to Items\"": "{",
"\"Empty Response\"": "{",
"\"Execution Data\"": "{",
"\"JobType Router\"": "{",
"\"Convert to HTML\"": "{",
"\"Set In-Progress\"": "{",
"\"Get Existing Row\"": "{",
"\"Research Request\"": "{",
"\"Results to Items\"": "{",
"\"Set Next Queries\"": "{",
"\"Feedback to Items\"": "{",
"\"For Each Block...\"": "{",
"\"For Each Query...\"": "{",
"\"Get Existing Row1\"": "{",
"\"Get Initial Query\"": "{",
"\"Is Depth Reached?\"": "{",
"\"OpenAI Chat Model\"": "{",
"\"ai_languageModel\"": "[",
"\"Parse JSON blocks\"": "{",
"\"Set Initial Query\"": "{",
"\"Accumulate Results\"": "{",
"\"Generate Learnings\"": "{",
"\"On form submission\"": "{",
"\"OpenAI Chat Model1\"": "{",
"\"OpenAI Chat Model2\"": "{",
"\"OpenAI Chat Model3\"": "{",
"\"OpenAI Chat Model4\"": "{",
"\"Convert to Markdown\"": "{",
"\"DeepResearch Report\"": "{",
"\"Clarifying Questions\"": "{",
"\"DeepResearch Results\"": "{",
"\"For Each Question...\"": "{",
"\"Get Research Results\"": "{",
"\"URL Sources to Lists\"": "{",
"\"Ask Clarity Questions\"": "{",
"\"Generate SERP Queries\"": "{",
"\"Initiate DeepResearch\"": "{",
"\"Report Page Generator\"": "{",
"\"Top 5 Organic Results\"": "{",
"\"Upload to Notion Page\"": "{",
"\"DeepResearch Learnings\"": "{",
"\"Notion Block Generator\"": "{",
"\"DeepResearch Subworkflow\"": "{",
"\"Google Gemini Chat Model\"": "{",
"\"Structured Output Parser\"": "{",
"\"ai_outputParser\"": "[",
"\"Research Goal + Learnings\"": "{",
"\"Structured Output Parser1\"": "{",
"\"Structured Output Parser2\"": "{",
"\"Structured Output Parser4\"": "{"
}

View File

@@ -0,0 +1,88 @@
{
"\"meta\"": "{",
"\"instanceId\"": "\"26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e\"",
"\"nodes\"": "[",
"\"id\"": "\"39191834-ecc2-46f0-a31a-0a7e9c47ac5d\",",
"\"name\"": "\"Sticky Note8\",",
"\"type\"": "\"ai_textSplitter\",",
"\"position\"": "[",
"\"parameters\"": "{",
"\"typeVersion\"": "1",
"\"url\"": "\"=http://qdrant:6333/collections/hello_fresh/points/recommend/groups\",",
"\"options\"": "{},",
"\"jsCode\"": "\"const pageData = JSON.parse($input.first().json.data)\\nreturn pageData.props.pageProps.ssrPayload.courses.slice(0, 10);\"",
"\"trimValues\"": "false,",
"\"cleanUpText\"": "true",
"\"operation\"": "\"extractHtmlContent\",",
"\"extractionValues\"": "{",
"\"values\"": "[",
"\"key\"": "\"instructions\",",
"\"cssSelector\"": "\"[data-test-id=\\\"instructions\\\"]\",",
"\"assignments\"": "[",
"\"value\"": "\"hello_fresh\",",
"\"credentials\"": "{",
"\"mistralCloudApi\"": "{",
"\"metadata\"": "{",
"\"metadataValues\"": "[",
"\"jsonData\"": "\"={{ $json.data }}\",",
"\"jsonMode\"": "\"expressionData\"",
"\"mode\"": "\"list\",",
"\"combinationMode\"": "\"mergeByPosition\"",
"\"webhookId\"": "\"e86d8ae4-3b0d-4c40-9d12-a11d6501a043\",",
"\"skipSelectors\"": "\"img,a\"",
"\"fields\"": "{",
"\"stringValue\"": "\"={{ $now.year }}-W{{ $now.weekNumber }}\"",
"\"schemaType\"": "\"manual\",",
"\"workflowId\"": "\"={{ $workflow.id }}\",",
"\"description\"": "\"Call this tool to get a recipe recommendation. Pass in the following params as a json object:\\n* positives - a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc.\\n* negatives - a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc.\",",
"\"inputSchema\"": "\"{\\n\\\"type\\\": \\\"object\\\",\\n\\\"properties\\\": {\\n\\t\\\"positive\\\": {\\n\\t\\t\\\"type\\\": \\\"string\\\",\\n\\t\\t\\\"description\\\": \\\"a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc.\\\"\\n\\t},\\n \\\"negative\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc.\\\"\\n }\\n}\\n}\",",
"\"specifyInputSchema\"": "true",
"\"model\"": "\"mistral-large-2402\",",
"\"amount\"": "1.1",
"\"method\"": "\"POST\",",
"\"sendBody\"": "true,",
"\"authentication\"": "\"predefinedCredentialType\",",
"\"bodyParameters\"": "{",
"\"nodeCredentialType\"": "\"qdrantApi\"",
"\"qdrantApi\"": "{",
"\"language\"": "\"python\",",
"\"pythonCode\"": "\"import sqlite3\\ncon = sqlite3.connect(\\\"hello_fresh_1.db\\\")\\n\\ncur = con.cursor()\\ncur.execute(\\\"CREATE TABLE IF NOT EXISTS recipes (id TEXT PRIMARY KEY, name TEXT, data TEXT, cuisine TEXT, category TEXT, tag TEXT, week TEXT);\\\")\\n\\nfor item in _input.all():\\n cur.execute('INSERT OR REPLACE INTO recipes VALUES(?,?,?,?,?,?,?)', (\\n item.json.id,\\n item.json.name,\\n item.json.data,\\n ','.join(item.json.cuisine),\\n item.json.category,\\n ','.join(item.json.tag),\\n item.json.week\\n ))\\n\\ncon.commit()\\ncon.close()\\n\\nreturn [{ \\\"affected_rows\\\": len(_input.all()) }]\"",
"\"color\"": "7,",
"\"width\"": "213.30551928619226,",
"\"height\"": "332.38559808882246,",
"\"content\"": "\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n### \ud83d\udea8Configure Your Qdrant Connection\\n* Be sure to enter your endpoint address\"",
"\"systemMessage\"": "\"=You are a recipe bot for the company, \\\"Hello fresh\\\". You will help the user choose which Hello Fresh recipe to choose from this week's menu. The current week is {{ $now.year }}-W{{ $now.weekNumber }}.\\nDo not recommend any recipes other from the current week's menu. If there are no recipes to recommend, please ask the user to visit the website instead https://hellofresh.com.\"",
"\"qdrantCollection\"": "{",
"\"__rl\"": "true,",
"\"cachedResultName\"": "\"hello_fresh\"",
"\"pinData\"": "{},",
"\"connections\"": "{",
"\"Get Recipe\"": "{",
"\"main\"": "[",
"\"node\"": "\"Default Data Loader\",",
"\"index\"": "0",
"\"Chat Trigger\"": "{",
"\"Prepare Documents\"": "{",
"\"Default Data Loader\"": "{",
"\"ai_document\"": "[",
"\"Extract Server Data\"": "{",
"\"Get Course Metadata\"": "{",
"\"Get Recipes From DB\"": "{",
"\"Get This Week's Menu\"": "{",
"\"Qdrant Recommend API\"": "{",
"\"ai_tool\"": "[",
"\"Wait for Rate Limits\"": "{",
"\"Merge Course & Recipe\"": "{",
"\"Extract Recipe Details\"": "{",
"\"Get Mistral Embeddings\"": "{",
"\"Embeddings Mistral Cloud\"": "{",
"\"ai_embedding\"": "[",
"\"Execute Workflow Trigger\"": "{",
"\"Mistral Cloud Chat Model\"": "{",
"\"ai_languageModel\"": "[",
"\"Use Qdrant Recommend API\"": "{",
"\"Extract Available Courses\"": "{",
"\"When clicking \\\"Test workflow\\\"\"": "{",
"\"Recursive Character Text Splitter\"": "{",
"\"ai_textSplitter\"": "["
}

View File

@@ -0,0 +1,118 @@
{
"\"id\"": "\"wokWVLDQUDi0DC7I\",",
"\"meta\"": "{",
"\"instanceId\"": "\"03907a25f048377a8789a4332f28148522ba31ee907fababf704f1d88130b1b6\",",
"\"templateCredsSetupCompleted\"": "true",
"\"name\"": "\"Perplexity\"",
"\"tags\"": "[],",
"\"nodes\"": "[",
"\"type\"": "\"ai_tool\",",
"\"position\"": "[",
"\"parameters\"": "{",
"\"color\"": "3,",
"\"width\"": "420,",
"\"height\"": "340,",
"\"content\"": "\"## Optional\"",
"\"typeVersion\"": "4.2",
"\"model\"": "\"gpt-4o-mini-2024-07-18\",",
"\"options\"": "{},",
"\"responseFormat\"": "\"text\",",
"\"credentials\"": "{",
"\"openAiApi\"": "{",
"\"topP\"": "1,",
"\"timeout\"": "60000,",
"\"maxTokens\"": "-1,",
"\"maxRetries\"": "2,",
"\"temperature\"": "0,",
"\"presencePenalty\"": "0,",
"\"frequencyPenalty\"": "0",
"\"schemaType\"": "\"manual\",",
"\"inputSchema\"": "\"{\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"article\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"required\\\": [\\\"category\\\", \\\"title\\\", \\\"metadata\\\", \\\"content\\\", \\\"hashtags\\\"],\\n \\\"properties\\\": {\\n \\\"category\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Article category\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Article title\\\"\\n },\\n \\\"metadata\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"timePosted\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Time since article was posted\\\"\\n },\\n \\\"author\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Article author name\\\"\\n },\\n \\\"tag\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Article primary tag\\\"\\n }\\n },\\n \\\"required\\\": [\\\"timePosted\\\", \\\"author\\\", \\\"tag\\\"]\\n },\\n \\\"content\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"mainText\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Main article content\\\"\\n },\\n \\\"sections\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Section title\\\"\\n },\\n \\\"text\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Section content\\\"\\n },\\n \\\"quote\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"description\\\": \\\"Blockquote text\\\"\\n }\\n },\\n \\\"required\\\": [\\\"title\\\", \\\"text\\\", \\\"quote\\\"]\\n }\\n }\\n },\\n \\\"required\\\": [\\\"mainText\\\", \\\"sections\\\"]\\n },\\n \\\"hashtags\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"description\\\": \\\"Article hashtags\\\"\\n }\\n }\\n }\\n }\\n}\"",
"\"webhookId\"": "\"6a8e3ae7-02ae-4663-a27a-07df448550ab\",",
"\"path\"": "\"pblog\",",
"\"responseMode\"": "\"responseNode\"",
"\"respondWith\"": "\"text\",",
"\"responseBody\"": "\"={{ $json.text }}\"",
"\"text\"": "\"=Convert this verbatim into HTML: {{ $json.article.toJsonString() }}\\n\\n## Formatting Guidelines\\n- HTML document must be single line document without tabs or line breaks\\n- Use proper HTML tags throughout\\n- Do not use these tags: <html> <body> <style> <head>\\n- Use <h1> tag for main title\\n- Use <h2> tags for secondary titles\\n- Structure with <p> tags for paragraphs\\n- Include appropriate spacing\\n- Use <blockquote> for direct quotes\\n- Maintain consistent formatting\\n- Write in clear, professional tone\\n- Break up long paragraphs\\n- Use engaging subheadings\\n- Include transitional phrases\\n\\nThe final JSON response should contain only the title and content fields, with the content including all HTML formatting.\\n{\\n\\t\\\"title\\\": \\\"the title\\\",\\n\\t\\\"content\\\": \\\"the HTML\\\"\\n}\",",
"\"chatId\"": "\"={{ $json.telegram_chat_id }}\",",
"\"additionalFields\"": "{",
"\"parse_mode\"": "\"HTML\",",
"\"appendAttribution\"": "false",
"\"telegramApi\"": "{",
"\"promptType\"": "\"define\"",
"\"conditions\"": "[",
"\"version\"": "2,",
"\"leftValue\"": "\"\",",
"\"caseSensitive\"": "true,",
"\"typeValidation\"": "\"strict\"",
"\"combinator\"": "\"and\",",
"\"operator\"": "{",
"\"operation\"": "\"equals\"",
"\"singleValue\"": "true",
"\"rightValue\"": "\"\"",
"\"assignments\"": "[",
"\"value\"": "\"=Error. No topic provided.\"",
"\"systemMessage\"": "\"Use the perplexity_research_tool to provide research on the users topic.\\n\\n\"",
"\"hasOutputParser\"": "true",
"\"fields\"": "{",
"\"values\"": "[",
"\"stringValue\"": "\"= {{ $json.text }}\"",
"\"workflowId\"": "{",
"\"__rl\"": "true,",
"\"mode\"": "\"id\",",
"\"description\"": "\"Call this tool to perform Perplexity research.\",",
"\"jsonSchemaExample\"": "\"{\\n \\\"topic\\\": \\\"\\\"\\n}\"",
"\"retryOnFail\"": "true,",
"\"agent\"": "\"conversationalAgent\",",
"\"includeOtherFields\"": "true",
"\"url\"": "\"https://api.perplexity.ai/chat/completions\",",
"\"method\"": "\"POST\",",
"\"jsonBody\"": "\"={\\n \\\"model\\\": \\\"llama-3.1-sonar-small-128k-online\\\",\\n \\\"messages\\\": [\\n {\\n \\\"role\\\": \\\"system\\\",\\n \\\"content\\\": \\\"{{ $json.system }}\\\"\\n },\\n {\\n \\\"role\\\": \\\"user\\\",\\n \\\"content\\\": \\\"{{ $json.user }}\\\"\\n }\\n ],\\n \\\"max_tokens\\\": \\\"4000\\\",\\n \\\"temperature\\\": 0.2,\\n \\\"top_p\\\": 0.9,\\n \\\"return_citations\\\": true,\\n \\\"search_domain_filter\\\": [\\n \\\"perplexity.ai\\\"\\n ],\\n \\\"return_images\\\": false,\\n \\\"return_related_questions\\\": false,\\n \\\"search_recency_filter\\\": \\\"month\\\",\\n \\\"top_k\\\": 0,\\n \\\"stream\\\": false,\\n \\\"presence_penalty\\\": 0,\\n \\\"frequency_penalty\\\": 1\\n}\",",
"\"sendBody\"": "true,",
"\"specifyBody\"": "\"json\",",
"\"authentication\"": "\"genericCredentialType\",",
"\"genericAuthType\"": "\"httpHeaderAuth\"",
"\"httpCustomAuth\"": "{",
"\"httpHeaderAuth\"": "{",
"\"active\"": "false,",
"\"pinData\"": "{},",
"\"settings\"": "{",
"\"executionOrder\"": "\"v1\"",
"\"versionId\"": "\"9ebf0569-4d9d-4783-b797-e5df2a8e8415\",",
"\"connections\"": "{",
"\"If\"": "{",
"\"main\"": "[",
"\"node\"": "\"Perplexity Topic Agent\",",
"\"index\"": "0",
"\"If2\"": "{",
"\"Article\"": "{",
"\"Chat Id\"": "{",
"\"If HTML\"": "{",
"\"Prompts\"": "{",
"\"Webhook\"": "{",
"\"Chat Id1\"": "{",
"\"Contents\"": "{",
"\"If Topic\"": "{",
"\"Get Topic\"": "{",
"\"Telegram2\"": "{",
"\"If Article\"": "{",
"\"Perplexity\"": "{",
"\"gpt-4o-mini\"": "{",
"\"ai_languageModel\"": "[",
"\"Extract JSON\"": "{",
"\"gpt-4o-mini1\"": "{",
"\"gpt-4o-mini2\"": "{",
"\"gpt-4o-mini3\"": "{",
"\"gpt-4o-mini5\"": "{",
"\"Basic LLM Chain\"": "{",
"\"If Topic Exists\"": "{",
"\"Create HTML Article\"": "{",
"\"Improve Users Topic\"": "{",
"\"Perplexity Topic Agent\"": "{",
"\"Execute Workflow Trigger\"": "{",
"\"No Operation, do nothing\"": "{",
"\"Structured Output Parser1\"": "{",
"\"ai_outputParser\"": "[",
"\"Call Perplexity Researcher\"": "{",
"\"ai_tool\"": "["
}