Create a one-time charge from a Google Sheets row
Create a charge from Google Sheets with Make
Use this template to create charges in Asaas from new rows added to Google Sheets.
The scenario looks up the customer before creation and can create the record when it does not exist yet. The charge can also include Payment Split according to the configured data.
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 charge.
ImportantThe environment selected in Make must match the API Key used. Sandbox keys only work in the Sandbox environment, and Production keys only work in the Real environment.
During configuration, use:
- Sandbox for testing;
- Real for Production.
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 charge with Split"]
E --> F
F --> G["Validate the created charge"]
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
The scenario looks up the customer before creating a new record. If it finds a matching customer, it reuses the ID; otherwise, it creates the customer before the charge.
1. Prepare the spreadsheet
Use the template spreadsheet and make a copy in your Google Drive.
The spreadsheet must provide the data used by the scenario, such as:
| Information | Purpose |
|---|---|
| Customer name | Payer registration |
| CPF/CNPJ | Customer identification and lookup |
| Customer data and notifications | |
| Charge amount | Amount to be charged |
| Due date | Due date |
| Split data | Distribution of amounts |
| Internal reference | Operation control |
If you change columns, names, or positions used by the template, also review the module mapping in Make.
2. Open the template in Make
Access the template:
Single charge 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 module configuration:
- select Create a Connection;
- enter a name for the connection;
- authenticate your Google account;
- select the spreadsheet stored in Google Drive;
- enter the spreadsheet location requested by the module.
The Google Sheets (Watch New Rows) module monitors new rows and starts the scenario.
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 a credential, see API Keys.
5. Review the scenario modules
The template uses the following components:
| Module | Function |
|---|---|
| Google Sheets (Watch New Rows) | Starts the scenario when a new row is detected |
| Asaas - List customers | Checks whether the customer is already registered |
| Router | Directs the flow according to the lookup result |
| Asaas - Create customer | Creates the customer when no matching record is found |
| Asaas - Create charge with split | Creates the charge with the mapped data |
| Asaas - Make an API Call | Allows access to additional endpoints when needed |
The scenario first looks up the customer by CPF/CNPJ to decide whether to use an existing record or create a new one.
6. Validate the scenario
Before using the Real environment:
- configure the connection in Sandbox;
- add a row with controlled data to the spreadsheet;
- confirm that the correct customer was found or created;
- validate the charge data;
- check the Split rules, when used;
- confirm the charge created in Asaas.
Expected result
The new row should result in a charge in Asaas linked to the corresponding customer.
If the customer does not exist yet, the scenario should create it before the charge.
AttentionThe scenario does not implement idempotency automatically. We recommend using internal references or additional validations to avoid duplicate charges.
Before reprocessing a row, confirm whether the charge has already been created. Repeated executions can generate new charges.
Common errors
| Situation | What to check |
|---|---|
| Authentication failure | Environment and API Key used |
| Customer not found correctly | CPF/CNPJ and mapped data |
| Charge not created | Required fields and execution of the previous modules |
| Duplicate charge | Reprocessing of the same row and internal controls |
| Split error | Distribution data and rules applicable to Split |
| Scenario stopped after spreadsheet change | Columns and mappings used by the modules |
Check the Make execution history to identify the module where the failure occurred.
Track the payment
Creating the charge ends the flow of this template.
If you extend the scenario to react to payments received, due dates, refunds, or other charge changes, use Webhooks instead of recurring API queries.
Next steps
Updated 14 days ago
