Create a subscription from a Google Sheets row
Create a subscription from Google Sheets with Make
Use this template to create subscriptions in Asaas from new rows added to Google Sheets.
The scenario looks up the customer before creation, registers them when needed, and creates the subscription with the settings defined in the flow, including Payment Split when used.
Before you begin
Have:
- a Make account;
- an active Asaas account;
- a valid API Key;
- a Google account with access to Google Drive;
- the template spreadsheet;
- the data needed to create the customer and the subscription.
In Make, use:
- Real for Production;
- Sandbox for testing.
The credentials for the two environments are different.
How it works
%%{init: {"flowchart": {"nodeSpacing": 18,"rankSpacing": 24,"diagramPadding": 4,"padding": 7}}}%%
flowchart TD
A["Add row in Google Sheets"] --> B["Look up customer in Asaas"]
B --> C{"Customer found?"}
C --> Sim(("Yes"))
C --> Nao(("No"))
Sim --> D["Use the existing ID"]
Nao --> E["Create the customer"]
D --> F["Create the subscription"]
E --> F
F --> G["Generate recurring charges"]
classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px
classDef decisao fill:#FEF3C7,stroke:#D97706,color:#78350F,stroke-width:3px
classDef validacao fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E,stroke-width:2px
classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px
classDef respostaSim fill:#22C55E,stroke:#15803D,color:#FFFFFF,stroke-width:3px
classDef respostaNao fill:#EF4444,stroke:#B91C1C,color:#FFFFFF,stroke-width:3px
class A inicio
class C decisao
class B,D,E,F validacao
class G sucesso
class Sim respostaSim
class Nao respostaNao
linkStyle default stroke:#94A3B8,stroke-width:2px
linkStyle 2 stroke:#22C55E,stroke-width:4px
linkStyle 3 stroke:#EF4444,stroke-width:4px
After the subscription is created, Asaas generates new charges according to the configured billing cycle. Future charges are not all created at once.
1. Prepare the spreadsheet
Use the template spreadsheet and make a copy in your Google Drive.
The spreadsheet provides the data used by the scenario, such as:
| Information | Purpose |
|---|---|
| Customer name | Payer registration |
| CPF/CNPJ | Customer identification and lookup |
| Customer data | |
| Amount | Recurring amount |
| Billing cycle | Interval between charges |
| Next due date | Date of the first charge |
| Split data | Distribution of amounts |
| Internal reference | Operation control |
If you change the spreadsheet structure, also review the fields mapped in the Make modules.
2. Open the template
Access:
Subscription creation with Payment Split
If you do not have an account yet, sign up for Make.
After opening the template, click Start Guided Setup.
3. Connect Google Sheets
In the Google Sheets configuration:
- select Create a Connection;
- enter a name for the connection;
- authenticate your Google account;
- select the spreadsheet stored in Google Drive;
- enter the location requested by the module.
The Google Sheets (Watch New Rows) module starts the scenario when it detects a new row.
4. Configure the Asaas connection
In the Environment field, select:
- Real for Production; or
- Sandbox for testing.
Then enter the API Key corresponding to the environment.
If you need to create or manage the credential, see API Keys.
5. Review the modules
The template uses the following components:
| Module | Function |
|---|---|
| Google Sheets (Watch New Rows) | Starts the scenario from a new row |
| Asaas - List customers | Checks whether the customer is already registered |
| Router | Directs the scenario according to the lookup result |
| Asaas - Create customer | Creates the record when the customer is not found |
| Asaas - Make an API Call | Creates the subscription with the data configured by the template |
In the currently documented template, creating the subscription with Split uses Make an API Call.
The Asaas API accepts split when creating the subscription. Each new charge generated by the recurrence receives the Split configuration defined in the subscription.
See the Create new subscription endpoint.
Understand Split in subscriptions.
6. Validate the scenario
Before using the Real environment:
- configure the connection in Sandbox;
- add a row with controlled data;
- confirm that the correct customer was found or created;
- validate the amount, billing cycle, and first due date;
- review the Split recipients and amounts, when used;
- run the scenario;
- confirm the subscription created in Asaas.
Expected result
The row should result in the creation of a subscription linked to the corresponding customer.
The subscription should remain configured to generate new charges according to the billing cycle and first due date provided.
Creating the subscription does not confirm that any charge has been received.
Before reprocessing a row, confirm whether the subscription has already been created. Make does not guarantee idempotency automatically.
Track the recurrence with Webhooks
The subscription and the generated charges have different life cycles.
Use the Events for subscriptions to track changes in the recurrence, such as creation, update, deactivation, or removal.
Use the Events for payments to track each generated charge and its financial cycle.
When a subscription charge is created, PAYMENT_CREATED contains the subscription field, which identifies the originating recurrence.
If you use Split, also track PAYMENT_SPLIT_DONE to confirm the settlement of each Split of the generated charges.
Prefer Webhooks over recurring queries to synchronize state changes.
Common errors
| Situation | What to check |
|---|---|
| Authentication failure | Environment and API Key |
| Customer not found | CPF/CNPJ and mapped fields |
| Subscription not created | Required data and execution of the previous modules |
| Duplicate subscription | Reprocessing of the same row and internal controls |
| Split not applied | Data sent at creation and Split rules |
| Scenario stopped after spreadsheet change | Spreadsheet structure and module mapping |
Check the Make execution history to identify the module where the failure occurred.
Next steps
Updated 14 days ago
