-
-
Save that-one-tom/753ad7f8d32e1563fdd1575136670ea4 to your computer and use it in GitHub Desktop.
n8n workflow answering questions from Slack using information from HIbob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Heartcore HR Demo", | |
| "nodes": [ | |
| { | |
| "parameters": { | |
| "httpMethod": "POST", | |
| "path": "abbf254a-eda4-4643-a9a5-4b7fe12a29d9", | |
| "options": { | |
| "responseData": "Searching..." | |
| } | |
| }, | |
| "type": "n8n-nodes-base.webhook", | |
| "typeVersion": 2.1, | |
| "position": [ | |
| 0, | |
| 0 | |
| ], | |
| "id": "405ca3b8-5297-489a-91d0-6d88196685f0", | |
| "name": "Webhook", | |
| "webhookId": "abbf254a-eda4-4643-a9a5-4b7fe12a29d9" | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "user", | |
| "operation": "getProfile", | |
| "user": { | |
| "__rl": true, | |
| "value": "={{ $json.body.user_id }}", | |
| "mode": "id" | |
| } | |
| }, | |
| "type": "n8n-nodes-base.slack", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| 208, | |
| 0 | |
| ], | |
| "id": "e9a05eab-aff4-4b9b-bd15-ed72be495742", | |
| "name": "Get a user's profile", | |
| "webhookId": "8e582d4e-2fd5-453a-bd41-52118031c01c", | |
| "credentials": { | |
| "slackApi": { | |
| "id": "qpRcyT43qWmu9kp0", | |
| "name": "Heartcore HR Demo" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "promptType": "define", | |
| "text": "={{ $('Webhook').item.json.body.text }}", | |
| "options": { | |
| "systemMessage": "=You are a senior member of the people team. You have received a question from {{ $json.real_name }} at {{ $now.format('yyyy-MM-dd HH:mm') }}.\n\nYour job is to answer this question as accurate as possible using the available tools.\n\nYour response will appear in Slack and you should use the below elements from Slack's mrkdwn language to create useful visual highlights where helpful:\n\n- _italic_ will produce italicized text\n- *bold* will produce bold text\n- ~strike~ will produce strikethrough text\n- \\n will produce a linebreak\n- > character at the beginning of one or more lines will produce a block quote\n- <http://www.exampleurl.com|Link text> will produce a link\n \nImportant instructions:\n\n- DO NOT use any other elements beyond the ones listed above!\n- DO NOT answer questions based on your general knowledge, instead only use information from the available tools.\n- If you cannot answer a question using the information from the available tools, politely decline answering the question and suggest the user reaches out to the people team instead." | |
| } | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.agent", | |
| "typeVersion": 2.2, | |
| "position": [ | |
| 416, | |
| 0 | |
| ], | |
| "id": "205079c0-45b9-4ddc-a145-105a860f9862", | |
| "name": "AI Agent" | |
| }, | |
| { | |
| "parameters": { | |
| "model": { | |
| "__rl": true, | |
| "value": "gpt-5-mini", | |
| "mode": "list", | |
| "cachedResultName": "gpt-5-mini" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", | |
| "typeVersion": 1.2, | |
| "position": [ | |
| 288, | |
| 208 | |
| ], | |
| "id": "81e70697-b677-48f1-8dbe-bf095f11f893", | |
| "name": "OpenAI Chat Model", | |
| "credentials": { | |
| "openAiApi": { | |
| "id": "CWwudJ9kAcWgUuaK", | |
| "name": "Tom Demo 2025-08-14" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "method": "POST", | |
| "url": "https://api.hibob.com/v1/people/search", | |
| "authentication": "genericCredentialType", | |
| "genericAuthType": "httpBasicAuth", | |
| "sendBody": true, | |
| "bodyParameters": { | |
| "parameters": [ | |
| { | |
| "name": "fields", | |
| "value": "={{ [\"root.id\", \"root.displayName\", \"root.email\", \"work.title\", \"work.department\", \"work.startDate\", \"internal.lifecycleStatus\", \"internal.terminationDate\", \"work.reportsTo\", \"work.reportsTo.email\", \"work.reportsTo.email\"] }}" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequestTool", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| 576, | |
| 208 | |
| ], | |
| "id": "923e9e3c-adc5-4c66-8f2a-a8b2bcc5783f", | |
| "name": "HTTP Request", | |
| "credentials": { | |
| "httpBasicAuth": { | |
| "id": "GZRYchEyQi06Vdqv", | |
| "name": "Hibob | General" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "select": "channel", | |
| "channelId": { | |
| "__rl": true, | |
| "value": "={{ $('Webhook').item.json.body.channel_id }}", | |
| "mode": "id" | |
| }, | |
| "text": "={{ $json.output }}", | |
| "otherOptions": { | |
| "mrkdwn": true, | |
| "ephemeral": { | |
| "ephemeralValues": { | |
| "user": { | |
| "__rl": true, | |
| "value": "={{ $('Webhook').item.json.body.user_id }}", | |
| "mode": "id" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "type": "n8n-nodes-base.slack", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| 768, | |
| 0 | |
| ], | |
| "id": "39b50ff1-e67e-4b6a-9629-5828e3f3683c", | |
| "name": "Send a message", | |
| "webhookId": "8de54248-2aab-40c6-b7c1-d2a5ddf7f316", | |
| "credentials": { | |
| "slackApi": { | |
| "id": "qpRcyT43qWmu9kp0", | |
| "name": "Heartcore HR Demo" | |
| } | |
| } | |
| } | |
| ], | |
| "pinData": {}, | |
| "connections": { | |
| "Webhook": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Get a user's profile", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Get a user's profile": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "AI Agent", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "OpenAI Chat Model": { | |
| "ai_languageModel": [ | |
| [ | |
| { | |
| "node": "AI Agent", | |
| "type": "ai_languageModel", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "HTTP Request": { | |
| "ai_tool": [ | |
| [ | |
| { | |
| "node": "AI Agent", | |
| "type": "ai_tool", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "AI Agent": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send a message", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| } | |
| }, | |
| "active": true, | |
| "settings": { | |
| "executionOrder": "v1", | |
| "saveDataSuccessExecution": "all", | |
| "callerPolicy": "workflowsFromSameOwner" | |
| }, | |
| "versionId": "c431235d-1105-4698-906a-618d41bb2a6d", | |
| "meta": { | |
| "templateCredsSetupCompleted": true, | |
| "instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7" | |
| }, | |
| "id": "HpuBotJWX6ZVk7pU", | |
| "tags": [] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment