Esprezzo Blog

How to analyze cross-chain activity with Notion Charts

Written by Esprezzo Team | September 11, 2024

Last month, Notion — the popular productivity and "all-in-one workspace" tool — introduced charts, a long-awaited feature that opens up new possibilities for data visualization and analysis within the platform.

In this guide, we'll show you how to create a self-updating dashboard for visualizing and monitoring USDC activity across multiple blockchains: Ethereum, Arbitrum, Polygon, Base, and Optimism. This dashboard will provide real-time insights into USDC movement, providing another way to identify trends and analyze cross-chain activity.

Here’s a preview of the dashboard we’ll be creating today:

Here's how we'll build our dashboard:

  • Use Notion to create the dashboard and charts
  • Use Dispatch to create data streams (Patches) that listen for specific on-chain activity & “dispatch” that activity via Zapier to Notion
  • Use Zapier to format and send the on-chain data from Dispatch to Notion

What you’ll need

To start sending on-chain USDC activity data to Notion, you'll need:

Note: While Zapier offers a free plan, the webhooks feature used in this guide requires a paid plan. Consider starting with a trial to test the setup before committing to a subscription.

📌 Related reading

For those of you interested in similar setups using different tools, we recommend our guide: Automatically log on-chain activity to Google Sheets without code.

Get organized

Because we'll be switching between Dispatch, Zapier, and Notion to set up this workflow, it's a good idea to organize your browser tabs. We recommend using one browser window for Dispatch, another for Zapier, and a third for Notion.

Setting up your Notion dashboard

Follow these steps to create and configure your Notion dashboard:

Create a new database

  1. Open Notion and create a new page for your dashboard.
  2. Click the "+ New" button and select "Inline Database - Full page".
  3. Name your database "USDC Monitor" or something similarly descriptive.

Set up database columns

Set up the following columns:

  • Contract Name (rename the default "Name" column)
  • Event/Function
  • Network
  • Contract Address
  • Transaction (TX) Hash
  • Block Number
  • Block Explorer TX Link

Now your Notion database is ready to receive data. Keep this tab open.

Next, we'll set up Dispatch to start collecting the on-chain data we need for our dashboard.

Creating your Patch in Dispatch

Start by logging into your Dispatch account. If you're new to Dispatch, sign up for an account.

Choose Trigger and Action

Choose the "Smart contract activity" Trigger and "Webhook" as the action.

What is a Patch?

A "Patch" in Dispatch is an on-chain data stream or automated workflow. It consists of two main components:

  • Trigger: The on-chain activity you want Dispatch to listen for.
  • Action: What happens when the Trigger condition is met.

In our case, we'll be setting up a Patch to monitor USDC activity and send the data to a webhook.

Select network and “USDC”

To start, we’ll choose the “Base” network (we’ll add the others later). Once you’ve chosen the network, search and select “USDC” in the smart contract section.

Select events and functions

For example, here are the events we selected:

  • Approval
  • AuthorizationCanceled
  • AuthorizationUsed
  • Blacklisted
  • BlacklisterChanged
  • Burn
  • MasterMinterChanged
  • Mint
  • MinterConfigured
  • MinterRemoved
  • OwnershipTransferred
  • Transfer
  • Unblacklisted

You don’t have to select this many events, but it’s cool to see the different activities happening in your Notion charts. Please keep in mind that you should select the same events and/or functions for all networks.

Tip: If you're just starting out, consider focusing on 'Transfer', 'Mint', and 'Burn' events to track the most common USDC activities.

Click "Continue" to move to the Action setup.

Configure webhook

  1. Ensure 'Webhook' is selected as the Action.
  2. Click 'Continue' to configure the Action Details.
  3. Choose an existing webhook or add a new one.
  4. Keep this tab open; you'll need to paste the Zapier webhook URL here later.

After completing these steps, your Dispatch Patch will be ready to monitor USDC activity. In the next section, we'll set up Zapier to link this data to your Notion dashboard.

Creating a Zap to send on-chain activity to Notion

First, let’s get Zapier ready to connect with your Notion database.

Create a new Zap

To begin integrating your data flow, open a new tab, log into Zapier, and click "Create Zap" to start setting up the automation that will link Dispatch with your Notion database. Name your Zap something descriptive like 'Dispatch to Notion USDC Tracker' to easily identify it later.

Set up Webhook Trigger

In the Trigger section of Zapier, select 'Webhooks by Zapier' to catch data from Dispatch. Then, choose "Catch hook" as the Trigger event.

