# Bulk Link Creation

Our bulk link creation feature allows users to create up to 1000 shortlinks at once with the upload of a single .csv file!

## How do I bulk create shortlinks on GoGovKH?

1. When creating a new shortlink, you will see a new option to create shortlinks from a .csv file

<figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FIzZNpgVMFWPOzifZnXVa%2FUntitled.png?alt=media&#x26;token=455560b4-f1fd-4f48-8b74-49409470cf02" alt=""><figcaption></figcaption></figure>

2. Download the template .csv file (to ensure that the file is formatted correctly for upload)

<figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2Fj0Do13n5FU4AybWRXgMe%2FUntitled.png?alt=media&#x26;token=d44a7250-0787-488e-8b65-e767c5b0ffe6" alt=""><figcaption></figcaption></figure>

3. Upon opening the .csv template file, you should see something like this

<figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FKuJtBiKYFWxunUfPBikt%2Fimage.png?alt=media&#x26;token=79ec4434-63e7-4633-924d-9eeba83cd5ec" alt=""><figcaption></figcaption></figure>

4. Fill up the file with the original links you wish to shorten & save the file.

   * Note: Ensure to save the file in the original .csv file format, if not the file will not be available for selection for upload in the next step

   <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2Fk5Eqgu03aAJUqsbG8K3J%2FUntitled.png?alt=media&#x26;token=bf40a301-6283-4e1f-83c7-6b6e8b9d40ad" alt=""><figcaption></figcaption></figure>
5. Click on “Browse” and select the file you saved in the previous step

   * Optional: You can add up to 3 tags if you wish to categories shortlinks created from this .csv file. Tags will be applied to all links in the .csv file.

   <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FA8ZKPYpn6qUwcvvDNRvN%2FUntitled.png?alt=media&#x26;token=3d6ff55e-d3b9-4086-b68b-601f14009285" alt=""><figcaption></figcaption></figure>
6. Click on “Create” and you should see a success pop-up at the top of your screen indicating how many shortlinks were successfully created from your .csv file

## 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 .csv file (e.g. .xlsx, pdf, .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 file should all be valid (eg. <https://dgc.gov.kh>)

## Why did my bulk link creation attempt fail?

There are several reasons why your attempt to bulk create links could have failed:

* File contains more than 1000 links

  <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FDwJ5Hk3tE80zdp8mIajT%2Fimage.png?alt=media&#x26;token=43481dd9-91de-48bd-941f-b6826660f8a8" alt=""><figcaption></figcaption></figure>
* Header row does not follow original header in template

  <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FOgO6xbD1uUd7akPyiHPP%2Fimage.png?alt=media&#x26;token=07ac1fac-03d5-436f-9cb6-70110fd17d7b" alt=""><figcaption></figcaption></figure>
* More than 1 column in your csv file

  <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FdcJ5qMVVwoNjCl4kypwh%2Fimage.png?alt=media&#x26;token=0516e170-d827-43fb-a10c-38f77b1f01aa" alt=""><figcaption></figcaption></figure>
* Empty rows in your .csv file

  <figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FKqKwmMFmatCA04uRLlWt%2Fimage.png?alt=media&#x26;token=57ed3a4c-14a6-484a-836d-b4da82ecd78e" 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://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FZlg92m0jpQyOxQ3gtaPc%2Fimage.png?alt=media&#x26;token=4b11430e-f10c-4981-ac93-dcf1a4ed26e9" 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://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FlGeo4nx808GQOaUyZkJf%2FUntitled.png?alt=media&#x26;token=6cdf3e7b-f1dd-4e0b-bebf-64b1747d0175" alt=""><figcaption></figcaption></figure>

2. Delete the empty rows like so:

<figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2F7bPjv8TLcJJywYryA76g%2FUntitled.png?alt=media&#x26;token=0a5182b4-0f5a-470b-a8ec-8fa0f5d6cedc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://990039390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4FYgK7fgEnLMhzImn0i%2Fuploads%2FTLenKK6f9qPOOAk5GvVo%2FUntitled.png?alt=media&#x26;token=73149097-9cff-4c57-ac1c-8ce35b9caeb6" alt=""><figcaption></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.
