Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "Entra-365-Search-Chatbot-Orchestration",
- "nodes": [
- {
- "parameters": {
- "trigger": "onNewEmail",
- "authentication": "oAuth2",
- "folder": "inbox"
- },
- "name": "Microsoft Outlook Trigger",
- "type": "n8n-nodes-base.microsoftOutlook",
- "typeVersion": 1,
- "position": [250, 300],
- "credentials": {
- "microsoftOutlookOAuth2": "Your Microsoft Graph Credential"
- }
- },
- {
- "parameters": {
- "resource": "mail",
- "operation": "get",
- "userId": "={{$node['Microsoft Outlook Trigger'].json['from']['emailAddress']['address']}}",
- "messageId": "={{$node['Microsoft Outlook Trigger'].json['id']}}"
- },
- "name": "Get Email Details",
- "type": "n8n-nodes-base.microsoftGraph",
- "typeVersion": 1,
- "position": [450, 300],
- "credentials": {
- "microsoftGraphOAuth2": "Your Microsoft Graph Credential"
- }
- },
- {
- "parameters": {
- "method": "GET",
- "url": "https://{your_search_service}.search.windows.net/indexes/{your_index_name}/docs?api-version=2023-11-01&search={{$node['Get Email Details'].json['subject']}}&$top=5",
- "headers": {
- "api-key": "{your_search_api_key}",
- "Content-Type": "application/json"
- }
- },
- "name": "Azure AI Search",
- "type": "n8n-nodes-base.httpRequest",
- "typeVersion": 1,
- "position": [650, 300]
- },
- {
- "parameters": {
- "method": "POST",
- "url": "https://{your_bot_service}.azurewebsites.net/api/messages",
- "headers": {
- "Authorization": "Bearer {your_bot_token}",
- "Content-Type": "application/json"
- },
- "body": {
- "emailSubject": "={{$node['Get Email Details'].json['subject']}}",
- "searchResults": "={{$node['Azure AI Search'].json['value']}}"
- }
- },
- "name": "Azure Chatbot",
- "type": "n8n-nodes-base.httpRequest",
- "typeVersion": 1,
- "position": [850, 300]
- },
- {
- "parameters": {
- "values": {
- "string": [
- {
- "name": "chatbotResponse",
- "value": "={{$node['Azure Chatbot'].json['response']}}"
- }
- ]
- }
- },
- "name": "Log Response",
- "type": "n8n-nodes-base.set",
- "typeVersion": 1,
- "position": [1050, 300]
- }
- ],
- "connections": {
- "Microsoft Outlook Trigger": {
- "main": [
- [
- {
- "node": "Get Email Details",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Get Email Details": {
- "main": [
- [
- {
- "node": "Azure AI Search",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Azure AI Search": {
- "main": [
- [
- {
- "node": "Azure Chatbot",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Azure Chatbot": {
- "main": [
- [
- {
- "node": "Log Response",
- "type": "main",
- "index": 0
- }
- ]
- ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement