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.
📘

Important

The 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:

InformationPurpose
Customer namePayer registration
CPF/CNPJCustomer identification and lookup
EmailCustomer data and notifications
Charge amountAmount to be charged
Due dateDue date
Split dataDistribution of amounts
Internal referenceOperation control
📘

Important

The spreadsheet structure can be customized according to the needs of the integration.

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:

  1. select Create a Connection;
  2. enter a name for the connection;
  3. authenticate your Google account;
  4. select the spreadsheet stored in Google Drive;
  5. 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:

ModuleFunction
Google Sheets (Watch New Rows)Starts the scenario when a new row is detected
Asaas - List customersChecks whether the customer is already registered
RouterDirects the flow according to the lookup result
Asaas - Create customerCreates the customer when no matching record is found
Asaas - Create charge with splitCreates the charge with the mapped data
Asaas - Make an API CallAllows 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:

  1. configure the connection in Sandbox;
  2. add a row with controlled data to the spreadsheet;
  3. confirm that the correct customer was found or created;
  4. validate the charge data;
  5. check the Split rules, when used;
  6. 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.

🚧

Attention

The 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

SituationWhat to check
Authentication failureEnvironment and API Key used
Customer not found correctlyCPF/CNPJ and mapped data
Charge not createdRequired fields and execution of the previous modules
Duplicate chargeReprocessing of the same row and internal controls
Split errorDistribution data and rules applicable to Split
Scenario stopped after spreadsheet changeColumns 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


Did this page help you?