Printing Labels via SFTP to 3PL
Automatically find today's vendor channel orders at a stock location, generate a PDF label file for each order, send the files to a 3PL SFTP folder, and tag the processed orders with an export identifier.
Overview
Printing Labels via SFTP to 3PL is a scheduled label-export solution for Linnworks. It finds open vendor channel orders that are due for despatch today, generates a PDF label file for each order, and sends the files to an SFTP server used by a third-party logistics (3PL) provider.
The macro runs from the Linnworks Macro Schedule Engine. Each time it runs, it searches open orders at the configured stock location, keeps only the orders that match the vendor channel, are due for despatch today and do not yet have a printed label, and generates one PDF per order using the print template defined in the macro.
Each PDF is passed to an upload service together with the SFTP connection details, and the service places the file in the 3PL processing folder. After all orders are handled, the macro tags the processed orders with an export identifier so they can be found easily in Linnworks.
Printing Labels via SFTP to 3PL removes the daily task of generating, downloading and uploading label PDFs by hand, and gives the 3PL a consistent SFTP folder for incoming label files.
Who Should Use Printing Labels via SFTP to 3PL
Warehouse & Fulfilment Teams
Teams preparing vendor channel orders use the macro to deliver label files to the 3PL without generating and uploading each PDF manually.
3PL & Logistics Teams
Logistics teams receive one label PDF per order in a single SFTP processing folder, named by order number.
Integration Administrators
Administrators configure the schedule, stock location, SFTP connection details and the enabled status of the macro.
Operations Teams
Operations teams use the export identifier and the macro logs to review which orders were sent to the 3PL.
Key Features
Scheduled Label Export
Runs automatically through a one-time or recurring Linnworks macro schedule.
Location-Based Order Search
Searches open orders received in the last 14 days at the configured stock location.
Despatch-Day Filtering
Keeps only vendor channel orders with a despatch-by date of today and no printed label.
One PDF per Order
Generates a separate PDF for each order using the print template defined in the macro.
SFTP Delivery to the 3PL
Sends each PDF to the 3PL processing folder as {OrderNumber}_Shipping Labels.pdf.
Export Identifier Tagging
Creates the export identifier if it does not exist and assigns it to the processed orders.
How Printing Labels via SFTP to 3PL Works
Printing Labels via SFTP to 3PL runs through a defined sequence each time its schedule runs. It does not use selected order IDs; it searches open orders directly.
Step 1: Stock location lookup
The macro finds the Linnworks stock location whose name exactly matches the LocationName parameter.
Step 2: Open order search
Open orders at that location with a received date from the previous 14 days up to the next day are retrieved.
Step 3: Vendor channel filter
Only orders whose source matches the vendor channel defined in the macro are kept.
Step 4: Despatch and label filter
Orders are kept only when the despatch-by date is today and the order's label has not been printed.
Step 5: PDF generation
A PDF is generated for each remaining order using the print template defined in the macro.
Step 6: SFTP upload
The PDF link, the SFTP connection details and the remote file path are sent to the upload service, which places the file in the 3PL processing folder.
Step 7: Upload result logging
The response from the upload service is written to the macro log for each order.
Step 8: Export identifier assignment
The export identifier is created if required and assigned to the processed orders.
Configure the Macro
Once the app is installed, you need to create a macro configuration so the system knows when the macro should run, which stock location to check, and which SFTP server should receive the label files.
This setup can be adjusted anytime based on your operational requirements.
Steps to Configure
Go to Apps > Macro Configuration and click + Add new configuration.

