The iAuditor Exporter is an integration tool available to users with iAuditor Premium subscriptions. The Exporter can help streamline exporting to multiple formats at once through automation. This quick-start guide walks through the basic setup of the Exporter, which automatically exports inspections in CSV format, a format commonly used by business intelligence tools such as PowerBI or Tableau.

For the full detailed guidance and export options, see our support page here.

The Exporter is a tool we offer as a part of the Software Developer Kit (SDK). If you are looking to build your own custom integration using the tooling available via the SDK, please see our repositories in Python and Javascript.

Requirements

  1. Knowledge of running command lines
  2. iAuditor Premium Subscription
  3. iAuditor API Token
  4. Python 3.6 or above

For each section header you will find instructions for both macOS (Apple) and Windows operating systems. Please review the instructions related to the device you are installing the Exporter on.

IMPORTANT NOTE

If you run into any errors or have any questions regarding the setup process, please contact our customer support team for assistance.

1. Install Python

macOS:

  1. Installing Python on macOS is through a tool called Brew
  2. Click here to install Brew
  3. Copy the entire command line below header “Install Homebrew”
    e.g. /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
  4. Open “Terminal” on your macOS – you can open it using keyboard command: command ⌘ + space, search for “Terminal” and press on keyboard “enter/return”
  5. In the Terminal window, paste the command line above using keyboard command: command ⌘ + V, and press on keyboard “enter/return”
  6. Homebrew will outline what needs to be installed, press on keyboard “enter/return” to continue
  7. Start installing Python by running brew install python3
  8. If you do not see any errors for the installation, continue to download the Exporter
    IMPORTANT NOTE

    Sometimes Terminal needs restarting to detect newly installed software. If brew install python3 gives an error, try quitting your Terminal (command ⌘ + Q) and opening it again.

Windows:

  1. Click here for the Python Windows releases page
  2. Find under “Stable Releases”, and select Download Windows x86-64 executable installer
  3. The download will begin, once completed, open the installer
  4. During the installation steps, make sure to check the box that reads “Add to PATH”
    IMPORTANT NOTE

    If you forgot to check the box for “Add to PATH”, simply re-run the installer to select the checkbox.

  5. Continue to download the Exporter

2. Download the Exporter

The iAuditor Exporter script is hosted on GitHub so the easiest way to download the Exporter is by cloning the repository that holds the script. This method is also useful in the long term as it streamlines the update process when we publish updates to the code.

macOS:

  1. In the Terminal window, run brew install git
  2. If you do not see any errors for the installation, continue to the next step
  3. Navigate to the folder where you want to store the Exporter
    e.g.run cd Documents/iAuditor/Exporter_Tool
    See here for instructions on using commands in macOS Terminal
  4. Once you are in the desired directory, run git clone https://github.com/SafetyCulture/iauditor-exporter.git
  5. Continue to set up the Exporter

Windows:

  1. Click here to download Git for Windows
  2. The download will begin, once completed, open the installer
  3. Proceed through the default installation steps
  4. Once done, click “Next” again to close the installer – the installer will offer to launch Git but this is not necessary for the Exporter
    IMPORTANT NOTE

    You need to be a Windows system administrator to install Git successfully. If you are not an administrator, and cannot acquire administrator access, please see our support page here for the manual download process.

  5. If you do not see any errors for the installation, continue to the next step
  6. Open “Command Prompt/CMD” on your Windows – you can open it using the Windows keyboard key, search for “Command Prompt” or “CMD” and press on keyboard “Enter”
  7. In the CMD window, navigate to the folder where you want to store the Exporter
    e.g.run cd C:\Users\Administrator\Documents\iAuditor\Exporter_Tool
    See here for instructions on using commands in Windows Command Prompt
  8. Once you are in the desired directory, run git clone https://github.com/SafetyCulture/iauditor-exporter.git
  9. Continue to set up the Exporter

3. Set up the Exporter

macOS:

  1. In the Terminal window, navigate into the Exporter folder – it will be called “iauditor-exporter”
    e.g.run cd Documents/iAuditor/Exporter_Tool/iauditor-exporter
  2. Run pip3 install -r requirements.txt
  3. If you do not see any errors for the installation, continue to the next step
  4. In the “iauditor-exporter”, you will find two folders:
    – configs: containing the default “config.yaml.sample” file
    – last_successful: containing the default “last_successful-iauditor.txt” file
  5. config.yaml.sample: this file needs to be renamed as “config.yaml” and configured before running the Exporter, see our support page here for the key configurations
  6. last_successful-iauditor.txt: this determines the given time from when inspection data is exported, see our support page here for guidance on the timestamp format
  7. Once both files are configured, continue to run the Exporter

