In this article, we're going to describe everything you need to know about exporting and importing Gravity Forms entries. Here are the main topics:
Your Options to Export Gravity Forms Entries
How to Export Gravity Forms Entries
How to Change the Export File Type
How to Create an Export Filter
How to Modify Gravity Forms Entries While Exporting Them
How to Schedule Exports for Gravity Forms Entries
How to Integrate Your Exported Gravity Forms Entries with External Applications
Frequently Asked Questions About Exporting Gravity Forms Entries
Your Options to Import Gravity Forms Entries
How to Import Gravity Forms Entries
How to Handle Different Import File Types
How to Create an Import Filter
How to Modify Gravity Forms Entries While Importing Them
How to Schedule Imports of Gravity Forms Entries
Other Reliable Sources of Information Around the Web
You have three main options to export Gravity Forms entries. Below is a brief description of each of them.
You can find this free option at Forms > Import/Export > Export Entities. It allows you to export fields, choose a date range, and apply simple filters. If all you want to do is dump all entries or a simple subset of entries for a form, this option should suffice. But if you need to do anything more sophisticated, you will quickly reach the limits of this tool.
For example, while you can stipulate that the entries must meet all of your filter conditions (equivalent to the AND operator) or any of your conditions (equivalent to the OR operator), you cannot mix these two operators to create a filter like "(Condition A and Condition B) OR Condition C" because there is no way to implement the parentheses. Also, you can only download a CSV version of your file.
You can purchase this plugin for $49 per year for a single site. It will allow you to export your entries to CSV, Excel, or PDF, but not XML. It will also allow you to create slightly more complex filters. But it doesn't allow you to schedule your exports, automatically integrate them with thousands of external apps, or participate in an end-to-end migration of entries from one site to another with minimal setup.
It also won't let you modify your export data on the fly without using advanced programming techniques. For these types of advanced features, you have to turn to WordPress's import/export leader.
You can purchase this plugin for a one-time fee of $149 for an unlimited number of sites, including a lifetime of free updates and support. It gives you the ability to do pretty much anything you want when exporting Gravity Forms entries, including creating filters of unlimited sophistication, modifying data on the fly, applying conditional logic using embedded code, etc.
You can export your entries to CSV, Excel, or XML, download them from a URL, schedule them to run automatically, and even automatically integrate your export data with thousands of external apps through Zapier.
Finally, you also get much broader WordPress export capabilities (posts, pages, taxonomies, custom post types and fields, etc.) for free out of the box, and if you want to splurge another $50 for the lifetime Gravity Forms Pro Package, you get an equally powerful tool for importing Gravity Forms entries.
To avoid any limitations, we're going to use this Pro Package to create examples for this article. If you don't have access to this plugin, you can use this free online sandbox. Just choose the Gravity Forms Entries option and click Create Sandbox. Let's begin with a simple walkthrough.
Go to All Export › New Export:
This will export all entries for the selected form. You can expand the Add Filtering Options section to filter your entries, but we'll describe how to do this later in this article. After you click the Customize Export File button, you will arrive at the Drag & Drop interface.
This screen allows you to choose your export columns. You do this primarily by dragging fields from the Available Data panel on the right into the column selection area on the left, as shown above. There are three sections in the Available Data panel:
These sections give you access to all the Gravity Forms entries data. In addition to selecting data fields for export, this interface offers far more advanced capabilities to create or modify export columns, which we'll describe later. Click Continue to proceed to the Export Settings screen.
This screen allows you to schedule your export and also to set advanced options such as only exporting entries that have been modified since the last export, or breaking exports into smaller batch processes and file output sizes. We'll describe the scheduling features in another section. For now, just click the Confirm & Run Export button.
When the export completes, you will see this screen: Click the CSV button to download your file. CSV stands for "comma-separated values", which is the default export format. You can also export to XML or Microsoft Excel. We'll show you how to do this in the next section. For now, you've just completed a simple export of Gravity Forms entries. In the next few sections, we'll show you how to perform increasingly more sophisticated exports.
To change the export file type, do the following in the Drag & Drop interface:
Alternatively, you can select Feed and then choose either Simple XML Feed or Custom XML Feed. If you choose Custom XML Feed, this will open up an XML Editor panel that lets you build as sophisticated an XML feed as you require.
The ability to filter any export is essential. This is no different when exporting Gravity Forms entries. WP All Export's filter tool is accessible in the New Export screen: Filters consist of three components:
In plain English, this simply means to export all Contact Form entries with the last name of "Jones". When you've provided all three rule components, click the Add Rule button.
What if you want a slightly more complex filter, such as exporting all the Contract Form entries with the last name of either "Jones" or "Wilkes"? Just add another rule. But as you do so, make sure that you select the OR operator: Otherwise, if you had left the default AND operator, no records would have been selected because no one has the last name of both "Jones" and "Wilkes".
What if you were looking for two specific individuals? This is where this plugin begins to truly separate itself from its competitors. All you do is add two sets of conditions and indent the second set like this: The first two rules are filtering for "Jason Jones". Both the first and last names must be correct, so an AND operator is used.
The same situation exists for the second set of rules that filters for "Jimmy Wilkes". But since you are looking for either person, the two sets of filters must be joined with an OR operator. Indentation is equivalent to the use of parentheses, so this query could actually be written as: (Name - Last = "Jones" AND Name - First = "Jason") OR (Name - Last = "Wilkes" AND Name - First = "Jimmy"). You may not need this kind of powerful filtering capability often, but when you do, you'll be glad you have it.
When exporting data from WordPress, you will sometimes need to alter it. This is often the case when you are exporting data to synchronize it with an external system.
WP All Export lets you modify export data in multiple ways in the Drag & Drop screen. First, you can just double-click a column in the column selection area and rename it. In this example, we have renamed the Name - Last field to become Last Name: The first arrow points to the field that you can change to any value. The second arrow points to the actual field name in the database. In this same form, you can click the Custom export field option and build a custom field that is a combination of other fields. Here, you are creating a Name field that consists of the following:
Finally, you can incorporate programming logic into custom fields by using the Function Editor in the lower section of the screen. A full description of this is beyond the scope of this article, but the main point is that you can create fields of arbitrary complexity, including conditional logic (i.e., if this, then A, else B). This makes it possible to always achieve the output you want, no matter how difficult or challenging. For a complete understanding of this capability, see How to Pass Exported WordPress Data Through PHP Functions.
WP All Export offers two scheduling options:
We're going to focus on automatic scheduling, which you can access in the Export Settings screen: Here are the required steps:
As you can see, this type of scheduling process is quite intuitive. To schedule exports using cron jobs on your server, please see Scheduling WordPress Exports Using Cron Jobs.
One of the main reasons that users schedule exports is to regularly update external systems, such as updating marketing platforms with users who have filled out a Gravity Form. The scheduled export will generate the necessary export file.
The question is, how do you get that file to the external system? Enter Zapier — a leading integration platform that acts as a middleman between WP All Export and thousands of external applications. We're not going to cover the details of using Zapier because there are articles dedicated solely to that, which we'll share. But we do want to give you an overview of the required process, as follows:
As you can see, this is a very powerful tool. For additional information, see How to Send Exported WordPress Data to Zapier.
You can export Gravity Forms entries to Excel simply by changing the Export Type to either Excel (XLS) or Excel (XLSX), depending of the version of Excel that you desire. When the export is complete, make sure you download the specific file type option and not the Bundle file.
Gravity Forms entries are stored in custom tables in your WordPress database. For detailed information on these tables, please see the official database structure.
You can export Gravity Forms entries to another site by performing what we call a migration. This involves exporting the Gravity Forms entries from the source site, downloading the Bundle file from this export, then uploading the Bundle file on the destination site. Because the Bundle file contains an import template, WP All Import will automatically configure the import portion of the process.
The three main options for importing entries are the same ones used for exports. They also have similar strengths and weaknesses, namely:
Again, we'll use the WP All Import option for our walkthrough, as it allows us to perform all required tasks. To create an import file, just perform an export of all Gravity Forms entries for the Contact Form.
Go to All Import > New Import:
The Review Import Data screen will appear: This screen lets you see how WP All Import has parsed your import file. You normally don't have to do anything here, as the plugin does a good job of parsing most import files. But it is a good idea to verify that everything is okay.
You can also filter your import in this screen by expanding the Add Filtering Options section. This gives you access to the same tool used in the export filter example, which means you have complete flexibility to filter out any entries that you don't want to import. When you've completed your review, click Continue to Step 3.
The Drag & Drop screen lets you map incoming data elements to their target form fields: As you can see from this image, all you have to do is drag the incoming data elements on the right to the target fields on the left.
A form's main fields are contained in the Gravity Forms Entries section at the top. However, there are other fields that you can target. These are contained in the Entry Notes and Other Entry Options sections, which you can expand and populate as needed. Click Continue to Step 4.
The Import Settings screen allows you to control important settings:
The Confirm & Run screen allows you to review your import prior to running it: It is rare that you will need to change anything here, but this is your last chance to review key elements of your import before proceeding.
If something does need to be changed, you can click the Go Back to Step 4 link (not shown) below the Confirm & Run Import button at the bottom. If everything is okay, click that button. WP All Import will now process your import. When the import is complete, you will see this type of confirmation screen: Take note of the summary section with the white background at the top. This is where the plugin confirms what took place during the import. After any import, always verify that your data is as you expect it to be. In this case, navigate to Forms > Entries in the WordPress main menu, select your target form, and check the entries.
As with the export process, you can import data using different file types. To do this, simply load the data in question, in this case, an XML file: You don't have to do anything special to identify this as an XML file. The plugin will do so on its own and then automatically adjust subsequent interfaces, as you can see from this alternative Review Import Settings screen... ..and this slightly altered Drag & Drop interface: Otherwise, the process and the interface principles remain exactly the same. This is the beauty of working with WP All Import. Regardless of whether you're importing, exporting, working with different file types, or targeting different post types, the experience remains consistent and intuitive throughout.
The basic mechanics of the import filter are the same as for the export filter, so we won't repeat those here. For a refresher, see How to Create an Export Filter.
One difference is that the Add Filtering Options section is in the lower half of the Review Import File screen, not the New Import screen.
Another, more important difference is that the import filter has to be applied to data outside the WP database. To do this, it uses XPath, which is a language used to address parts of an XML document. As part of this process, the filter rules you create go into a temporary XPath holding area before being applied to the incoming data: If you are a typical user, this will have very little impact on you. After you've finished entering your rules, all you do is click the Apply Filters to XPath button, and those rules will be applied exactly as if you had applied them directly to an export filter. The difference is that they are translated into the XPath language and exposed in the XPath field, as indicated by the red arrow: So why are we bothering to mention this? Because XPath is incredibly powerful, and the XPath field indicated by the red arrow above is fully editable. This means that, should you have any truly exotic import filter requirements that can't be expressed by WP All Import's filter rules, you can still achieve them using XPath.
The basic principles of modifying entries during an import are the same as during an export (see How to Modify Gravity Forms Entries While Exporting Them). The mechanisms are just slightly less formal. For example, say that you wanted to combine the incoming first and last names into a single name field for some reason. To do this, you don't have to click any options to open up additional edit fields. Instead, just drag the incoming elements where you want them:
Put another way, every form field can be treated like a custom import field.
The same is true for incorporating PHP functions. First, you can use any native PHP function directly in a form field. For example, say your incoming data includes honorific prefixes in the namefirst field, and you want to strip these out. You could use a function like this... [str_replace(array('Mr.', 'Ms.'), "", {namefirst[1]})] ...in the target field: If you want to do something more elaborate, you can expand the Function Editor section near the bottom, create your own user-defined PHP function, and then refer to it in your target field. For a complete understanding of this capability, see Calling PHP Functions In Your Import Configuration.
In order to schedule an import, you must choose the Download a File > From URL or the Existing File option in the New Import screen. For example, here is a new import using the From URL option:
Other than this requirement, the scheduling process for importing entries is exactly the same as described in How to Schedule Exports for Gravity Forms Entries, with one additional exception. In order for a scheduled import to achieve the desired result, you need to ensure that the data export feeding it (presumably from an external system) completes before your import starts.
Export Gravity Forms Entries - Plugin Description
Import Gravity Forms Entries - Plugin Description
Official Documentation: How to Export Gravity Forms EntriesOfficial Documentation: How to Import Gravity Forms Entries
Official Documentation: How to Migrate Gravity Forms Entries