Sellfern provides a ready-made n8n workflow that fetches your weekly analytics and posts a formatted report to Discord or Slack automatically — no code required. Import the workflow template, add your credentials, and your team receives a revenue summary every Monday at 9am.Documentation Index
Fetch the complete documentation index at: https://docs.sellfern.com/llms.txt
Use this file to discover all available pages before exploring further.
What the workflow does
The workflow contains four nodes that run in sequence:- Schedule trigger — fires every Monday at 9:00am
- Get Sellfern Analytics — calls
GET /api/v2/analytics/summary?period=last_7_dayswith your API token - Format Report — transforms the response into a human-readable message with revenue, order count, COGS, gross profit, and margin percentage
- Post to Discord — sends the formatted message to your Discord (or Slack) webhook URL
Prerequisites
- An n8n instance (self-hosted or n8n Cloud)
- A Sellfern API token with the
analytics:readscope - A Discord webhook URL or Slack incoming webhook URL
Importing the workflow
Open the Import dialog
In n8n, go to Workflows in the left sidebar and click + Add workflow, then select Import from file.
Upload the workflow file
Upload
examples/n8n-weekly-report.json from the Sellfern repository. n8n imports all four nodes and their connections automatically.Add your Sellfern API token as a credential
Click the Get Sellfern Analytics node. Under Authentication, create a new Header Auth credential:
- Name:
Authorization - Value:
Bearer sk_live_YOUR_TOKEN
Set your webhook URL
Click the Post to Discord node and set the URL field to your Discord webhook URL. If you are using Slack, replace this node with n8n’s Slack node (or an HTTP Request node posting to your Slack incoming webhook URL) and set the body to
{ "text": "{{$json.content}}" }.Customizing the workflow
Changing the schedule Click the Every Monday 9am trigger node and adjust the day and time. For example, to run every weekday at 8am, settriggerAtWeekday to [1, 2, 3, 4, 5] and triggerAtHour to 8.
Adjusting the report format
Open the Format Report code node. The JavaScript there builds the message line by line from the API response fields (revenue, order_count, cogs, gross_profit, margin_pct). Edit the lines array to add, remove, or reformat any field.
Switching from Discord to Slack
Replace the Post to Discord node with an HTTP Request node pointed at your Slack incoming webhook URL. Change the request body to:
The workflow calls
GET /api/v2/analytics/summary with period=last_7_days. Your Sellfern API token must have the analytics:read scope. You can verify your token’s scopes in Settings → API Tokens.