For organizations building an active professional community, LinkedIn is more than a place to publish updates. It is also an important channel for understanding audience growth, page visibility, and the way people discover an organization's work. But when several organization pages or regional chapters need to be monitored, collecting and presenting these insights manually every week can become repetitive and time-consuming.
To make this process more consistent, Lurantech developed a LinkedIn Analytics Automation solution for Women in AI (WAI). The solution brings together LinkedIn analytics, scheduled cloud execution, automated Excel reporting, and email delivery. Instead of asking team members to repeatedly visit different analytics screens and prepare spreadsheets, the workflow produces a consolidated report and sends it to the designated stakeholders every Friday.
This article explains the business problem, the high-level architecture, how the automation works, and the practical considerations involved in building a similar reporting workflow. The focus is on the approach and lessons learned rather than application source code or private configuration.
The Challenge: Turning Multiple LinkedIn Analytics Views into One Consistent Report
When an organization manages multiple LinkedIn pages, the reporting task is not limited to checking one follower count. Teams may need to compare growth across pages, understand how many people are visiting, distinguish organic and paid follower acquisition, and identify whether visitors are using mobile or desktop devices.
Collecting this information manually every week creates several challenges:
- Repeated manual effort: Team members need to open multiple pages, review different analytics sections, and copy figures into a shared report.
- Inconsistent reporting: Manual spreadsheets can use different date ranges, formats, or metric definitions, making comparisons difficult.
- Limited visibility: Raw numbers in separate screens do not always make it easy to compare chapters or spot changes in performance.
- Delayed distribution: Once the data is collected, someone still needs to format the report and email it to the relevant people.
The goal was to create a repeatable process that collects the required information, organizes it into a readable report, and distributes it on a predictable schedule.
Solution Overview: An Automated LinkedIn Reporting Pipeline
The automation follows a simple sequence: authenticate with LinkedIn, identify the organization pages available to the authorized account, retrieve analytics for the reporting periods, prepare an Excel workbook, and send the completed report by email.
The solution uses a combination of Node.js for the automation logic and AWS services for scheduled execution, deployment storage, and email delivery.
- LinkedIn API: Provides authorized access to organization-level follower and visitor analytics.
- Node.js: Coordinates authentication, data collection, calculations, workbook creation, and email preparation.
- Amazon S3: Stores the packaged application ZIP used when deploying or updating the Lambda function.
- AWS Lambda: Runs the reporting workflow without requiring a continuously running server.
- Amazon EventBridge / CloudWatch scheduling: Triggers the Lambda function automatically every Friday.
- Amazon Simple Email Service (SES): Sends the generated Excel report as an email attachment to the configured WAI recipients.
Importantly, S3 is used here to store the deployment package. The generated Excel workbook is prepared during the Lambda execution and attached to the outgoing email.
How the Automation Works: From Data Collection to Email Delivery
1. Securely connect to LinkedIn
The workflow begins by obtaining a valid access token using the application's authorized OAuth configuration. A refresh-token-based process helps the scheduled job obtain a fresh access token when it runs, rather than depending on a developer to manually provide a new token for every report.
The LinkedIn account and application must have the permissions and approved API access required for the organization data being requested. The automation only works with data available to that authorized integration.
2. Identify the organization pages to report on
After authentication, the workflow retrieves the organization pages that the connected account is authorized to administer. This allows the report to cover multiple eligible pages from one scheduled run instead of requiring a separate manual process for each page.
For every eligible page, the system collects the analytics needed for the reporting workbook. This makes it possible to review performance at both an individual-page level and across the wider organization.
3. Collect weekly and rolling 30-day analytics
The reporting process gathers two complementary views of performance:
- Weekly view: A rolling seven-day reporting window helps stakeholders review recent follower gains and page visitor activity.
- Monthly view: A rolling 30-day window provides a broader view of growth and helps reveal patterns that may not be obvious in a single week.
The collected follower information includes organic and paid gains, combined follower growth, and the current total follower count. Visitor information includes total page views, unique page views, selected page-section views, and mobile-versus-desktop activity.
The reporting window is deliberately aligned to completed data periods rather than relying on the newest, potentially incomplete reporting days. This helps make week-to-week comparisons more consistent.
4. Consolidate and organize the data
Once the analytics have been collected for the eligible pages, the workflow normalizes the results into a consistent structure. It calculates totals such as combined organic and paid follower gains and aggregates visitor figures for each reporting period.
This stage is important because a collection of API responses is not yet a useful management report. The data needs consistent labels, date ranges, metric definitions, and a layout that makes comparisons straightforward.
5. Generate a presentation-ready Excel report
The automation uses ExcelJS to create the workbook and a chart-rendering library to produce visuals that are embedded into the spreadsheet. The report is designed to provide both a quick overview and more detailed supporting information.
The workbook includes:
- Analytics Dashboard: A consolidated snapshot of key follower and visitor indicators across the organization pages.
- Weekly Insights: A page-by-page view of recent follower gains, page views, unique visitors, and device activity.
- Monthly Insights: A rolling 30-day comparison to help stakeholders understand broader performance trends.
- Chapter Leaderboard: A ranked comparison that makes it easier to identify pages with stronger follower growth.
- Detailed analytics sheets: Supporting data for review, filtering, and further analysis.
- Metrics Guide: Plain-language explanations of the key measurements used in the report.
Visual elements such as KPI cards, trend lines, comparison charts, and a device-mix chart make the workbook easier to scan. Stakeholders can start with the dashboard and then move into the detailed sheets when they need more context.
Making the Report More Useful: Metrics That Tell a Story
A useful analytics report should explain more than whether a number went up or down. It should help readers understand what changed and where they may want to investigate further.
- Organic follower gains: Help show growth that was not attributed to paid follower acquisition.
- Paid follower gains: Help distinguish growth attributed to paid activity.
- Total followers: Provide a current audience-size reference for each organization page.
- Total page views: Show how often pages were viewed, including repeat views.
- Unique page views: Provide a view of distinct visitors within the reporting period, as defined by LinkedIn's analytics.
- Mobile and desktop views: Indicate how page audiences access the organization's presence.
- Weekly versus monthly comparisons: Put short-term movement in context with a longer reporting window.
These metrics should be interpreted together. For example, an increase in page views alongside steady follower growth may be a useful signal for the team to investigate which content or campaigns are bringing people to the page. The report supports that analysis; it does not automatically prove what caused a change.
AWS Setup: Running the Workflow Without a Dedicated Server
One of the practical advantages of this implementation is that the reporting job does not need a server running all week. AWS Lambda executes the application when it is triggered, which makes it suitable for a periodic task such as weekly reporting.
Package and store the application in Amazon S3
The Node.js application and its required dependencies are packaged into a deployment ZIP. That ZIP is uploaded to an Amazon S3 bucket, and the Lambda function is configured to use the package from S3. When the application is updated, a new deployment package can be uploaded and used for the next deployment.
Configure the AWS Lambda function
The Lambda function contains the application entry point and runs the reporting workflow when invoked. Its configuration needs to include a compatible Node.js runtime, sufficient memory and timeout for the volume of pages being processed, and permission to read the deployment package and send email through SES.
LinkedIn application settings and AWS configuration should be provided through protected environment configuration or a dedicated secrets-management service. Sensitive values should never be hard-coded into the application or published in a blog, repository, or deployment guide.
Schedule the job for every Friday
An AWS scheduled rule (using the EventBridge scheduling capabilities commonly associated with CloudWatch Events) invokes the Lambda function every Friday. This removes the need for someone to remember to start the report manually.
When configuring the schedule, confirm the intended time zone and the UTC interpretation of the schedule expression. Also consider retries, failure notifications, and monitoring so that a missed or unsuccessful run can be investigated.
Send the report through Amazon SES
After the workbook has been generated, the application prepares an email with the Excel file attached and sends it through Amazon SES. The sender identity must be verified in the SES region being used, recipients and sending limits must be configured appropriately, and the Lambda execution role or credentials must have the necessary sending permissions.
For the WAI workflow, the report is distributed automatically to the six configured members of the organization. The recipient list is managed as configuration, so it can be updated without publishing addresses in application code or public documentation.
Security and Reliability Considerations
Automating a reporting workflow also means taking responsibility for the credentials, permissions, and reliability of each connected service. A production-ready implementation should consider the following practices:
- Protect credentials: Keep LinkedIn client secrets, refresh tokens, and AWS credentials out of source control. Prefer AWS Secrets Manager or Systems Manager Parameter Store for sensitive values where appropriate.
- Apply least-privilege access: Give the Lambda execution role only the permissions required for deployment access, logging, and email delivery.
- Monitor scheduled executions: Use CloudWatch Logs and metrics to review execution duration, failures, and unexpected changes in the reporting process.
- Handle API limits and failures: Account for LinkedIn API permissions, rate limits, temporary service errors, and incomplete responses.
- Verify report delivery: Treat workbook generation and successful email delivery as separate steps, and make sure a delivery failure is visible to the support team.
- Validate reporting periods: Check date boundaries, time zones, and metric definitions before comparing results between reporting cycles.
- Protect the generated report: Review who receives the attachment and avoid making report files or deployment artifacts publicly accessible.
These safeguards help turn a working script into a maintainable automation service. Exact AWS permissions, runtime settings, and LinkedIn access requirements will depend on the organization's account and deployment environment.
Business Benefits: Less Manual Reporting, More Time for Decisions
The main value of this automation is not simply that an email is sent every Friday. It is that the repetitive collection and formatting work is handled consistently, leaving the team with a report that is ready to review.
- Reduced manual work: The team no longer needs to gather the same analytics from multiple pages and assemble a spreadsheet each week.
- Consistent reporting: Standard date windows, labels, and metric definitions make recurring reports easier to compare.
- Centralized visibility: Stakeholders can review multiple organization pages in one workbook.
- Faster review: Dashboards and charts make key changes easier to identify before exploring detailed data.
- Predictable distribution: A Friday schedule provides a recurring reporting routine for the designated team members.
- Room to grow: The workflow can be extended with additional metrics, alerts, dashboards, or integrations as reporting needs evolve.
Lessons for Building Similar Analytics Automations
This project illustrates a reusable pattern for many operational reporting needs: connect to an authorized data source, collect information on a schedule, transform it into a reader-friendly format, and distribute it to the people who need it.
When building a similar solution, start by agreeing on the questions the report should answer. Choose a small set of meaningful metrics, define the reporting periods, and decide who should receive the output. Then design the automation around secure authentication, clear error handling, and an understandable report layout.
It is also worth keeping the reporting layer separate from the data-collection process. That makes it easier to change the workbook design without rewriting the LinkedIn integration, or to use the same collected data in a dashboard or another reporting channel later.



