AutomationFlowsAI & RAG › Scheduling Assistant - 05 Route & Export

Scheduling Assistant - 05 Route & Export

Scheduling Assistant - 05 Route & Export. Uses executeWorkflowTrigger, googleCalendar, microsoftOutlook. Event-driven trigger; 8 nodes.

Event trigger★★★★☆ complexity8 nodesExecute Workflow TriggerGoogle CalendarMicrosoft Outlook
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★★☆ Added:

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 →

Download .json
{
  "name": "Scheduling Assistant - 05 Route & Export",
  "nodes": [
    {
      "parameters": {},
      "id": "workflow-trigger",
      "name": "When called by another workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Determine target calendar system based on attendees or preferences\nconst items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n  const data = item.json.clearData || item.json;\n  const normalized = data.normalized;\n  \n  // Routing logic: determine calendar system\n  let calendarSystem = 'google'; // default\n  \n  // Check environment variable or attendee domain preferences\n  const primaryAttendee = normalized.attendees[0];\n  if (primaryAttendee) {\n    const domain = primaryAttendee.split('@')[1];\n    \n    // Microsoft domains \u2192 Outlook\n    if (domain.includes('outlook.com') || domain.includes('office365.com') || domain.includes('microsoft.com')) {\n      calendarSystem = 'outlook';\n    }\n    // Google domains \u2192 Google Calendar\n    else if (domain.includes('gmail.com') || domain.includes('google.com')) {\n      calendarSystem = 'google';\n    }\n  }\n  \n  // Override with environment preference if set\n  if (process.env.PREFERRED_CALENDAR_SYSTEM) {\n    calendarSystem = process.env.PREFERRED_CALENDAR_SYSTEM.toLowerCase();\n  }\n  \n  const routedData = {\n    ...data,\n    routing: {\n      targetSystem: calendarSystem,\n      routedAt: new Date().toISOString(),\n      routingReason: `Based on attendee domain or system preference`\n    },\n    stage: 'routed',\n    processedAt: new Date().toISOString()\n  };\n  \n  results.push({ json: routedData });\n}\n\nreturn results;"
      },
      "id": "code-route-calendar",
      "name": "Route to Calendar System",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.routing.targetSystem}}",
              "value2": "google"
            }
          ]
        }
      },
      "id": "if-google",
      "name": "Google Calendar?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "event",
        "operation": "create",
        "calendarId": "primary",
        "start": "={{$json.normalized.startTime}}",
        "end": "={{$json.normalized.endTime}}",
        "summary": "={{$json.normalized.title}}",
        "description": "={{$json.normalized.description}}",
        "location": "={{$json.normalized.location}}",
        "additionalFields": {
          "attendees": "={{$json.normalized.attendees.map(email => ({email}))}}",
          "reminders": {
            "useDefault": false,
            "overrides": "={{$json.normalized.reminders}}"
          },
          "sendUpdates": "all"
        }
      },
      "id": "google-create-event",
      "name": "Create Google Calendar Event",
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 3,
      "position": [
        850,
        200
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "event",
        "operation": "create",
        "calendarId": "primary",
        "subject": "={{$json.normalized.title}}",
        "start": "={{$json.normalized.startTime}}",
        "end": "={{$json.normalized.endTime}}",
        "additionalFields": {
          "bodyContent": "={{$json.normalized.description}}",
          "location": "={{$json.normalized.location}}",
          "attendees": "={{$json.normalized.attendees.map(email => ({emailAddress: {address: email}}))}}",
          "isReminderOn": true
        }
      },
      "id": "outlook-create-event",
      "name": "Create Outlook Event",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 2,
      "position": [
        850,
        400
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Format successful export result\nconst items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n  const eventData = item.json;\n  const originalData = item.json; // Contains the routing data\n  \n  const exported = {\n    ...originalData,\n    export: {\n      success: true,\n      calendarSystem: originalData.routing?.targetSystem || 'google',\n      eventId: eventData.id || eventData.iCalUID,\n      eventUrl: eventData.htmlLink || eventData.webLink,\n      eventCreatedAt: new Date().toISOString(),\n      attendeesNotified: true\n    },\n    stage: 'exported',\n    processedAt: new Date().toISOString()\n  };\n  \n  results.push({ json: exported });\n}\n\nreturn results;"
      },
      "id": "code-format-export",
      "name": "Format Export Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1050,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "export-data",
              "name": "exportedData",
              "value": "={{$json}}",
              "type": "object"
            },
            {
              "id": "next-workflow-notify",
              "name": "nextWorkflow",
              "value": "06_notify",
              "type": "string"
            },
            {
              "id": "notification-type-success",
              "name": "notificationType",
              "value": "event_created",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-export-output",
      "name": "Set Export Output",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.2,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "workflowId": "={{$env.WORKFLOW_ID_NOTIFY}}",
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "id": "execute-notify",
      "name": "Trigger Notification",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1,
      "position": [
        1450,
        300
      ]
    }
  ],
  "connections": {
    "When called by another workflow": {
      "main": [
        [
          {
            "node": "Route to Calendar System",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Calendar System": {
      "main": [
        [
          {
            "node": "Google Calendar?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar?": {
      "main": [
        [
          {
            "node": "Create Google Calendar Event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Outlook Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Calendar Event": {
      "main": [
        [
          {
            "node": "Format Export Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Outlook Event": {
      "main": [
        [
          {
            "node": "Format Export Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Export Result": {
      "main": [
        [
          {
            "node": "Set Export Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Export Output": {
      "main": [
        [
          {
            "node": "Trigger Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveExecutionProgress": true,
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all"
  },
  "staticData": null,
  "tags": [
    {
      "name": "scheduling-assistant",
      "id": "scheduling-tag-001"
    },
    {
      "name": "calendar-export",
      "id": "export-tag-001"
    }
  ],
  "triggerCount": 0,
  "updatedAt": "2026-01-19T20:02:35.000Z",
  "versionId": "v1.0.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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Scheduling Assistant - 05 Route & Export. Uses executeWorkflowTrigger, googleCalendar, microsoftOutlook. Event-driven trigger; 8 nodes.

Source: https://github.com/jasonv2610/multi-agent-orchestration-architecture/blob/main/examples/scheduling-assistant/workflows/05_route_export.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Gmail-Calendar. Uses executeWorkflowTrigger, postgres, googleCalendar, httpRequest. Event-driven trigger; 12 nodes.

Execute Workflow Trigger, Postgres, Google Calendar +1
AI & RAG

Scheduling Assistant - 04 Conflict Scan. Uses executeWorkflowTrigger, googleCalendar. Event-driven trigger; 9 nodes.

Execute Workflow Trigger, Google Calendar
AI & RAG

Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.

Tool Think, Tool Calculator, Agent Tool +18
AI & RAG

2582. Uses gmail, googleCalendar, lmChatOpenAi, informationExtractor. Event-driven trigger; 61 nodes.

Gmail, Google Calendar, OpenAI Chat +5
AI & RAG

Actioning Your Meeting Next Steps Using Transcripts And Ai. Uses lmChatOpenAi, httpRequest, googleDrive, manualTrigger. Event-driven trigger; 28 nodes.

OpenAI Chat, HTTP Request, Google Drive +5