You can use a Screen Flow or Record-Triggered Flow based on your use case.
Example criteria could include:
Invoice record created
Invoice status changed to "Ready to Send"
Manual trigger from button or UI
Use the following Apex Action:
Apex Action Name: SFX-SendInvoicefromXero
Input Parameter:
parameterid: Provide the Salesforce Invoice record Id (Invoice__c.Id)
This Apex action will:
Trigger the Xero functionality to send the invoice.
Use the Contact and Email from the Xero Contact linked to that invoice.
Update the "Sent to Contact" field on the invoice record in Salesforce.