Skip to main content

Hi everyone! 👋

I’m trying to build an invoice-sending system that uses a combination of Hubspot, Airtable and Xero. Invoices are sent every month and the data for the invoice is populated in the Airtable. Our customers are paying us in monthly instalments and I want to automate the invoice-generation and sending process

The ideal workflow looks like this 👇

  1. Contact in Hubspot joins a contact list 
  2. Record with contact’s details are created in Airtable
  3. Team is alerted in Slack
  4. Team member needs to go into Airtable to add details for the invoice and verify contact details are correct.
  5. Once certain fields are populated….
  6. Start loop by numbers so that the invoice can be sent for a set number of months.
    1. Create Xero in draft
    2. Team member approves xero invoice 
    3. Once approved email out the invoice to the contact
    4. Delay until next month

I’m running into a few issues (which are quite similar)

  1. Step 5 - once certain fields in Airtable are populated. Right now I have a filter to check if the fields exist, however, because everything in Zapier runs instantly, the filter catches it and the zap stops. I need it to continue running once the fields are populated
  2. Step 6.3 - once approved, send out invoice...Again, I have a filter here to check if the invoice is approved before continuing...however it stops again because it all runs instantly. I want to be able to approve the invoice in Xero and that would trigger the zap to continue goin
  3. As a sub-problem...all of my invoices are getting generated at once - ideally the loop would go through each step sequentially

I’d love to get some input from the brainstrust on the 3 problems i’m running into! Thanks in advance! 😊

Welcome to the Community, @earlywork_team👋
 

Step 5 - once certain fields in Airtable are populated. Right now I have a filter to check if the fields exist, however, because everything in Zapier runs instantly, the filter catches it and the zap stops. I need it to continue running once the fields are populated

 

I wonder if it might be worth setting up a View in Airtable that records would only appear in if they have values in certain fields. Then set the Zap to trigger whenever a new record enters that specific View? Just thinking that might help to ensure that the Zap is only triggering on records that have those fields populated to begin with.

 

Step 6.3 - once approved, send out invoice...Again, I have a filter here to check if the invoice is approved before continuing...however it stops again because it all runs instantly. I want to be able to approve the invoice in Xero and that would trigger the zap to continue goin

 

Maybe you could split this part of the workflow into two Zaps? So the first Zap creates the invoice draft and the second Zap triggers when an invoice is approved, searches for the contact and then emails the invoice to them.

 

As a sub-problem...all of my invoices are getting generated at once - ideally the loop would go through each step sequentially

 

Ah yes, loops don’t run sequentially they run through all at the same time. It sounds like you’re essentially looking to create a recurring invoice, is that right?

If so, would the invoices need to be created indefinitely or is the contact only sent invoices only for X number of months? I’m thinking that perhaps you could use an app like Google Calendar to create an recurring event which contains the Airtable record ID that contains the invoice info. Then when the event starts it’ll trigger a Zap that then looks up the relevant record in Airtable and then generates and sends out an invoice.

Do you think the above suggestions could work?


Hey @SamB! 👋 Thanks for such a speedy response here! 

Thank you for the suggestions re: creating a new airtable view and using the calendar invite to generate a set number of Xero invoices! I’ve also broken up my super long zap into smaller ones so it’s been much easier to troubleshoot 👌

Maybe you could split this part of the workflow into two Zaps? So the first Zap creates the invoice draft and the second Zap triggers when an invoice is approved, searches for the contact and then emails the invoice to them.

^^ I’ve created a separate zap that does the draft invoice - that was fine. However, I don’t think there’s a Xero trigger for when an invoice status gets updated to “approved” 😢 The only relevant option seems to be “New Sales Invoice” which triggers when any new sales invoice is created. I don’t think there’s a way to search for when specific invoices are created. Could you help me out here?


You’re welcome @earlywork_team! 🙂


Ah yes you’re quite right. It looks like Xero doesn’t have an “Invoice Updated” type of trigger, I must have got mixed up with a different app there. So sorry about that! There’s an exiting feature request to have an “Updated Invoice” trigger added to the Xero app so I’ve submitted your vote for that. That way we can notify you as soon as it’s available to use.

In the meantime, I did some digging and it looks like it might be possible to set up custom webhook notifications to be sent from Xero to Zapier whenever there’s a change to an invoice:
0b32495a7f413340bda96732b6350c53.png

I’ve not tested this out but in theory, you’d need to use Webhooks by Zapier as the Zap’s trigger. And set the webhook in Xero set up to send notifications through to the catch hook URL that appears in the Zap. You can find out more about triggering Zaps from webhooks here: Trigger Zaps from webhooks

That said, it’s an advanced feature and you’d need to be on a paid Zapier plan in order to use webhooks. So that might not be an ideal workaround to use.

If that webhook workaround isn’t a viable option, then the invoices might need to be sent out directly via Xero as they’re being approved. It looks like there’s the option to do that: Approve and send a customer invoice

Hopefully that helps!


Ooh thanks for this @SamB! I’ve never used webhooks before but now’s probably a good time to start learning! If not, we’ll just resort to sending the invoices manually 👌

I had another idea where the flow could look something like

  1. Send Slack message when draft invoice is made
  2. Use Push to Zapier to send the message to a zap
  3. Use “Push to Zapier” as the trigger

Hopefully at least one of these options works out!


Glad I could help, @earlywork_team! Ooh yay, that’s a very cool idea for an alternative workaround! Great work here 🙌

Hope it goes well. And don’t be shy if you run into any issues in setting any of that up. The Community is always here and always happy to help! 😁


Just wanted to follow up here to share that the feature request to have an Updated Invoice trigger added to the Xero app has been implemented! 😁🎉

3f4436c2ae760a5dfcf8ac48ea3b2345.png

Please do give that new Updated Invoice Xero trigger a try and be sure to let us know if you run into any issues with it. In the meantime, happy Zapping! ⚡️