How to Build a Product Sales Analytics Dashboard: Stripe & Gumroad Sales to Notion
Clear visibility into sales patterns and data offers significant benefits once you've established consistent sales and processes within your business.
At this point, success becomes about refining, iterating, improving, removing, focusing, and finding the optimal formula to deliver the value your customers want.
This automation allows you to centralize and visualize all your sales data in one place. AI can then help extract insights, identify patterns, and clarify the situation—enabling you to make consistently effective decisions.
In this automation, we’re aggregating sales data from Stripe and Gumroad. The sources of sales will depend on your business and the services you use, so this is an example so you can understand what’s possible. You can get the automation templates here.
Prerequisites & Setup
Required tools: Stripe, Gumroad (optional), Notion, Make/n8n
For this automation, you will need a Notion data source to store your sales data. Here is one you can duplicate for your use, or feel free to build your own source and adjust the automations accordingly (i.e., map the data to fill out your specific properties). At a minimum, we need a transaction ID (text), sale date (date), amount (number), and source (select).
Step-by-Step Implementation
Part 1: Setting up the Notion database
You can duplicate a starter Notion database here, or build your own. As I wrote above, the minimum required properties include: transaction ID, sale date, amount, and source. This database will store all the sales data and can become the “single source of truth”.
Part 2: Configuring Stripe webhooks (
checkout.session.completed)Next, we will use Stripe's checkout.session.completed event to retrieve new sales instantly. To set this up, we can use the “Watch Events” module in Make, create a webhook, setup the Stripe account connection (at first, you may use the Stripe Test Mode connection — I explain this in the video), and select the checkout.session.completed event.
This automatically creates a Stripe webhook attached to your account (you can also find this webhook in Stripe, within the dedicated Developer tab). Now the automation is ready to get new sales.
To test, use Stripe test mode and submit a payment link using a test card. If you created the webhook using your Stripe Test Mode connection, the automation will receive the data, so you can see the payload’s (response) structure and correctly map all the fields to the Notion module to create the sale in the database.
Once this is done, you may switch your Stripe webhook and connection to your live account and activate the automation.
Part 3: Building the automation
The second step in the automation is to retrieve the product associated with the checkout session. We do this by making an api call to the checkout session Stripe API endpoint, expanding the “line_items” object, which is not available directly in the webhook response payload (that’s why we make this additional API call).
The API call is GET https://api.stripe.com/v1/checkout/sessions/{{1.object.id}}?expand[]=line_items
where
{{1.object.id}}is mapped from the webhook response, as the ID of the checkout session. This allows us to retrieve line_items (containing the product name) for the checkout session, which we can save in the Notion database for reference and analysis purposes.We test this module by entering a checkout session ID manually (watch the video if you wish to visualize how to do this practically). This way, we have all the data we need to configure the last step in the automation: creating the database item in Notion.
In this final step, we enter the Notion database ID and fill out all the properties with the data from the previous two Stripe modules.
Part 4: Adding Gumroad integration (if applicable)
In the video, I also show how to get sales from Gumroad and add them to the Notion database. If using Make, we create a separate scenario to get Gumroad sales (via the dedicated module available in Make) and then create the Notion database item.
So, this automation is composed of two modules only - first, we get the Gumroad sale, and second, we add the sale data to Notion. All the sales data is directly available in the Gumroad module output, ready to be mapped. We don’t even need to test this module because the response payload is pre-defined (since it’s fixed).
If using n8n, we can add the Gumroad trigger webhook to the same workflow. So, the workflow would have two triggers: Stripe checkout sessions completed and Gumroad new sales. Or we could create two separate workflows (one for Stripe, and one for Gumroad) for a more clear distinction. Both options work.
A draft of the possible workflow in n8n - two triggers, one action
NOTE
If you wish to add past sales to the Notion database, you can create a dedicated one-time automation that handles this process.
For Stripe, you can use the “list payment intents” module, adding to Notion only the “succeeded” ones. If you notice this doesn’t include all your actual sales, consider making an API call to list all completed checkout sessions using the dedicated endpoint.
For Gumroad, use the “List sales” module and the “Create a database item” Notion module to add all the data to Notion. Here is the dedicated Gumroad API endpoint.
Analytics Unlock
Once the automation is live and working, you will unlock interesting analytics capabilities within your workspace. This is especially valuable if you didn’t have such capabilities before, they were scattered across multiple tools, or locked in a clunky and non-user-friendly interface.
First, we can create chart views of the sales data. For example, revenue by day/month/week/year; sales amount by period; sales amount by product; and so on, depending on what you wish to visualize. These graphs, which can also be exported as SVG/PNG very easily, provide a first layer of clear visibility over the sales data, which can inform your decisions for existing products, new products, business lines, and anything else applicable.
Second, Notion AI (available on Business and Enterprise plans) can significantly help with data insights, recommendations, brainstorming, and aiding in determining the right questions to ask about your data, and what possible answers/strategies to consider. This can be very valuable if you are a small business and don’t have a data analytics team doing this job. Notion AI can be an extension of your business, directly impacting the way you think about your sales data and what to do about it. In addition, if you keep other data in your Notion workspace, all that context gets accounted for by AI, which makes the output much more “yours”.
This is one step to consolidating your data and business operations. Only a part of the broader business picture. One step at a time, you can “close the gap” and increasingly build the business you wish to have, increasing its value and/or your enjoyment doing work. The process never ends.
To get the Notion database and/or the automations shown in this post, click here.
Check out more templates here.
If you missed previous similar automation content, check it out via the links below:
Featured products
Resources
Stripe setup: checkout.session.completed, test cards, Dashboard webhooks
Automation and Gumroad: Make, n8n, Gumroad API