PayPalAttio

Add PayPal invoiced customers to Attio

A PayPal + Attio agent flow

Bill someone through a PayPal invoice and they exist in PayPal but nowhere in the CRM, so the people working accounts in Attio never see who just paid. They want each invoiced customer to land as a person record, with the email and the amount, and they don't want to type it. The agent lists invoices with list_invoices, reads the recipient on each, and upserts a matching record into Attio with upsert-record. PayPal answers the call rather than pushing. The read runs on a schedule, and only invoices the agent hasn't processed turn into CRM records.

The flow

PayPallist_invoices

Lists invoices with pagination and filtering options.

Attioupsert-record

Creates or updates a record by matching attributes such as email or domain.

Step by step

  1. Pick the window and the object

    Decide the invoice window the agent reads, for instance sent or paid invoices from the last day, and the Attio object, usually people, that each maps to.

  2. Read the invoices

    The agent calls list_invoices for the window, then reads each invoice's recipient with get_invoice to get the billing name, email, and amount that the list summary alone may not carry.

  3. Upsert into Attio

    For each invoiced customer the agent calls upsert-record matching on email, so a returning customer updates their existing record rather than creating a duplicate, and a new one is created with name, email, and the invoice amount.

  4. Record what's already synced

    Store each invoice ID the agent processed. Next run it skips invoices already synced, so re-reading the window doesn't repeatedly touch the same record.

Tell your agent

Each morning, list PayPal invoices from the last 24 hours. For each one, read the recipient's name, email, and the amount, then upsert a person record in Attio matching on email, setting the name and a note with the invoice amount and date. Skip invoices you've already synced.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • list_invoices returns invoice summaries; the recipient's email and billing name come from get_invoice. The agent reads the detail per invoice before it has enough to upsert a useful record.
  • upsert-record matches on an attribute like email, so an invoice with no recipient email can't dedupe and may create a thin record. Decide whether to skip those or create a company record from the billing name instead.
  • PayPal paginates invoices. On a wide window the agent walks the pages, and you should cap the first backfill so it doesn't upsert a year of invoices in one run.

Questions

Does it create a duplicate for a repeat customer?
No. upsert-record matches on email, so a customer who's invoiced again updates the record that already exists rather than adding a second one.
Can it map the invoice amount onto the record?
Yes. get_invoice returns the amount, so the agent can write it to an attribute or a note when it upserts, giving sales context on what the customer was billed.