{
  "id": "7MsntYI0G3JAxOp1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Provision new employee accounts to Google Workspace, Slack, Jira, and Salesforce",
  "tags": [],
  "nodes": [
    {
      "id": "9a96c5fe-35ac-417b-9636-02c089bc18f3",
      "name": "New Hire Form",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1744,
        -160
      ],
      "parameters": {
        "path": "new-hire",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d7eb3436-93d1-43f1-96b5-be02c056dec2",
      "name": "\u2699\ufe0f CONFIGURATION",
      "type": "n8n-nodes-base.set",
      "position": [
        -1520,
        -160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "Slack_Channel_ID",
              "type": "string",
              "value": "C12345678"
            },
            {
              "id": "id-2",
              "name": "Default_Password",
              "type": "string",
              "value": "Welcome2025!"
            },
            {
              "id": "id-3",
              "name": "Welcome_Email_Subject",
              "type": "string",
              "value": "Welcome to the team!"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "d6cbcd7c-326c-43be-8963-f97eefa691b9",
      "name": "Create G-Suite Account",
      "type": "n8n-nodes-base.gSuiteAdmin",
      "position": [
        -1072,
        -352
      ],
      "parameters": {
        "lastName": "={{ $json.name.split(' ')[1] || '' }}",
        "password": "={{ $json.Default_Password }}",
        "username": "={{ $json.email.split('@')[0] }}",
        "firstName": "={{ $json.name.split(' ')[0] }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "3c69fd90-240f-493a-86ca-aa79f4a1d516",
      "name": "Invite to General Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1072,
        -160
      ],
      "parameters": {
        "userIds": [
          "={{ $json.email }}"
        ],
        "resource": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.Slack_Channel_ID }}"
        },
        "operation": "invite"
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "b4ff05b2-c7c2-4514-9ba8-9d9b9a3a8ebc",
      "name": "Check Department",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1296,
        144
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Engineering",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.department }}",
                    "rightValue": "Engineering"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Sales",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.department }}",
                    "rightValue": "Sales"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "e4121c00-a6eb-4884-a2dd-80e4e5241b82",
      "name": "Create Jira User",
      "type": "n8n-nodes-base.jira",
      "position": [
        -1072,
        48
      ],
      "parameters": {
        "resource": "user",
        "username": "<UNKNOWN>",
        "displayName": "={{ $json.name }}",
        "emailAddress": "={{ $json.email }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a296eadc-33a0-4fc9-9695-9d0a857a23c7",
      "name": "Create Salesforce User",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        -1072,
        240
      ],
      "parameters": {
        "userId": "={{ $json.email }}",
        "resource": "user"
      },
      "typeVersion": 1
    },
    {
      "id": "4c18aa2b-b989-4e5b-b765-d0a1934039b4",
      "name": "Sync All Tasks",
      "type": "n8n-nodes-base.merge",
      "position": [
        -848,
        -96
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.2
    },
    {
      "id": "5a8ae0f9-a971-44af-94c0-cd60e978f6b2",
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -624,
        -64
      ],
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "message": "=Hi {{ $json.name }},\n\nWelcome to the team! Your accounts have been created.\n\nStart Date: {{ $json.start_date }}\nDepartment: {{ $json.department }}\n\nBest regards,\nHR Team",
        "options": {},
        "subject": "={{ $json.Welcome_Email_Subject }}",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bfd3e6c3-5791-4570-8dd3-2170e41dc3a0",
      "name": "Main Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2384,
        -464
      ],
      "parameters": {
        "width": 460,
        "height": 781,
        "content": "## \ud83d\ude80 Orchestrate Employee Onboarding\n\nStreamline HR & IT operations by automatically provisioning accounts for new employees based on their department.\n\n## \u2699\ufe0f How it works\n1. **Receives Data**: Triggers when a new hire form is submitted via Webhook.\n2. **Configuration**: Sets global variables (default passwords, channel IDs).\n3. **Parallel Provisioning**:\n   - Creates **Google Workspace** account.\n   - Invites user to a general **Slack** channel.\n4. **Conditional Logic**: Checks the department.\n   - **Engineering** \u2192 Creates **Jira** user.\n   - **Sales** \u2192 Creates **Salesforce** user.\n5. **Sync & Notify**: Waits for all tasks to complete, then sends a welcome email via Gmail.\n\n## \ud83d\udee0\ufe0f How to set up\n1. **Credentials**: Configure credentials for Google Workspace (Admin), Slack, Jira, Salesforce, and Gmail.\n2. **Config Node**: Double-click the `\u2699\ufe0f CONFIGURATION` node to set your specific `Slack_Channel_ID` and default password policy.\n3. **Webhook**: Use the Production URL for live forms, or Test URL for development.\n\n## \ud83d\udce6 Requirements\n- Admin access to G-Suite, Slack, Jira, and Salesforce."
      },
      "typeVersion": 1
    },
    {
      "id": "a39d5373-5194-491f-92f9-bbf6b8b30fd7",
      "name": "Step 2 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -480
      ],
      "parameters": {
        "color": 7,
        "width": 311,
        "height": 895,
        "content": "###  Parallel Provisioning\nExecutes common tasks (G-Suite & Slack) simultaneously for efficiency."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4c85fd6a-d71c-4014-ac43-70980be242b6",
  "connections": {
    "New Hire Form": {
      "main": [
        [
          {
            "node": "\u2699\ufe0f CONFIGURATION",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync All Tasks": {
      "main": [
        [
          {
            "node": "Send Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Department": {
      "main": [
        [
          {
            "node": "Create Jira User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Salesforce User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Jira User": {
      "main": [
        [
          {
            "node": "Sync All Tasks",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "\u2699\ufe0f CONFIGURATION": {
      "main": [
        [
          {
            "node": "Create G-Suite Account",
            "type": "main",
            "index": 0
          },
          {
            "node": "Invite to General Channel",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Department",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create G-Suite Account": {
      "main": [
        [
          {
            "node": "Sync All Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Salesforce User": {
      "main": [
        [
          {
            "node": "Sync All Tasks",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Invite to General Channel": {
      "main": [
        [
          {
            "node": "Sync All Tasks",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}