Add this first. This tool needs an access token, so add Get PayPal Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Send an existing draft PayPal invoice to the customer by email. Get a PayPal access token first if you do not already have one. Only do this when the customer has asked for it and you have confirmed the invoice ID. Sending cannot be undone. Tell the customer to check their inbox.
Request
POSThttps://api-m.paypal.com/v2/invoicing/invoices/{{invoiceId}}/send
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Body
{
"send_to_recipient": true
}Parameters
invoiceId stringThe PayPal invoice ID.accessToken stringThe access_token value returned by Get PayPal Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "a387d2a5-c006-4c65-afc3-1fda9c39611a",
"type": "HTTP_REQUEST",
"label": "Send PayPal Invoice",
"name": "send_paypal_invoice",
"customName": false,
"description": "Send an existing draft PayPal invoice to the customer by email. Get a PayPal access token first if you do not already have one. Only do this when the customer has asked for it and you have confirmed the invoice ID. Sending cannot be undone. Tell the customer to check their inbox.",
"parameters": [
{
"name": "invoiceId",
"type": "string",
"description": "The PayPal invoice ID."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get PayPal Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://api-m.paypal.com/v2/invoicing/invoices/{{invoiceId}}/send"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": "{\n \"send_to_recipient\": true\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.