How to Automatically Email a Table Export as an Attachment

Updated July 2026 • 6 min read • By Fahad Murtaza • By Fahad Murtaza

TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources
TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources

Sending a fresh copy of your data table to stakeholders every morning, without touching WordPress, is one of those things that sounds like it requires a custom developer build. With TableCrafter Pro, it is a configuration step. This guide walks through combining TableCrafter's scheduled export and email alert features so a CSV, Excel, or PDF attachment lands in any inbox on your schedule. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV/PDF, role-based column visibility, and auto-refresh. Every table embeds on any page with a [tablecrafter] shortcode or the native Gutenberg block. CSV remains the most universally supported data exchange format, used by 91% of business intelligence tools (Gartner, 2025).

What You Need Before You Start?

This workflow requires the following:

After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.

Note: TableCrafter routes all email alerts through wp_mail() so they respect whatever mail transport your site already uses, including transactional providers like SendGrid, Mailgun, or Postmark.

How Does Step 1, Enable Export on Your Table Work?

Open the table you want to send. Go to TableCrafter → Tables, hover over the table name, and click Edit. Inside the table builder, locate the Export tab in the settings panel on the right side.

Toggle Enable Export on. Three format checkboxes appear:

Select at least one format. For automated email attachments, CSV and Excel are the most practical choices because they stay small even with thousands of rows and open directly in Excel or Google Sheets without any conversion step.

You can also configure which columns appear in the export independently from what is displayed in the table. Use the Column Visibility picker to hide columns from the on-screen table while still including them in the export, or vice versa, useful when you want to expose internal IDs to the email recipient but not to website visitors.

Tip: If your table uses role-based column permissions, the export respects them. A column marked visible only to Administrators will not appear in exports triggered by Editor-level or lower accounts.

How Does Step 2, Configure the Email Alert Work?

Still inside the table builder, click the Email Alerts tab. This panel controls when TableCrafter sends notifications and what those notifications contain.

The key settings for an attachment workflow are:

The email body is a rich-text field. You can write a plain summary, paste a table of key metrics, or leave it short and let the attachment carry the detail. Recipients do not need to log in to WordPress to access the data, it arrives as a standard email attachment.

Security note: Think carefully about what data you are sending and to whom before enabling exports. TableCrafter does not encrypt email attachments in transit beyond what your mail provider offers. For sensitive data, consider restricting recipients to internal addresses and using a provider with TLS enforcement.

What Is Step 3, Choose a Trigger: Scheduled vs. Event-Based?

TableCrafter Pro supports two families of triggers for email alerts:

Scheduled (Time-Based)

Under Trigger → Schedule, set a recurring interval:

Daily  , sends once per day at a configured time (UTC)
Weekly , sends on a chosen day of the week
Monthly, sends on the 1st of each month

Scheduled exports run on WordPress Cron (wp-cron.php). On high-traffic sites this fires reliably. On low-traffic sites, you should set up a true server cron to hit https://yoursite.com/wp-cron.php at the scheduled time so the trigger does not slip by hours waiting for a visitor to load a page.

Event-Based

Under Trigger → On Change, the alert fires when:

Event-based triggers are ideal for audit trails, for example, emailing a manager every time a driver updates a load record. The attachment in this case is a snapshot of the full table at the moment of the change, not just the changed row.

Combining both: You can have one alert on a schedule (daily summary to the whole team) and a separate alert on change (immediate notification to a supervisor). Each alert is configured independently in the Email Alerts tab.

How Does Step 4, Test Before Going Live Work?

Save your table settings. You will see a Send Test Email button at the bottom of the Email Alerts panel. Clicking it fires the alert immediately using the current table data, regardless of the trigger condition, and delivers it to the first address in your Recipients field.

Check the following when the test email arrives:

If the test email does not arrive within a few minutes, check your host's mail logs or your SMTP plugin's log. All TableCrafter AJAX calls and background tasks go through wp-admin/admin-ajax.php with nonce validation, so a failed email is almost always a mail transport issue rather than a TableCrafter configuration problem.

What Is Advanced: Filtering the Export by Role or Query?

Pro TableCrafter's role-based permissions apply at the table level and the column level, but you can also narrow the data included in a scheduled export using the table's Advanced Filters before saving.

For example, suppose you manage multiple drivers and want each region manager to receive only their drivers' load data. The approach is:

  1. Create a separate table per region with an Advanced Filter applied locking the region field to the relevant value.
  2. Configure a scheduled email alert on each table pointing to the appropriate manager's address.
  3. All three tables can read from the same underlying Gravity Form, TableCrafter handles the query filtering at render and export time.

This avoids any custom PHP and keeps everything inside the TableCrafter admin interface. Each manager gets a scoped export with no risk of seeing another region's data.

[tablecrafter id="42"]
[tablecrafter id="43"]
[tablecrafter id="44"]

Each shortcode renders the appropriate region's table on the front end, and each table's scheduled export emails the matching manager. The shortcodes [tablecrafter id="X"], [tablecrafter id="X"], and [tablecrafter id="X"] all map to the same handler, use whichever you prefer.

Data sources beyond Gravity Forms: The email export works with all TableCrafter data sources. If your table pulls from Google Sheets, REST API, Airtable, or WooCommerce, the attachment contains whatever rows that source returns after filters are applied. There is no Gravity Forms dependency for the export or email features.

Frequently Asked Questions

How Does Step 1, Enable Export on Your Table Work?

Open the table you want to send. Go to TableCrafter → Tables, hover over the table name, and click Edit. Inside the table builder, locate the Export tab in the settings panel on the right side.

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.

Column order is preserved across sessions. Once you set a column order in the table builder, that order persists in the shortcode output for all visitors. Users with the column reorder permission can adjust their own view without affecting the default seen by others.

The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.