Windows:

  1. In the CMD window, navigate into the Exporter folder – it will be called “iauditor-exporter”
    e.g.run cd C:\Users\Administrator\Documents\iAuditor\Exporter_Tool\iauditor-exporter
  2. Run pip install -r requirements.txt
  3. If you do not see any errors for the installation, continue to the next step
  4. In the “iauditor-exporter”, you will find two folders:
    – configs: containing the default “config.yaml.sample” file
    – last_successful: containing the default “last_successful-iauditor.txt” file
  5. config.yaml.sample: this file needs to be renamed as “config.yaml” and configured before running the Exporter, see our support page here for the key configurations
  6. last_successful-iauditor.txt: this determines the given time from when inspection data is exported, see our support page here for guidance on the timestamp format
  7. Once both files are configured, continue to run the Exporter

4. Run the Exporter

Each time you want to run the tool, you need to ensure you have used the cd command to move into the correct directory.

macOS:

  1. In the Terminal window, run python3 exporter.py –format csv
  2. The Exporter starts exporting inspections to CSV format into the folder path of /iauditor-exporter/exports/iauditor
  3. If you wish to automate the Exporter, run the loop command
    e.g. python3 exporter.py –format csv –loop

Windows:

  1. In the CMD window, run python exporter.py –format csv
  2. The Exporter starts exporting inspections to CSV format into the folder path of /iauditor-exporter/exports/iauditor
  3. If you wish to automate the Exporter, run the loop command
    e.g. python exporter.py –format csv –loop

IMPORTANT NOTE

The Exporter can also be used to export Actions, and inspections into other formats such as PDF, DOCX, media, and web report links. Please see our full documentation here for export options.

CSV export format

As the iAuditor Exporter can automate exports to run until interrupted, the CSV format in particular can be useful in many aspects:

  1. Improved compatibility with spreadsheet software and business intelligence tools.
  2. Automatic exporting of newly completed inspections
  3. An improved format that effectively conveys complex inspections data like repeat sections (dynamic fields), list of images, and quoted text.
  4. A more flexible format that gracefully handles templates that change over time. Templates that change over time disrupts the expected inspection structure.
  5. A more predictable format for easy parsing, database importing, and data analytics.

The data however, can sometimes be tricky to interpret, the table below helps outline each data label and their types:

