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 →
{
"name": "AD Alunos - 3. Boas-Vindas",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 6
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-1700,
300
],
"id": "37f0821c-3236-4bb7-bd45-393bec7d338f",
"name": "Schedule Trigger"
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT\n a.MATRICULA,\n a.NOME_COMPLETO,\n a.EMAIL_PESSOAL,\n 'aluno' + a.MATRICULA + '@exemplo.local' AS EMAIL_INSTITUCIONAL\nFROM [db_automacao].[dbo].[AlunosParaAD] AS a\nJOIN [db_automacao].[dbo].[AutomacaoAD_Log] AS l\n ON a.MATRICULA = l.Matricula COLLATE SQL_Latin1_General_CP1_CI_AS\nWHERE l.Status = 1\n AND l.BoasVindasEnviado = 0\n AND l.Mensagem = 'Usuario criado no AD com sucesso.'\n AND a.EMAIL_PESSOAL IS NOT NULL AND LTRIM(RTRIM(a.EMAIL_PESSOAL)) <> '';"
},
"type": "n8n-nodes-base.microsoftSql",
"typeVersion": 1.1,
"position": [
-1460,
300
],
"id": "a26c462f-ad64-4ff8-93bd-967b6809ee60",
"name": "Buscar Alunos p/ Boas-Vindas",
"credentials": {
"microsoftSql": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"toRecipients": "={{ $json.EMAIL_PESSOAL }}",
"subject": "Bem-vindo(a) \u2014 dados de acesso \u00e0 sua conta institucional",
"bodyContent": "=Ol\u00e1 {{ $json.NOME_COMPLETO }},\n\nSeja bem-vindo(a)!\n\nSua conta institucional j\u00e1 foi criada. Seguem os seus dados de acesso:\n\nE-mail institucional: {{ $json.EMAIL_INSTITUCIONAL }}\nSenha provis\u00f3ria: <SENHA_PROVISORIA>\n\nPor seguran\u00e7a, voc\u00ea dever\u00e1 ALTERAR a senha no primeiro acesso ao seu e-mail institucional.\n\nEm caso de d\u00favidas, entre em contato com o suporte de TI.\n\nAtenciosamente,\nEquipe de TI",
"additionalFields": {}
},
"type": "n8n-nodes-base.microsoftOutlook",
"typeVersion": 2,
"position": [
-1220,
300
],
"id": "dd034730-27a2-49ee-bc4f-988458260745",
"name": "Enviar Boas-Vindas",
"credentials": {
"microsoftOutlookOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "DECLARE @Matricula VARCHAR(50) = '{{ $('Buscar Alunos p/ Boas-Vindas').item.json.MATRICULA }}';\n\nUPDATE [db_automacao].[dbo].[AutomacaoAD_Log]\nSET BoasVindasEnviado = 1,\n DataBoasVindas = GETDATE(),\n DataAtualizacao = GETDATE()\nWHERE Matricula = @Matricula;"
},
"type": "n8n-nodes-base.microsoftSql",
"typeVersion": 1.1,
"position": [
-980,
300
],
"id": "caaf40ff-3f93-4953-bb6a-d862bb1ba5ba",
"name": "Marcar Boas-Vindas Enviado",
"credentials": {
"microsoftSql": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Buscar Alunos p/ Boas-Vindas",
"type": "main",
"index": 0
}
]
]
},
"Buscar Alunos p/ Boas-Vindas": {
"main": [
[
{
"node": "Enviar Boas-Vindas",
"type": "main",
"index": 0
}
]
]
},
"Enviar Boas-Vindas": {
"main": [
[
{
"node": "Marcar Boas-Vindas Enviado",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": true
},
"tags": []
}
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.
microsoftOutlookOAuth2ApimicrosoftSql
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AD Alunos - 3. Boas-Vindas. Uses microsoftSql, microsoftOutlook. Scheduled trigger; 4 nodes.
Source: https://github.com/leoncio90/automacao-ad-alunos/blob/3f0303221a28ee787b2f1993766a1f7d5b40562f/workflows/ad-alunos-3-boas-vindas.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Microsoftoutlook Schedule. Uses mySql, scheduleTrigger, microsoftOutlook. Scheduled trigger; 6 nodes.
Need to keep your finance or operations team updated on missing project costs? This practical automated report workflow does the job without AI — and saves hours weekly. Runs on a weekly schedule Quer
This workflow runs daily at 9 AM to pull unpaid invoices from Microsoft SQL, send staged payment reminder emails via Gmail based on due date timing, update invoice status and an audit log in the datab
This workflow runs every 30 minutes to scan VIP Microsoft Outlook calendars, look up attendee details in Microsoft Entra ID via Microsoft Graph, search SharePoint for related documents, and send a pre
This workflow automates the backup of your self-hosted n8n instance by exporting all workflows and saving them as individual files to a designated OneDrive folder. Each file is timestamped for easy ve