Supabase Writer
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai.
Please migrate to the recommended alternative components.
The Supabase Writer component lets you add new records to a table in your Supabase database directly from your Nappai dashboard.
It connects to your Supabase project using a pre‑configured credential and writes the data you provide.
How it Works
When you drop the component into a workflow, it first looks for a Supabase API credential that you have set up in Nappai’s credential manager.
That credential supplies the project URL and service key needed to authenticate with Supabase.
Once authenticated, the component takes the table name you specify and the list of records you provide, then calls the Supabase REST API to insert those records into the chosen table.
After the write operation finishes, the component returns a list of the newly created records (including their generated IDs) as the Response output.
Inputs
Credential
Before using the component, make sure you have created a Supabase API credential in Nappai’s credential section.
Select that credential in the component’s “Credential” field.
Input Fields
- Records: The data you want to add to the Supabase table. Provide a list of JSON objects that match the table’s schema.
- Table Name: The name of the table within your Supabase database where the records will be written.
Outputs
- Response: A list of the records that were successfully written, each including its generated
id
. This output can be used to confirm success or feed into subsequent steps.
Usage Example
- Create a credential
- Go to Credentials → Add Credential → Supabase API.
- Enter your Supabase URL and Service Key.
- Add the component
- Drag Supabase Writer into your workflow.
- Select the credential you just created.
- Set Table Name to
customers
. - Provide Records as:
[{"name": "Alice", "email": "alice@example.com"},{"name": "Bob", "email": "bob@example.com"}]
- Run the workflow
- The component writes the two records to the
customers
table and outputs the new records with their IDs.
- The component writes the two records to the
Related Components
- Supabase Reader – Retrieve data from a Supabase table.
- Supabase Updater – Update existing records in a Supabase table.
- Supabase Deleter – Remove records from a Supabase table.
Tips and Best Practices
- Match the schema: Ensure the JSON objects you send exactly match the columns and data types of the target table.
- Use batch writes: If you have many records, group them into a single list to reduce the number of API calls.
- Check the response: The
Response
output includes theid
of each inserted record; use it to confirm success or for further processing. - Handle errors gracefully: Wrap the component in a try‑catch block or use Nappai’s error handling to manage failed writes.
Security Considerations
- The Supabase URL and Service Key are stored securely in the credential manager; they are never exposed in the workflow UI.
- Keep your credential private and avoid sharing the workflow file with others who should not have access to your Supabase project.
- If you need to rotate keys, update the credential in Nappai and re‑select it in the component.