## Introduction
For startups and small to medium-sized teams, maintaining an up-to-date internal user directory is key to efficient communication and streamlined operations. SaaS platforms like Airtable offer user directory features that allow teams to build and maintain internal team or member lists. However, these services come with subscription costs that scale with usage and team size. For automation engineers and CTOs looking to reduce costs without sacrificing functionality, n8n provides a powerful alternative through automation workflows that integrate various tools and streamline the user directory management process.
In this technical guide, we will build a comprehensive user directory automation using n8n that can replace Airtable’s User Directory feature. This workflow will pull data from Google Sheets, enrich with Slack user information, and update a centralized digital directory accessible internally (e.g., via Google Docs or a Company Wiki). This solution benefits operations teams, HR departments, and automation specialists by automating team list updates, reducing manual overhead, and eliminating Airtable subscription costs.
—
## What Problem Does This Automation Solve?
Teams often require a centralized, accurate, and searchable user directory that includes relevant information such as names, roles, contact information, and Slack handles. Maintaining such a directory manually or by using an expensive SaaS solution can be cumbersome and costly. Our n8n automation mitigates these issues by:
– Automatically syncing employee data from existing data sources (Google Sheets)
– Enriching the directory with Slack profile information
– Consolidating the user list into a single, easy-to-access location without recurring SaaS fees
– Allowing easy customization and expansion as the organization scales
Beneficiaries include HR managers, team leads, and automation engineers seeking robust internal tools without the overhead cost.
—
## Tools and Services Integrated
– **n8n:** The automation workflow platform orchestrating data flow and transformations.
– **Google Sheets:** Source of employee master data (name, email, role, department).
– **Slack API:** Used to fetch user profile details such as Slack ID, display name, and status.
– **Google Docs or Confluence (optional):** Destination to output the formatted user directory for internal use.
—
## Workflow Overview: From Trigger to Output
1. **Trigger:** Manual or scheduled trigger in n8n (e.g., daily or on-demand).
2. **Fetch Data:** Pull employee list from a Google Sheets spreadsheet.
3. **Fetch Slack User Details:** For each employee email, query the Slack API to get profile details.
4. **Data Merge:** Combine Google Sheets data and Slack profile data.
5. **Format Directory:** Create a structured user directory in markdown or HTML format.
6. **Output:** Update or create a document in Google Docs or push the formatted directory to a company wiki.
—
## Step-by-Step Node Breakdown
### 1. Trigger Node
– Use the **Cron** node in n8n to schedule the workflow on a daily or weekly basis.
– Alternatively, use the **Webhook** node for manual triggering.
### 2. Google Sheets Node – Read Employee Data
– Configure the **Google Sheets** node to:
– Connect with your Google account.
– Select the specific spreadsheet and worksheet containing team data.
– Retrieve all rows (Name, Email, Role, Department).
### 3. Slack Node – Fetch User Profiles
– Iterate over each entry in the spreadsheet using the **SplitInBatches** node for efficiency and rate limiting.
– For each email:
– Use the **HTTP Request** node to call Slack’s [users.lookupByEmail](https://api.slack.com/methods/users.lookupByEmail) API endpoint.
– Provide the employee email as a query parameter.
– Extract relevant fields such as Slack user ID, display name, avatar URL, and status.
– Handle possible errors when user is not found (Slack API returns user_not_found).
### 4. Data Merge Node – Combine Sheet and Slack Data
– Use the **Set** and **Merge** nodes to:
– Merge Slack profile details with corresponding rows from Google Sheets.
– Include fallback logic when Slack data isn’t available.
### 5. Format Directory – Create Structured Output
– Use the **Function** node to:
– Iterate over merged data.
– Generate markdown or HTML formatted strings containing user information (example below).
“`javascript
return [
{
json: {
directory: mergedData.map(user => `- **${user.name}** (${user.role}) – Email: <${user.email}> – Slack: @${user.slackDisplayName || ‘N/A’}`).join(‘\n’)
}
}
];
“`
### 6. Update User Directory Document
– Use the **Google Docs** node or HTTP API to update an internal document accessible to the team.
– Alternatively, push data to a wiki or intranet via API.
—
## Common Errors and Tips
– **Slack API Rate Limits:** Use **SplitInBatches** with reasonable batch size (e.g., 10 users) and introduce delays to avoid hitting rate limits.
– **Missing Slack Users:** Handle API errors gracefully and log users without Slack profiles.
– **Google Sheets API Quotas:** Cache data where possible and paginate large datasets.
– **Data Consistency:** Ensure the source spreadsheet is up-to-date; consider triggering workflow based on sheet changes.
– **Authentication Issues:** Store credentials securely in n8n and rotate tokens as needed.
—
## How to Adapt and Scale
– **Add More Data Sources:** Integrate an HRIS system or Active Directory for more comprehensive user data.
– **Enhanced Outputs:** Export into CSV, JSON, or push to a CRM.
– **Self-Service:** Create a lightweight web UI using n8n webhook responses to query user directory dynamically.
– **Notifications:** Add a Slack notification node to alert HR teams when changes occur.
– **Role-Based Views:** Implement filters in the formatting step to generate team-specific or department-specific directories.
—
## Summary
By leveraging n8n’s flexible automation platform together with Google Sheets and Slack APIs, you can effectively replace Airtable’s User Directory feature at a fraction of the cost. This workflow automates the retrieval, enrichment, and publishing of internal team lists, freeing up operational resources and enhancing data freshness. It also provides a scalable base for complex directory management as your organization grows.
### Bonus Tip
For teams heavily invested in Slack, consider adding presence or status monitoring by expanding the Slack API calls to track availability dynamically. This can enrich the user directory with real-time information useful for everyday collaboration.
—
This approach empowers startups and automation teams to build customized, efficient internal tools without recurring SaaS expenses, using n8n’s open and extensible automation framework.