Select the PrintLabelsToSFTP macro and click Create Configuration.
This creates a new configuration where the schedule and parameter values can be entered.
In the Macro Configuration screen, go to the Schedules tab and click New Schedule.
Configure the schedule settings.
- In the Schedule Config window, enter the Name
- Select Schedule type from the dropdown:
- One time runs once only
- Recurring runs repeatedly based on the configured schedule
- If Recurring is selected:
- In Frequency, choose Occurs from the dropdown:
- Daily
- Weekly
- In Frequency, choose Occurs from the dropdown:
- Set the Recurs every value, for example 1 day
- Set the Starting on date and time
- Under Daily frequency, choose one option:
- Occurs once at → enter the exact time
- Occurs every → enter the interval in hours and define:
- Starting time
- Ending time
- Review the Summary section
- Click Save
Note: The macro does not skip orders that were already sent in an earlier run on the same day. A recurring schedule that runs several times a day can upload the same label files again. A single daily run is recommended.
Navigate to the Parameters tab and enter the required values.
Configure the following parameters:
-
LocationName
Main Warehouse -
SFTP_server
sftp.example.com -
SFTP_user
sftp_user -
SFTP_password
dummy-sftp-password -
SFTP_fullPath
/labels/processing -
SFTP_port
22
The LocationName value must match the Linnworks stock location name exactly, including upper and lower case.
Make sure to enable the schedule.
Make sure to enable the macro so it can run from the configured schedule.
Note: If the macro or the schedule is not enabled, the macro will not run.
Key Benefits
Generating label PDFs one by one and uploading each file to a 3PL server is repetitive and easy to delay. Printing Labels via SFTP to 3PL combines order selection, PDF generation and SFTP delivery into one scheduled process.
Reduce manual label handling and give the 3PL a predictable folder of label files for every despatch day.
Reduce Manual Label Work
Removes the need to generate, download, rename and upload each label PDF manually.
Apply Consistent Order Filters
Uses the same location, vendor channel, despatch date and label status checks on every run.
Deliver Files Automatically
Sends label PDFs straight to the 3PL processing folder on the SFTP server.
Predictable File Names
Names every file by order number so the 3PL can match labels to orders easily.
Support 3PL Processing
Places all of the day's label files in one folder for the 3PL to pick up.
Easy Order Review
Tags processed orders with the export identifier so they can be filtered in Open Orders.
Usage of App
Printing Labels via SFTP to 3PL is triggered through the Linnworks Macro Schedule Engine.
It does not use selected OrderIds. Each run searches open orders at the configured location and applies the order selection rules.
Execution
Trigger via Schedule
Configure a one-time or recurring schedule, enter the location and SFTP values, save the configuration, and enable both the schedule and the macro. No manual input is required once the schedule is active.
Outcome
When the scheduled macro runs, it:
Finds the stock location
Matches the LocationName parameter against the Linnworks stock locations.
Retrieves recent open orders
Searches open orders received from the previous 14 days up to the next day at that location.
Selects today's vendor channel orders
Keeps orders from the vendor channel with a despatch-by date of today and no printed label.
Generates a PDF label file
Creates one PDF per order using the print template defined in the macro.
Uploads the PDF to SFTP
Sends the PDF link and SFTP details to the upload service and logs the result.
Tags the processed orders
Creates the export identifier if needed and assigns it to the processed orders.
Each remote file is named using this format:
{OrderNumber}_Shipping Labels.pdf
For example:
100245_Shipping Labels.pdf
The table below shows how the macro handles different situations:
| Order Situation | Macro Behaviour |
|---|---|
| Matching order, PDF generated and upload succeeds | File is placed on SFTP, success is logged and the export identifier is assigned. |
| Matching order, but the upload service reports a failure | The failure is logged. The export identifier is still assigned. |
| Matching order, but no PDF link is returned | No file is uploaded. The export identifier is still assigned. |
| Error while generating the PDF | The order is skipped and does not receive the export identifier. |
| Despatch-by date is not today | The order is not processed. |
| Label is already marked as printed | The order is not processed. |
| Order source is not the vendor channel | The order is not processed. |
| No matching orders found | "Order not found!" is logged and no files are uploaded. |
Input Parameters
Printing Labels via SFTP to 3PL uses the following values from the Macro Configuration screen:
| Parameter | Required | Description |
|---|---|---|
| LocationName | Yes | Exact Linnworks stock location name used to search open orders. The match is case-sensitive. |
| SFTP_server | Yes | Host name or address of the 3PL SFTP server. |
| SFTP_user | Yes | Username for the SFTP connection. |
| SFTP_password | Yes | Password for the SFTP connection. |
| SFTP_fullPath | Yes | Folder path on the SFTP server, passed to the upload service. Set it to the 3PL processing folder. |
| SFTP_port | Yes | SFTP port, passed to the upload service. Usually 22. |
| Schedule | Yes | One-time or recurring schedule that starts the macro. |
Security: Store SFTP credentials securely. Do not expose live usernames, passwords, server addresses or private folder paths in public documentation, screenshots, logs or source repositories.
The following behaviour is defined within the macro code and is not set in the Macro Configuration screen:
| Setting | Description |
|---|---|
| Vendor Channel Source | The order source that the macro processes. Orders from other sources are ignored. |
| Print Template | The Linnworks print template used to generate each PDF. |
| Remote File Path | The 3PL processing folder and the {OrderNumber}_Shipping Labels.pdf file name format. |
| Export Identifier | The identifier created and assigned to processed orders. |
| Upload Service | The service that transfers each PDF from its link to the SFTP server. |
| Order Search Window | Orders received from the previous 14 days up to the next day. |
Order Selection Rules
An order is processed only when it meets every rule below:
| Rule | Condition |
|---|---|
| Order status | The order is an open order. |
| Stock location | The order belongs to the stock location named in LocationName. |
| Received date | The order was received within the previous 14 days up to the next day. |
| Order source | The order source matches the vendor channel defined in the macro. |
| Despatch-by date | The despatch-by date is today. |
| Label status | The order's label has not been marked as printed. |
Important: The macro does not mark labels as printed and does not skip orders that already carry the export identifier. An order that still matches these rules is sent again if the macro runs again on the same day.
Best Practices
Testing with a small number of orders and reviewing the logs after each run are key to getting the best results from Printing Labels via SFTP to 3PL.
Run once per despatch day
Schedule a single daily run so the same label files are not uploaded to the 3PL more than once.
Use the exact location name
Copy the stock location name from Linnworks so the case and spelling match exactly.
Confirm SFTP access
Check that the SFTP user can connect and write files to the 3PL processing folder before going live.
Test the print output
Generate a sample PDF for a test order and confirm the 3PL accepts the label layout.
Check upload results in the log
The export identifier is not proof of a successful upload. Use the log entries for each order to confirm delivery.
Protect SFTP credentials
Restrict access to the macro configuration because it stores the SFTP connection details.
The following checks can help diagnose common issues:
| Issue | Check |
|---|---|
| Macro does not run | Confirm that the configuration, the schedule and the macro are all enabled. |
| No orders are processed | Check the location name, the order source, the despatch-by date and the label printed status. |
| An expected order is missing | Confirm the despatch-by date is today and the order was received within the last 14 days. |
| File is missing on SFTP | Review the upload result for that order in the macro log, then check the SFTP details and folder permissions. |
| Same file uploaded twice | Check whether the schedule runs more than once a day. |
| Macro stops with an error | Review the error in the macro log. A location name that does not match exactly stops the run. |
FAQ
How is Printing Labels via SFTP to 3PL triggered?
The macro runs from a one-time or recurring schedule set up in Linnworks Macro Configuration.
Does the macro use OrderIds?
No. It searches open orders at the configured stock location on every run.
Which parameters must be filled in?
All six parameters are needed: LocationName, SFTP_server, SFTP_user, SFTP_password, SFTP_fullPath and SFTP_port. The macro does not apply default values.
Must LocationName match exactly?
Yes. The name must match the Linnworks stock location exactly, including upper and lower case. If no location matches, the run stops and the error is written to the log.
Which orders are processed?
Open orders at the configured location, received within the previous 14 days up to the next day, from the vendor channel defined in the macro, with a despatch-by date of today and no printed label.
Are orders due for despatch on another day included?
No. Only orders with a despatch-by date of today are processed.
How many PDF files are created?
One PDF is created for each processed order.
How are the files named?
Each file is named with the order number followed by _Shipping Labels.pdf, for example 100245_Shipping Labels.pdf.
Does the macro connect to the SFTP server directly?
No. The macro sends the PDF link and the SFTP details to an upload service, which transfers the file to the SFTP server.
When is the export identifier assigned?
At the end of the run, to every order that was processed. It is assigned even when the upload for that order failed, so use the macro log to confirm each upload.
Does the macro create the export identifier?
Yes. If the identifier does not exist in Linnworks, the macro creates it before assigning it.
Does the macro mark the label as printed?
No. The macro checks the label printed status when selecting orders but does not change it.
What happens if the macro runs twice on the same day?
Orders that still match the selection rules are processed again, and their label files are uploaded again.
What happens when no orders match?
The macro logs "Order not found!" and finishes without uploading any files.
Does an error on one order stop the whole run?
No. If an error occurs while generating the PDF for an order, that order is skipped and the macro continues with the next order.
Can the vendor channel, print template or folder be changed?
Yes, but these values are defined in the macro code. The code must be updated and tested before the change is used in a live workflow.
Legal Information
- Privacy Policy: https://rishvi.co.uk/privacy-policy/
- Terms and Conditions: https://rishvi.co.uk/terms-conditions/
Please review these pages to understand how data is handled and the terms governing the use of this application.
Access to the macro configuration should be restricted because it contains SFTP connection details and controls the automatic export of label documents.
Summary
Printing Labels via SFTP to 3PL automates the daily delivery of label PDFs for vendor channel orders to a 3PL SFTP server.
Once configured and scheduled, the macro finds the stock location, retrieves recent open orders, keeps the vendor channel orders due for despatch today without a printed label, generates one PDF per order, sends each file to the 3PL processing folder and tags the processed orders with an export identifier.
Scheduled order selection
Orders due for despatch today are found automatically on every scheduled run.
Automatic PDF generation
One label PDF is generated per order using the print template defined in the macro.
SFTP delivery
Label files are sent to the 3PL processing folder, named by order number.
Order tagging
Processed orders receive the export identifier for easy review in Linnworks.
For orders or files that do not process as expected, confirm that the schedule and macro are enabled, check the exact stock location name, verify the SFTP details and folder permissions, and review the order-specific upload results in the macro log.