How to Import Stripe Subscriptions to Airtable

In this guide, you'll learn to import Stripe subscriptions to Airtable with no-code. We'll use the Data Fetcher Airtable app to import the id, revenue and creation time for every subscription in our Stripe account. Finally, we'll set this to run automatically, and import Stripe subscriptions on a schedule.

Install Data Fetcher

Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'.

Group 1Data Fetcher Sign Up .png

Import Stripe Subscriptions to Airtable

On the home screen of the Data Fetcher app, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base.

click-create-your-first-request.png

On the create request screen in Data Fetcher, for Application, select 'Stripe'.

stripe-application-selected.png

Click 'New Stripe connection'. You will be taken to a new tab/window where you need to authorize Data Fetcher to read from your Stripe account. Select the Stripe account you want to import Stripe data from.

Stripe Oauth.png

For Endpoint, select 'List all subscriptions'.

stripe subscriptions endpoint.png

Enter a Name for your request, e.g. 'Import Stripe Subscriptions'. Then click 'Save & Continue'.

stripe subscriptions save continue.png

If you want to limit the subscriptions that are imported to Airtable to only those with a particular collection method, set Collection method to either 'Charge automatically' or 'Send invoice'.

If you want to limit the subscriptions imported to Airtable to only those created in a certain time period, you can set the Created option.

Click 'Run'.

stripe subscriptions run.png

The request will run and the Response field mapping modal will open. This is where you set how the fields from Stripe should map to fields in the output table. For each Stripe subscription field, you can either import or filter it. For an imported field, you can set whether to map them to an existing field or create a new field.

Make sure you import the 'Id' field, as we will use this to ensure the subscription records we have in Airtable are kept in sync with any changes in Stripe. Import 'Plan amount' & 'Plan interval' if you want to calculate the revenue from all your subscriptions. Import 'Created' which is a timestamp for when the subscription was created.

Click 'Save & Run'.

stripe subscriptions rfm.png

Data Fetcher will create any fields that need to be created in the output table, then run the request and import the subscriptions from Stripe to Airtable. Stripe has a limit of 100 subscriptions per run, so Data Fetcher may need multiple runs in order to import all subscriptions.

stripe subscriptions imported to airtable.png

Finally, we want to ensure Data Fetcher can match up subscriptions in Stripe with records in Airtable, even if we move those records around. To do this, click 'Advanced settings' to open the advanced output settings. Then for Update Based on Field, select 'Id'. Then click 'Save'

stripe-updated-based-on-id.png

Note: Stripe uses Unix timestamp fields for date fields (e.g. 'Created') that have numeric values. You can convert them to date format by using a formula field with this formula:

DATEADD('1/1/1970',Created,'seconds')

stripe-created-at-formula.png

Import Stripe Subscriptions to Airtable Automatically

At the moment, we have to manually run the request to import the Stripe subscriptions. We can use Data Fetcher's scheduled requests feature to automatically import them every 15 minutes/ hour/ day etc.

In Data Fetcher, scroll to Schedule and click 'Upgrade'.

table-1-schedule-upgrade-button.png

A new tab will open where you can select a plan and enter your payment details to upgrade.

Screenshot 2021-12-29 at 10.25.19.png

Return to the Data Fetcher app and click "I've done this".

table-1-schedule-ive-done-this-button.png

Click 'Add API key' in order to add your Airtable API key. You can find your Airtable API key here.

Group 11(1).png

Enter your Airtable API key and click 'Save'.

save-airtable-api-key.png

Enable Schedule this request.

schedule-data-fetcher-request.png

Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save' The request will now run on the schedule and import the Stripe subscriptions automatically.

Group 11(2).png