Importing entries

If you've moved to Award Force from another platform or manual system, you may wish to import historical data into your new account. You can do this using our API. This tutorial will take you through the steps.

Requirements

1. An Award Force professional account

2. A Zapier account (the Zapier plan you need will depend on the number of entries you wish to import)

3. A Google Sheet containing the historical data you want to import

 

Step 1: Create an API key in Award Force

1. Go to Settings > Developers > API keys and click Generate API key

2. Give the key a name and select Read / Write.

key.png

 

Step 2: Prepare your Google Sheet

Preparing your data and setting up the entry form in Award Force will be the most time-consuming step in this process. You have to make sure there's a field in Award Force for each question you want to import.

The Google Sheet will need to contain a row for each entry and as a minimum you will need to provide Award Force with the entrant slug, category slug, chapter slug, season slug, and the entry title. Please see What is a slug? for more information.

The slugs you can get from Award Force once you've created the entry form and added the users. You can import users in bulk through the user interface in Award Force. Any entry fields you wish to import will also need to be created in Award Force first and then these slugs added to the Google Sheet.

If you want to upload files you'll need to provide the URLs for the files as a column in the Google Sheet. For this tutorial we're going to import one single file upload field for each entry.

Here's an example spreadsheet we've prepared so you can see the format.

example.png

 

Step 3: Use the Import entries Zapier template already created

zapier-afsearch.png

  1. Sign in to your Zapier account. 
  2. Search for the Award Force app by clicking on the top right search icon and typing Award Force
  3. Look for the Award Force - Google Sheets integrations by typing Google sheets in the search bar  or by clicking on the Google Sheets icon
  4. Type New spreadsheet row in the trigger and Create entry in the action then Connect Award Force + Google Sheets as shown in the image below 

AFGS.jpg

 

Select Google Sheet

For the Google Sheets trigger select New or Updated Spreadsheet Row (Team Drive). Select your Google Drive and the spreadsheet you want to use. Let Zapier test the trigger to make sure it can find your spreadsheet.

 

Create entry in Award Force

Note: If you need to create the user in Award Force too then you'll want to select Create User before adding the Create Entry step.

We're now going to take this data from the spreadsheet and tell Zapier where to put it in Award Force. You will first need to connect to Award Force using the API key you created in step 1. Copy and paste this along with the accept header (application/vnd.Award Force.v2.0+json) into Zapier to connect to Award Force.

Screenshot_2021-01-29_at_14.19.28.png

Once you've connected the account, you can set up the action in Zapier by completing the fields using the data retrieved in the previous step from your Google Sheet.

values.png

Test and continue. 

If you don't need to upload files to the entry then you're done! That's it. If you do want to upload files then continue to the next step.

 

Upload single file upload fields and attachments

To upload files to Award Force the data must be in base64 format. This next step will convert a file URL to base64 for you and this can then be inserted into the Award Force database. You will need to add the Code by Zapier app as the next step. 

Screenshot_2021-04-21_at_14.51.42.png

 

Select Run Javascript and click Continue. For the input data select the file URL from the spreadsheet.

Screenshot_2021-04-21_at_14.58.40.png

 

Then paste in this code:

const response = await fetch(inputData.url);
const content = await response.buffer();
const data = content.toString("base64");
output = [{ data }];

 

Upload entry file

For this last step you will need to select the field slug from your spreadsheet and the filename from your spreadsheet. The entry slug will come from step 2 of the Zap and the data will come from Step 3 of the Zap. See below:

 

upload.png

 

You can now test the action and turn on the Zap. One test entry should appear in your Award Force account.

 

Transfer existing data

To transfer the entire contents of the spreadsheet go to the Zaps page in Zapier and find your Zap. Click on the arrow to the right of the Zap and choose Transfer existing data. 

 

transfer.png

This will load all the data from Google Sheets. You can then click Select All followed by Send data to Zap

sheets.png

If you need to upload additional files then you can add more steps to the Zapier template, Selecting the Award Force app, and then Upload Entry File for the Action Event.

 

 

Need more help? Get in touch!

We're here to help if you need it. Simply get in touch with our Client Success team through one of the methods available at the base of the page.