Automate Document Uploads and Bill Attachments in QuickBooks Online with SSIS

25 September 2026
KingswaySoft Team

Supporting documents, including vendor invoices and receipts, are often stored outside QuickBooks Online even though the related financial transactions already exist in the system. As document volumes grow, locating each transaction and attaching its corresponding file manually becomes time-consuming and difficult to manage.

KingswaySoft's SSIS Integration Toolkit can automate this process. It can retrieve documents from an external file location, match each document to the appropriate QuickBooks Online transaction, and upload the file as an attachment. In this walkthrough, we show how to retrieve vendor invoice PDFs from a file system, identify their corresponding bills in QuickBooks Online, and automatically upload and associate each document by using the KingswaySoft SSIS QuickBooks components.

Integration Scenario

In this example, bills received from vendors already exist in QuickBooks Online, while the related invoice documents are stored as PDF files in a separate location. Each file follows a naming convention that contains the vendor name and the document number for the corresponding bill. For example:

Northstar Office Supplies_INV-10452.pdf

The value before the underscore is the vendor name, and the value after it is the bill document number. In this example, the vendor name is Northstar Office Supplies and the document number is INV-10452. The package extracts these values from the file name and uses them to identify the corresponding QuickBooks Online bill.

After a matching bill is found, its QuickBooks bill ID is used to create the reference required to associate the uploaded document with that transaction. Although this example matches documents by vendor name and document number, the matching logic can be adapted to suit the identifiers available in your integration. The same overall approach applies: retrieve a supporting document, identify its QuickBooks record and ID, and include that ID in the AttachableRef when uploading the document.

Overall Data Flow Design

The package uses one Data Flow Task to retrieve the supporting documents, identify their related QuickBooks bills, and upload the files. First, a Premium File System Source component retrieves the PDF files and their contents. A Premium Derived Column component then extracts the vendor name and document number from each file name and adds the content type required for upload.

In parallel, a QuickBooks Source retrieves the existing bills used as reference data. Both streams feed a Premium Lookup component, which compares the vendor name and document number from each file with the corresponding QuickBooks fields. For matched rows, the QuickBooks bill ID returned by the lookup is used in a second Premium Derived Column component to create the AttachableRef. This reference specifies the record type and ID of the QuickBooks transaction to which the uploaded file should be linked. Finally, a QuickBooks Destination uploads the document and associates it with the existing bill.

SSIS Data Flow showing supporting documents read from a file system, matched to QuickBooks bills, and uploaded to QuickBooks Online.

Configuring the Data Flow

To get started, add a Premium File System Source to the Data Flow and configure it to read the folder that contains the supporting PDF documents. This example retrieves files from a local file system. Include the file name, file name without extension, and file content in the source output. The __PremiumFilePack.FileContent column contains the binary data that will be uploaded to QuickBooks Online, while __PremiumFilePack.NameWithoutExtension supplies the values needed for matching.

Next, add a Premium Derived Column component. Because the files follow the <VendorName>_<DocNumber>.pdf naming convention, use the GetTokenAtPosition function to extract both values. Create a VendorName column with the following expression:

GetTokenAtPosition([__PremiumFilePack.NameWithoutExtension],"_",1)

For Northstar Office Supplies_INV-10452.pdf, this expression returns Northstar Office Supplies. Then create a second derived column named DocNumber with the following expression:

GetTokenAtPosition([__PremiumFilePack.NameWithoutExtension],"_",2)

This expression returns INV-10452. Because the documents in this example are PDFs, also create a ContentType column with the following value:

"application/pdf"

Premium Derived Column Editor showing the ContentType, VendorName, and DocNumber derived columns used to prepare supporting document data.

Next, use a QuickBooks Source component to retrieve the existing Bill records. Include only the fields required for downstream matching: Id, VendorRef.name, and DocNumber. The vendor name and document number identify the appropriate bill, while Id provides the internal QuickBooks record ID needed to create the attachment reference.

QuickBooks Source Editor configured to retrieve Bill records from QuickBooks Online.

Add a Premium Lookup component and connect the file stream as the Primary Input and the QuickBooks Source as the Lookup Table Input. Configure the lookup to compare VendorName with VendorRef.name and DocNumber with DocNumber. Matching on both values is more reliable than matching on document number alone because different vendors can use the same document number.

Premium Lookup Component Editor showing exact-match conditions for DocNumber and VendorName when matching documents to QuickBooks bills.

On the Columns page, include the fields required for upload and assign clearer output aliases where appropriate. In this example, rename __PremiumFilePack.FileContent to FileContent, rename __PremiumFilePack.Name to FileName, pass through ContentType, and expose the QuickBooks Id returned by the lookup as BillId.

Premium Lookup Component Editor Columns page showing FileContent, FileName, ContentType, and BillId output fields for matched rows.

Documents that do not find a matching bill can be redirected through the unmatched output for review or additional handling. This ensures that only successfully matched documents proceed to the upload step.

For matched rows, add another Premium Derived Column component to create the AttachableRef that links the uploaded document to the matching QuickBooks bill. The reference includes the bill record type and the BillId returned by the lookup. Use the following expression:

FormatString("[{{\"EntityRef\":{{\"type\":\"Bill\",\"value\":\"{0}\"}}}}]", [BillId])

The {0} placeholder is replaced by the bill ID returned from the lookup. Because FormatString uses curly braces for placeholders, double the curly braces required by the AttachableRef structure so that they are treated as literal characters. For example, when the matching bill ID is 437, the resulting value is:

[{"EntityRef":{"type":"Bill","value":"437"}}]

This value tells QuickBooks Online which bill should be associated with the uploaded document.

Premium Derived Column Editor showing the AttachableRef expression used to associate an uploaded document with a QuickBooks bill.

Finally, add a QuickBooks Destination component. Set the Action to Upload and the destination entity to Attachable. On the Columns page, map the following values:

  • AttachableRef to AttachableRef
  • ContentType to ContentType
  • FileContent to FileContent
  • FileName to FileName

The QuickBooks Destination uploads the document together with its reference to the matched bill. QuickBooks Online can then create the attachment and associate it with the existing transaction.

QuickBooks Destination Editor configured with the Upload action and Attachable destination entity.

QuickBooks Destination Editor Columns page showing mappings for AttachableRef, ContentType, FileContent, and FileName.

When the package completes successfully, each supporting document has been retrieved from the file system, matched to the appropriate bill by vendor name and document number, and uploaded to QuickBooks Online with the corresponding bill ID in its AttachableRef.

Conclusion

When supporting documents are stored separately from their QuickBooks Online transactions, manual attachment management becomes increasingly inefficient as the number of files grows. Automating the process lets you retrieve documents from an external location, match them to the appropriate QuickBooks records, and upload them with the reference needed to associate each document with its transaction.

Although this example uses vendor invoice PDFs matched to bills by vendor name and document number, the same pattern can support many other QuickBooks Online document-integration scenarios. The method used to identify the corresponding record may differ, but once the record ID is available, it can be included in the AttachableRef when the supporting document is uploaded.

Archive

September 2026 1 August 2026 4 July 2026 3 June 2026 1 May 2026 3 April 2026 3 March 2026 2 February 2026 2 January 2026 2 December 2025 2 November 2025 2 October 2025 2 September 2025 2 August 2025 2 July 2025 2 June 2025 1 May 2025 2 April 2025 3 March 2025 1 February 2025 1 January 2025 2 December 2024 1 November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags