Skip to main content

Automating Creating Daily PayPal Transaction Reports

This tutorial guides you through creating a mcp.run Task that creates a PayPal transaction report and emails it to you. It will list all transactions on the previous day and will avoid including your account number in the email. Once it's working, we'll schedule it to run at the start of every day.

What You'll Build

This Task will:

  • Load transaction data from your PayPal
  • Create a transaction report, taking care to avoid including your account number in it.
  • Email you the transaction report
  • Run automatically on a daily schedule

For a video walkthrough:

Prerequisites

Before starting, ensure you have:

  • A PayPal Account to load transaction data from
  • A mcp.run Account to create your profile and task
    • Currently requires either a GitHub or Google Account to authenticate
  • An email address you'd like to send your transaction reports to

Required Tools

This tutorial requires the following mcp.run servlets:

Before installing, we recommend creating a profile for your task:

  1. Go to your Tool Profiles
  2. Click Add Profile and set a name such as daily-transaction-report

Install each servlet by:

  1. Visiting the respective URLs
  2. Clicking the 'Install' button
  3. Configuring the required settings, including setting the desired profile
  4. Verifying they appear in your install profile such as default or daily-transaction-report
built-in servlets

For convenience, the built-in servlets such as the email sender can also be installed and uninstalled via the toggle buttons on your tool profile pages.

Create Your PayPal Transaction Report Task

Now we will create our Task instructions/prompt. Don't worry you don't need to pay now, mcp.run starts you off with plenty of free credits to get started and run this task.

Click the "Tasks" button in the navigation header of the webpage, and you're ready to go.

Give It a Name

Use something recognizable, like "Daily Transaction Report", in the title box. This can't be edited later, so you'll need to delete your Task and create a new one if you don't like the name you pick.

Set The Instructions

Each task requires instructions to follow. Copy & paste the following into the Instructions box:

Email YOUR_EMAIL_HERE on yesterday's transactions

THE EMAIL SHOULD NOT CONTAIN MY ACCOUNT NUMBER!

The email should only contain the transaction summary, do not offer to provide more information or check a different date range, or anything else: you emailed this report and the user has no way to replying back to you.

Be sure to replace YOUR_EMAIL_HERE with the email you'd like to send the transaction report too.

Task Parameters

If you wanted YOUR_EMAIL_HERE to be configurable or avoid hard coding it in your prompt, you could instead add {{ email }} instead and configure the parameters, {"email":"YOUR_EMAIL_HERE"}, when running your task.

Assign a Profile

Every Task needs an attached Profile that contains the tools/APIs you want the Task to use. Be sure that your selected profile has the PayPal and email sender servlets installed properly.

The default profile should be pre-selected. You can use any other Profile, e.g. daily-transaction-report, if you have created others and installed these tools there instead.

For help configuring and installing these, please refer to this section of the docs.

Select a Model Provider

Give the Task access to an AI provider of your choice, or use mcp.run's free credits using the default credits provider. If you're just getting started, use the credits provider - you can change this later if needed.

Save Your Task

Click the Create Task button, and your transaction report task is now set up.

Run Your Task Manually

Let's test the task by running it manually first:

  1. Navigate to your newly created task
  2. In the task interface, you'll see a "Run Task" button
  3. If you used a parameter to set the email address, before running, enter the email address you'd like to send the transaction report to in the "email" variable field
  4. Click "Run Task"

The task will begin running, and you can monitor its progress in the task interface. When complete, you'll receive:

  1. An email with a transaction report
  2. A summary in the task completion message

Schedule Your Task to Run Daily

Now that you've verified the task works correctly, let's set it up to run at the start of every day:

  1. In your task interface, navigate to the "Triggers" tab
  2. In the "Schedule" section, toggle the schedule option to enable it
  3. Configure the schedule:
    • Frequency: start of every day
    • Timezone: Select your time zone
  4. If you used a parameter to set the email address, in the "Variables" section, set your email:
  • {"email":"YOUR_EMAIL_HERE"}
  1. Click "Update" to save your schedule

Your task is now scheduled! At the start of every day (or your configured time), the system will automatically:

  1. Create a new PayPal transaction report
  2. Email it
  3. Avoid including your account number in the email

Customizing Your PayPal Transaction Report

You can customize this task in several ways:

  • Change the email it sends to, either by changing the prompt or variable
  • Modify the instructions to include or exclude information
  • Include other servlets to correlate or combine with other information
  • Update the scheduling to run more or less frequently

Support

If you encounter issues or need help, please visit our support page for additional assistance.