Send Adyen payment links when a HubSpot deal is Ready to Invoice

When a deal moves into your payment stage, we generate an Adyen link, save it to the deal, and email your customer for you.

Agentic Task
AdyenHubSpotGmailSalesFinanceEmail AutomationData Sync
PromptCreate

Trigger: a HubSpot webhook that fires when a deal's stage property (dealstage) changes. The webhook payload gives us the deal ID and the new stage.

The workflow should run as an agent that quietly handles the whole payment-link handoff so a sales rep never has to build a link by hand.

Step 1. Gate on stage. Only proceed if the new stage is in a configured set that means "ready to charge" (defaults: Send Payment, Ready to Invoice). Otherwise stop silently.

Step 2. Load the deal. Call HubSpot Get Deal (operation 3314ca84-0991-487d-ab84-ae728fa05aff) for the deal ID from the webhook. Fetch at minimum: dealname, amount, deal_currency_code, dealstage, and any custom payment_link_url property the org uses. Include associations so we get the primary contact ID. If Get Deal cannot resolve associations directly, fall back to HubSpot Search Deals (operation 1699c943-c219-41e3-99f4-560a70eb2d66) to fetch the same data with associations included.

Step 3. Skip conditions (all silent no-ops, no email, no note):

a) Amount below a configurable minimum (default 50 in the deal's currency). b) A payment_link_url property is already populated on the deal, OR a prior note on the deal already contains an Adyen payment link. If a prior link exists, optionally verify it is still active with Adyen Get Payment Link (operation 1d98037b-3c78-4b93-a6d7-d0547def36d6) before deciding to no-op; if that link is expired, allow generating a new one. c) The deal has no primary contact with an email address.

Step 4. Load the primary contact. Call HubSpot Get Contact (operation fbcb9ff5-910e-47ac-bc08-51023960f996) for the associated contact to retrieve email, firstname, and lastname.

Step 5. Create the payment link. Call Adyen Create Payment Link (operation d3cf2e86-112e-4f9e-8c80-168cf76af80b) with:

amount.value = deal amount converted to Adyen minor units (multiply by 100 for USD/EUR/GBP; use the correct exponent for zero-decimal or three-decimal currencies)

amount.currency = deal_currency_code from HubSpot

reference = the HubSpot deal ID exactly (this is the reconciliation key, do not prefix or mutate it)

merchantAccount = the configured Adyen merchant account for this org

shopperEmail = the primary contact's email

description = the deal name

Step 6. Write the link back to HubSpot. Call HubSpot Create Note (operation eebca9bb-fa33-4c6c-b10e-a57f3045619a) with the returned payment URL and the deal name, associated to the deal ID. If the org has a payment_link_url custom deal property, also call HubSpot Update Deal (operation 46465aa3-faa3-4666-86f9-b5cb7a31b62f) to set that property so the link is visible on the deal record itself.

Step 7. Draft and send the customer email. Compose a short, personalised message to the primary contact that greets them by first name, references the deal by name, states the amount and currency in human-readable form (e.g. EUR 1,250.00, not 125000 minor units), includes the payment link on its own line, and closes with a brief thank-you. Keep it concise, plain-text-friendly, and no marketing filler. Send it via Gmail Send a Message (operation 78d2e3de-d8b8-4dbd-89d8-08010564b919) from the connected Gmail account.

Nuances the agent must respect: use the deal ID as Adyen's reference so payments can be reconciled later; format the customer-visible amount using the deal's currency, not minor units; never generate a second link when a live one exists; never send the email if link creation fails; and never edit or delete existing notes.

Configurable knobs the author should surface: the list of qualifying deal stage names, the minimum-amount threshold, whether to update a payment_link_url custom property in addition to writing a note, and the email tone/signature block.

Additional information

What does this prompt do?
  • Watches your HubSpot pipeline and reacts the moment a deal enters a payment stage like Send Payment or Ready to Invoice.
  • Reads the deal amount, currency, name, and primary contact, then generates a hosted Adyen payment link tied to that deal.
  • Saves the payment link back to the HubSpot deal as a note (and optionally on a custom property) so anyone on the team can find it.
  • Drafts a short, personalised email referencing the deal, the amount, and the link, and sends it from your Gmail account.
  • Quietly skips small deals under your minimum, and never creates a second link if the deal already has a live one.
What do I need to use this?
  • A HubSpot account with at least one deal stage that means "ready to charge" (for example Send Payment or Ready to Invoice).
  • An Adyen merchant account that can create hosted payment links.
  • A Gmail account authorised to send the customer email.
  • Deal amounts and currencies filled in on your HubSpot deals, and a primary contact associated to each deal.
How can I customize it?
  • Change which HubSpot deal stages qualify (Send Payment, Ready to Invoice, or your own custom stage names).
  • Adjust the minimum deal amount that gets a payment link, so tiny deals are skipped.
  • Edit the tone, structure, or signature of the customer email that goes out.
  • Decide whether the link is saved to a deal note, a custom Payment Link property, or both.

Frequently asked questions

Do I need Adyen's Pay by Link product enabled?
Yes. This workflow uses Adyen's hosted payment link product, so your Adyen account needs Pay by Link switched on for your merchant account. Any live currencies you accept there will work here.
How does it handle deals in different currencies?
The agent reads the currency from the HubSpot deal itself, so a EUR deal gets a EUR link and a USD deal gets a USD link. You just need the currency field on the deal to be populated.
What happens if a deal already has a payment link?
The agent checks the deal for an existing link before doing anything. If one is already there and still active, it quietly no-ops so your customer never gets two different links for the same deal.
How do we match the Adyen payment back to the HubSpot deal later?
Every link is tagged with the HubSpot deal ID as its reference, so when the payment comes through in Adyen you can look up the deal it belongs to without any guesswork.
Can I send the email from a shared inbox instead of my personal Gmail?
You can use any Gmail account you have permission to send from, including a shared team address. Swap the connected Gmail account and the emails go out from there instead.

Stop hand-building payment links for every deal.

Let each Ready to Invoice deal generate its own Adyen link and email the customer, without pulling a rep off selling.