> For the complete documentation index, see [llms.txt](https://guide.go.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.go.gov.sg/guide-1/bulk-link-creation.md).

# Bulk Link Creation

Create up to **1,000 short links at once** by uploading a single .csv file.

## How do I bulk create short links?

1. When creating a new short link, choose **From a .csv**.

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/4VNOkqCtjp2bWAP6zqf0/create%201.png" alt=""><figcaption></figcaption></figure>
2. Download the template .csv file. This makes sure your file is formatted correctly for upload.

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/7n49G3fqSqy9pCGoFa95/create%202.png" alt=""><figcaption></figcaption></figure>
3. Open the template. You should see something like this.

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/yCxDkRSGKi82ngD1XBRo/create%203.png" alt=""><figcaption></figcaption></figure>
4. Fill in the original links you want to shorten, then save the file.
   * Note: Make sure you save the file in the original .csv file format, otherwise the file will not be available for selection for upload in the next step

     <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/29PvAjh7XyJoY3w1rvGs/create%204.png" alt=""><figcaption></figcaption></figure>
5. Click **Browse** and select the file you saved in the previous step
   * Optional: You can add up to 3 tags if you wish to categorise short links created from this .csv file. The tags are applied to every link in the file.

     <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/ifzvdQXBOB88bIfgfIlF/create%205.png" alt=""><figcaption></figcaption></figure>
6. Click **Create**. A pop-up at the top of your screen shows how many short links were created.

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/JzG0zhrJIlGXaGO6mvY0/create%206.png" alt=""><figcaption></figcaption></figure>

## How should I format my CSV file?

In order for successful bulk creation of links, the uploaded .csv file should be formatted properly.

Here are some checks to ensure your file is ready for uploading:

* Uploaded file must be a .csv file (e.g. .xlsx, .pdf and .docx files are not accepted)
* File must not contain more than 1000 links
* Header row in the file should follow original header in template format exactly, ie. “Original links to be shortened”
* No additional columns should be added to the file (eg. user should not insert more headers/columns like ‘preferred shortUrl’)
* File should not contain any empty rows
* Original links in the file should all be valid, start with https\:// and have no spaces (eg. <https://open.gov.sg>)

## Can I choose the short link names?

Not in the .csv.&#x20;

Bulk-created short links are always given random names, and you can't add a column for your own.

If you need custom names, for example to follow your organisation's naming convention, use the API instead. The **Create URL** endpoint accepts an optional `shortUrl`, so you can script a name for each link, within the standard rate limit. See [API Documentation](https://guide.go.gov.sg/developer-guide/api-documentation.md).

## Why did my bulk link creation attempt fail?

There are several reasons why your attempt to bulk create links could have failed. Look for the error message you see below. The row numbers will be different in your file.

#### File contains more than 1000 links&#x20;

* Split your links into smaller files and upload them one at a time.

<figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/zWEoX2AxZps4VyW4C0pg/error%202.png" alt=""><figcaption></figcaption></figure>

#### Header row does not follow original header in template

* Check that the first row says "Original links to be shortened" exactly, as it does in the template.

<figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/MGOjIltlV1oeQ3xw5dD5/error%203.png" alt=""><figcaption></figcaption></figure>

#### More than 1 column in your csv file

* Delete the extra columns so that only one is left.

<figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/Ak57FcaadwYJIQrESiDO/error%204.png" alt=""><figcaption></figcaption></figure>

#### Empty rows in your .csv file

* Delete the empty rows. The steps are in the next section.

<figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/Dl9zN2g29YxiLO9e9kxn/error%205.png" alt=""><figcaption></figcaption></figure>

#### Invalid original link, eg.

* Broken links due to spacing issues
* Links start with http\:// instead of https\://

  <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/IChT6PJM4TUT2Oc2wx74/error%206.png" alt=""><figcaption></figcaption></figure>

## How do I delete empty rows in my CSV file?

1. Open your file in your Notepad app (for Windows) or TextEdit app (for Mac)

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/EOOGryBQKNLj9wLMGfCk/photo_2023-01-17%2018.46.07.jpeg" alt=""><figcaption></figcaption></figure>
2. Delete the empty rows like so:

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/NBXESrUFGsyy7OQAXhpt/photo_2023-01-17%2018.46.03.jpeg" alt=""><figcaption><p>Before deleting the empty rows</p></figcaption></figure>

   <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/2FlNSM9nWPJIRPxTYbLQ/photo_2023-01-17%2018.46.05.jpeg" alt=""><figcaption><p>After deleting the empty rows</p></figcaption></figure>
3. Press Ctrl+S (for Windows) or Cmd+S (for Mac) to save your edited CSV file and re-attempt  bulk link creation.

## How do I download the QR codes for my bulk created short links?

{% hint style="info" %}
&#x20;QR code generation takes up to 5 minutes. The status bar updates automatically to show success or failure. If it takes longer than 5 minutes, contact us [here](https://go.gov.sg/gogovsg-user-support).
{% endhint %}

* &#x20;If your bulk link creation was successful, a notification bar at the top of your dashboard offers options to download.

  <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/1nJpeawx0L9uCzwNYCjk/create%207.png" alt=""><figcaption></figcaption></figure>

  * Click **QR Codes (PNG)**, **QR Codes (SVG)** or **Download all** to download a .zip file containing all the generated QR codes in that format.
  * You'll need to unzip the file and move the images out before you can use them. See Microsoft's guide on [unzipping files](https://support.microsoft.com/en-us/windows/zip-and-unzip-files-8d28fa72-f2f9-712f-67df-f80cf89fd4e5).
* You can also download the QR codes from the email we send you like in the example below:

  <figure><img src="https://content.gitbook.com/content/QUOVfPNmRg249PMXOlpi/blobs/ZKqau4AGuLUNqYyydF0d/create%208.png" alt=""><figcaption></figcaption></figure>