Click 'Continue' to proceed.

Copy webhook URL

  1. Locate the custom Webhook URL provided by Zapier.
  2. Copy this URL - you'll need it in the next section.

Note: This URL is unique to your Zap. Keep it secure, as anyone with this URL can potentially send data to your Zap.

Prepare for next steps

  • Keep this Zapier tab open.
  • Switch back to your Dispatch tab.
  • We'll use the Webhook URL you just copied to connect Dispatch to Zapier.

Connecting Dispatch to Zapier

To link Dispatch with Zapier, follow these steps to ensure your data flows correctly.

Add webhook to Dispatch

Return to Dispatch to complete the setup and ensure the webhook is configured correctly. You should be on the 'Action Details' page of your Patch setup.

Make sure you’ve copied the Zapier webhook URL from your Zapier account. Paste this URL into the "Webhook URL" field in Dispatch, and choose a descriptive name for your webhook to easily identify it later.

Send a test payload to Zapier

Click the 'Test' button in Dispatch to send a test payload to Zapier. This verifies that Dispatch is properly connected to Zapier. You should see a confirmation message indicating that the data was sent successfully. If you don’t see this message, check that the Zapier webhook URL is correctly pasted and that your internet connection is stable.

Finalizing Zapier setup

To wrap things up, ensure the webhook is properly connected and configure the action in Notion.

Verify webhook connection

Return to your Zapier tab and click "Test trigger".

If successful, you'll see the sample webhook payload with example data from Dispatch.

If you don't see the payload, double-check your Dispatch setup and try sending the test payload again.

Click "Continue with selected record".

Configure Zapier Action for Notion

  1. For the Zapier Action, search for and select "Notion". This step sets up what happens in Notion when your Zap is triggered.
  2. Choose "Create database item" as the Action event. This will add a new entry to your Notion database for each trigger event.

Connect Notion account and select database

  1. Connect your Notion account to Zapier if you haven't already.
  2. When prompted, click "Select pages" and choose the page with your "USDC Monitor" database.
  3. Select the "USDC Monitor" database for your Zap.

Map data fields

Map the incoming data from Dispatch to the appropriate Notion database properties:

  • Contract Name → Details Contract Name
  • TX Hash → Details Tx Hash
  • Block # → Details Block Number
  • Block Explorer Tx Link → Details Block Explorer Tx Link
  • Network → Details Network
  • Contract Address → Details Contract
  • Event → Details Signature Name

When you’re done mapping the data, your Zap setup should look something like this:

Tip: Ensure that the field names in your Notion database match exactly with the ones you're mapping in Zapier.

Test and activate the Zap

  1. In Zapier, click "Test step" to send test data to your Notion database.
  2. Check your Notion database to verify that the test data appears correctly.
  3. If everything looks good, click "Publish" to activate your Zap.

Activating your Patch

Return to Dispatch and give your Patch a name (e.g., "USDC activity on Base").

Click the "Turn Patch on" button.

Customizing your Notion dashboard

Once both your Zap and Patch are activated, your Notion database should start populating with data.

Create visualizations using Notion Charts

1. In your Notion database page, type “/” and type “chart”.

2. Create charts to see:

  • USDC volume across all networks
  • USDC activity distribution by network

Tip: Experiment with different chart types (bar, line, pie) to find the best visualization for your data.

Advanced features and ideas

Now that you've got the basics down, let's explore some cool ways to take your cross-chain monitoring to the next level:

Create additional Patches

Set up new Patches for other networks like Arbitrum, Polygon, Ethereum, and Optimism.

Tip: You can easily copy the existing Patch and change the network and Patch name for each new setup.

Use the same Webhook

Apply the same webhook URL for all Patches to ensure data from every network flows into your Notion database seamlessly.

Customize your Notion dashboard

Create various views and charts in Notion to compare USDC activity across all the networks you're monitoring. This will help you visualize and analyze cross-chain transactions effectively.

Closing thoughts

By using Dispatch to create data streams for on-chain activity, you've built a powerful USDC monitoring system without writing complex queries or creating subgraphs. This approach not only saves time but also allows for quick iterations as your needs evolve.

We encourage you to experiment with this dashboard and customize it to fit your specific requirements. Consider monitoring for balance changes, tracking other tokens, or integrating this data with other tools in your workflow.

Interested in giving Dispatch a try?

If you found this tutorial helpful and want to explore more automations, sign up for a free Dispatch account.