Xero is a leading online accounting and reporting tool and this plugin allows to authenticate your app users with their Xero accounts and then read and write data.
Weâve released a security update for the Xero Accounting pluginâversion 1.29.0. To ensure everything works smoothly, youâll need to re-enter your âClient_Secretâ after upgrading.
Hereâs what you need to do:
Update the plugin to version 1.29.0.
Re-enter your Client Secret to finalize the update.
We appreciate your time in completing this step, which is crucial for maintaining the pluginâs security. If you encounter any issues, please let us know. Weâre here to assist you!
To help you resolve the issues youâre experiencing with the plugin, we recommend starting by comparing your current setup and workflows with our official demo application, which you can find here: Zeroqode Demo - Xero Plugin
The demo provides a fully functional example of how the plugin should be configured and used within a Bubble app. Reviewing the demo will often highlight any discrepancies or missing steps in your own setup.
The documentation covers important details on installation, configuration, authentication, and best practices for using the plugin effectively. Reviewing these resources usually helps clarify common setup issues and avoid potential pitfalls.
If after comparing your setup with the demo and reviewing the documentation youâre still encountering difficulties, please share more specific details about the problem, including any error messages or unexpected behavior. This will help us diagnose the issue more precisely and provide you with targeted assistance.
We look forward to helping you get everything running smoothly.
Thanks. Quick question, do I have to have the values in user or can I have a data type e.g Xero that has all values? This is because itâs a saas product and we use this method for data management.
There is a;
company data type > related Xero data type
Xero data type > related company record - one Xero record per company account.
Thanks for your great questionâthis definitely makes sense given your SaaS multi-tenant setup!
Yes, that approach aligns well with common SaaS practices. Instead of adding Xero tokens and connection info directly on the User, you can create a custom âXeroâ data type linked to each Company. This data type would hold fields like Access Token, Refresh Token, Expires At, and any other relevant connection details.
When a user connects their Xero account, store the authorization tokens in the related Companyâs âXeroâ record â not on the User.
Make sure to check if the Company already has a connected Xero record before allowing new authorizations. This helps avoid token invalidation issues, since multiple connections to the same Xero organization can overwrite tokens.
For all API calls, use the tokens from the Companyâs âXeroâ record so all users under that company share the same Xero connection.
I deleted it all from previous connection when a had trialed module and it worked.
I must have a question sound the token expiry. Does this mean that I need to retried the refreshed token reach time I fetch data? Eg invoices and customers?
Also, when getting data, does the data need to be displayed via the custom state saved value?
Thanks for your questions and great to hear you got the connection working!
Token Expiry & Refresh:
Yes, the access token has an expiry time. When making API calls (e.g., fetching invoices or customers), you need to check if the access token is still valid. If expired, you should use the refresh token to get a new access token before making the request. This process ensures uninterrupted data fetching without manual re-authentication.
Displaying Data via Custom States:
Using custom states to store and display data fetched from the API is a common and effective approach in Bubble. It helps with performance and UI responsiveness. However, you can also directly bind repeating groups or elements to API calls depending on your appâs needs.
Pagination & Record Limits:
The Xero API typically returns a maximum of 100 records per request. To retrieve more than 100 records, youâll need to implement pagination by using the page parameter in your API calls to fetch additional batches of records. You can loop through pages to get all data or load more on demand. Filtering by status (e.g., paid invoices) is also supported via query parameters.
Displaying Phone Number and Date:
For phone numbers, ensure you are referencing the correct field from the API response in your Bubble elements. Sometimes nested objects or arrays require additional â:formatted asâ or â:extractâ steps to display properly.
For dates, use Bubbleâs built-in date formatting functions to display them in your preferred format (e.g., formatted as MM/DD/YYYY). If the date comes as a string, convert it to a date type first.
Hope this helps! Feel free to reach out with any further questions.
Hi Guys, I am struggling to set the filter to see only the most recent invoices.
Any additional documentation would be great.
For example, is this where you mean to set the search parameter?
At the moment, we havenât come across any active forum discussions specifically related to this Xero plugin, but if we do spot one, weâll be sure to point you there.
As for your question about filtering for the most recent invoices â yes, you should use the Get Invoices method to retrieve one or more invoices, and apply query parameters to control what is returned. To get only the most recent invoices, youâll typically use the where parameter or sort by date depending on what Xeroâs API supports through that endpoint.
For more guidance on setting this up properly, we highly recommend reviewing the plugin documentation and exploring the workflows on our demo page:
Docs:
Demo Page:
These resources provide detailed examples and best practices that should help clarify how to set filters and use the API calls effectively.
In your case, the best approach would be to first pull the invoices data into custom state using the Xero pluginâs âGet Invoicesâ action. Once the data is stored locally, you can apply filters directly in your RG to sort the invoices by creation date in descending order, which will ensure you see the most recent invoices first.
This method tends to be more reliable because filtering large datasets directly via API parameters can sometimes be limited or inconsistent depending on the endpoint capabilities.
As we mentioned earlier, We highly recommend comparing your setup with our demo page, which demonstrates an optimized workflow for fetching and filtering invoices efficiently.
Regarding your question about the response source â rest assured, all replies on the forum are written by humans, not AI. We strive to provide clear and personalized assistance.
Thanks for your question and apologies for delayed response over the weekend.
Using a table element instead of a repeating group should generally work the same way, as both can display data from custom states or API responses. That said, since the table element in Bubble is still in beta, there may be occasional inconsistencies or limitations in behavior compared to the more established repeating group element.
For this reason, we recommend using a repeating group for now, especially when working with dynamic data and filtering logic, to ensure a more stable and predictable experience.