Column HeaderItem TypeDescription
ItemTypeStringThe type of response selected for questions in the template editor.
e.g. signature, inspection date, location
LabelStringThe label of the questions written in the template editor.
e.g. Is PPE (personal protective equipment) worn at all times?
ResponseString / Number / BooleanThe response label or value given to a question.
e.g. Safe, TRUE, 18
CommentStringThe relevant notes added to multiple questions.
e.g. This machine is unsafe due to leakage.
MediaHypertextReferenceStringThe relevant hyperlink reference for any images attached to the specific question. See our documentation here for more information on getting the media file.
e.g. https://api.safetyculture.io/audits/audit_0d2ff6f5da4247e8a0ed34a011c4c3d6/media/53e8b154-18f3-4194-a32e-058020de55e4
LatitudeNumberThe latitude of the location data captured for location questions.
e.g. -33.8858784
LongitudeNumberThe longitude of the location data captured for location questions.
e.g. 151.2116864
ItemScoreNumberThe score associated with a particular item (question). See this support article for more information on setting question scores.
e.g. 3 (out of 5 points)
ItemMaxScoreNumberThe maximum score possible for an item (question). See this support article for more information on setting question scores.
e.g. 5
ItemScorePercentageNumberThe score percentage achieved for an item (question), calculated by ItemScore ÷ ItemMaxScore × 100.
e.g. 60
MandatoryBooleanThe indicator for whether the item (question) is marked as mandatory or not. TRUE if the item is mandatory, FALSE if the item is not. See this support article for more information on setting mandatory items.
e.g. TRUE
FailedResponseBooleanThe indicator for whether the response to the item (question) is marked as failed or not. TRUE if the response is a failed response, FALSE if the response is not. See this support article for more information on setting failed items.
e.g. FALSE
InactiveBooleanThe indicator for whether the item (question) is inactive under a logic field. TRUE if the item is not triggered by a logic field response in the inspection. See this support article for more information on using logic fields.
e.g. TRUE
ItemIDStringThe unique identifier of the item (question). This can be used to identify the same items over different inspections, even if the item label changes over time.
e.g. 192e714b-373a-41e9-82da-db1473c7317b
ResponseIDStringThe unique identifier of the response selected. This can be used to identify the same responses over different inspections, even if the response text changes over time.
e.g. 060ace00-1f61-468e-9c42-918fa93badcf
ParentIDStringThe unique identifier of the item, to which the current item/question is nested under in the template editor.
e.g. 6d27fc5d-47eb-4684-b5ab-3d75e462c49d
AuditOwnerStringThe full username of the account that created the inspection. See this support article for more information on changing usernames.
e.g. iAuditor Administrator
AuditAuthorStringThe full username of the account that last edited the inspection.
e.g. iAuditor Auditor
AuditNameStringThe name of the inspection. See this support article for more information on setting inspection title formats (naming convention).
e.g. 5 Feb 2020 / iAuditor Auditor / DOC000032
AuditScoreNumberThe total score achieved for the inspection.
e.g. 78
AuditMaxScoreNumberThe total maximum score possible for the inspection.
e.g. 100
AuditScorePercentageNumberThe score percentage achieved for the inspection, calculated by AuditScore ÷ AuditMaxScore × 100.
e.g. 78
AuditDurationNumber (seconds)The number of seconds taken from start to completion of the inspection. This is measured when the inspection is conducted on the mobile iAuditor app only.
e.g. 180
DateStartedStringThe date and time the inspection was started in Coordinated Universal Time (UTC). Format is DD/MM/YY HH:MM.
e.g. 5/2/20 0:26
DateCompletedStringThe date and time the inspection was completed in Coordinated Universal Time (UTC). Format is DD/MM/YY HH:MM.
e.g. 5/2/20 0:29
DateModifiedStringThe date and time the inspection was last modified in Coordinated Universal Time (UTC). Format is DD/MM/YY HH:MM.
e.g. 6/2/20 0:10
AuditIDStringThe unique identifier of the inspection.
e.g. audit_0d2ff6f5da4247e8a0ed34a011c4c3d6
TemplateIDStringThe unique identifier of the template used for the inspection.
e.g. template_d8f3011bb7f843dcb699871eaa528361
TemplateNameStringThe name of the template used for the inspection.
e.g. Scope of Work for Construction
TemplateAuthorStringThe full username of the account that created the template used for the inspection.
e.g. iAuditor Administrator
ItemCategoryStringThe label of the page or section, to which the item/question is nested under in the template editor.
e.g. Page 1
DocumentNoNumberThe document number of the inspection. This is a title page specific type of response. See this support article for more information on using document numbers.
ConductedOnStringThe date and time selected for the "Inspection date" type of response. Format is in ISO 8601 standard: yyyy-mm-ddThh:mm:ss.sssZ. This is a title page specific type of response. See this support article for more information on using title page questions.
e.g. 2020-02-05T00:26:05.000Z
PreparedByStringThe auto-populated username for the "Person" type of response. This is a title page specific type of response. See this support article for more information on using title page questions.
e.g. iAuditor Auditor
LocationStringThe auto-populated location for the "Inspection location" type of response. This is a title page specific type of response. See this support article for more information on using title page questions.
e.g. 2 Lacey St, Surry Hills NSW 2010, Australia
PersonnelStringThis is an old field from an older version of our template editor. We have now removed this as an option so it will only be populated if you are accessing data from an organization created before late-2019. The field was a free text field so its input will vary depending on use case.
ClientSiteStringThis is an old field from an older version of our template editor. We have now removed this as an option so it will only be populated if you are accessing data from an organization created before late-2019. The field was a free text field so its input will vary depending on use case.
AuditSiteStringThe label of the Site selected for the inspection. See this support article for more information on using Sites.
e.g. Sydney CBD
AuditAreaStringThe label of the Area, to which the Site selected for the inspection belongs to. See this support article for more information on using Sites.
e.g. New South Wales
AuditRegionStringThe label of the Region, to which the Area of the Site selected for the inspection belongs to. See this support article for more information on using Sites.
e.g. Australia

Limitations

The iAuditor Exporter is not able to:

  1. Restrict the CSV export to specific item (question) types – all items (questions) are exported for each inspection
    e.g. It is not possible to export just text answer questions from inspections, all questions in inspections will be exported
  2. Restrict what information is exported for each item (question) – all information is exported for every item (question)
    e.g. If a multiple choice question has notes added as well, it is not possible to just export the notes to questions
Was this article helpful?

We love your feedback. Please tell us what you think.


Yes No
Care to share a bit more so we can continue to make improvements for you? Care to share a bit more so we can make this article even better for you? Thanks for your feedback!