All integrationsDatabases
Neon
Run Neon serverless Postgres from a workflow: create and delete projects, branch a database for a preview or a test run and reset or roll it back, add databases and roles, and hand the next step a ready-to-use connection string.
- actions
- 20
Actions
Steps a workflow can run in Neon.
- List organizationsList the Neon organizations this API key belongs to, with each one's ID, name and plan. Every Neon project belongs to an organization, and listing or creating projects asks for one. With an organization or project-scoped key it returns the one organization that owns the key.
- List projectsList the projects in an organization, with each one's ID, region, Postgres version and when its compute was last active. Projects Neon could not read in time are named in 'unavailable_project_ids' rather than silently left out.
- Get projectGet a project's settings and this billing period's usage - compute seconds, active seconds, storage, data written and data transferred - for a workflow that watches usage.
- Create projectCreate a Neon project, which comes with a default branch, a database, a role that owns it and a compute. The result includes 'connection_uri', a ready-to-use Postgres URL that contains the role's password. Neon finishes starting the project in the background, so the next step that changes it may wait a few seconds; that happens automatically.
- Delete projectDelete a project and everything in it - every branch, database, role and compute - and drop its connections. Neon can recover a deleted project for 7 days, but recovery is not an action here. Returns the project as it was.
- List branchesList a project's branches with their state, parent, size and which one is the default. Use it to find a branch's ID, or to tidy up old preview branches.
- Get branchGet one branch. Its 'current_state' is 'ready' once Neon has finished creating or resetting it, so a workflow can check this before using the branch.
- Create branchCreate a branch - an instant copy of another branch's data, for a preview deployment, a test run or a risky migration. It gets its own compute unless you turn that off, and the result's 'connection_uri' (which contains a password) connects to it. The Free plan allows 10 branches per project.
- Rename branchGive a branch a new name. Its ID and data stay the same.
- Delete branchDelete a branch with its databases, roles and computes, and drop its connections. Neon will not delete a project's default or root branch, or a branch that other branches were copied from. A branch that is already gone is reported as 'already_deleted' rather than as an error.
- Reset or restore branchReplace a branch's data. Leave 'Restore from' blank to reset the branch to its parent's latest data - the usual way to refresh a preview branch. Or pick the branch itself with 'As of' to roll it back to an earlier moment, which needs 'Keep current state as'. The branch's current data is replaced and its connections drop.
- List databasesList the databases on a branch, with the role that owns each.
- Create databaseCreate a database on a branch, owned by an existing role. Create the role first with 'Create role' if it does not exist.
- Delete databaseDelete a database from a branch, with all of its data on that branch. This cannot be undone. A database that is already gone is reported as 'already_deleted' rather than as an error.
- List rolesList the Postgres roles on a branch. Passwords are never included - Neon returns one only when a role is created or its password is reset.
- Create roleCreate a Postgres role on a branch. The result includes the new role's password in 'role.password' - the only time Neon returns it. Creating a role drops the connections to the branch's compute.
- Reset role passwordGive a role a new password, returned in 'role.password'. The old password keeps working until Neon's operation finishes, and connections to the branch's compute drop.
- Get connection URIGet a ready-to-use Postgres connection URI for a database and role, for a later step or an app to connect with. The URI contains the role's password. The branch needs a read-write compute.
- List computesList a project's computes (IDs start with 'ep-'), with the branch each serves, its host and its state. 'idle' means scaled to zero, which is normal - it wakes on the next connection.
- Get operationCheck on one of the operations a change started - every create, delete, rename, reset and password reset returns them in 'operations'. 'done' turns true when it has finished either way and 'succeeded' says which; Neon suggests checking about every 5 seconds.
No actions match that.
Automate Neon with Lodol.
Connect Neon and ask your AI for your first workflow.
Free plan, no credit card