← PostgreSQL

Update Row with PostgreSQL API

Pipedream makes it easy to connect APIs for PostgreSQL and 1000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Update Row with the PostgreSQL API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

Create a workflow to Update Row with the PostgreSQL API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Update Row action
    1. Connect your PostgreSQL account
    2. Select a Schema
    3. Select a Table
    4. Select a Lookup Column
    5. Select a Lookup Value
    6. Configure Row Values
    7. Configure Reject Unauthorized
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Update Row with PostgreSQL API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + PostgreSQL
 
Try it
Update Row with PostgreSQL API on New Item in Feed from RSS API
RSS + PostgreSQL
 
Try it
Update Row with PostgreSQL API on New Message from Discord API
Discord + PostgreSQL
 
Try it
Update Row with PostgreSQL API on New Message In Channels from Slack API
Slack + PostgreSQL
 
Try it
Update Row with PostgreSQL API on New Message in Channel from Discord Bot API
Discord Bot + PostgreSQL
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Update Row on PostgreSQL
Description:Updates an existing row. [See Docs](https://node-postgres.com/features/queries)
Version:0.0.7
Key:postgresql-update-row

Code

import postgresql from "../../postgresql.app.mjs";

export default {
  name: "Update Row",
  key: "postgresql-update-row",
  description: "Updates an existing row. [See Docs](https://node-postgres.com/features/queries)",
  version: "0.0.7",
  type: "action",
  props: {
    postgresql,
    schema: {
      propDefinition: [
        postgresql,
        "schema",
        (c) => ({
          rejectUnauthorized: c.rejectUnauthorized,
        }),
      ],
    },
    table: {
      propDefinition: [
        postgresql,
        "table",
        (c) => ({
          schema: c.schema,
          rejectUnauthorized: c.rejectUnauthorized,
        }),
      ],
    },
    column: {
      propDefinition: [
        postgresql,
        "column",
        (c) => ({
          table: c.table,
          schema: c.schema,
          rejectUnauthorized: c.rejectUnauthorized,
        }),
      ],
      label: "Lookup Column",
      description: "Find row to update by searching for a value in this column. Returns first row found",
    },
    value: {
      propDefinition: [
        postgresql,
        "value",
        (c) => ({
          table: c.table,
          column: c.column,
          schema: c.schema,
          rejectUnauthorized: c.rejectUnauthorized,
        }),
      ],
    },
    rowValues: {
      propDefinition: [
        postgresql,
        "rowValues",
      ],
    },
    rejectUnauthorized: {
      propDefinition: [
        postgresql,
        "rejectUnauthorized",
      ],
    },
  },
  async run({ $ }) {
    const {
      schema,
      table,
      column,
      value,
      rowValues,
      rejectUnauthorized,
    } = this;
    try {
      const res = await this.postgresql.updateRow(
        schema,
        table,
        column,
        value,
        rowValues,
        rejectUnauthorized,
      );
      const summary = res
        ? "Row updated"
        : "Row not found";
      $.export("$summary", summary);
      return res;
    } catch (error) {
      throw new Error(`
      Row not updated due to an error. ${error}.
      This could be because SSL verification failed, consider changing the Reject Unauthorized prop and try again.
    `);
    }
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
PostgreSQLpostgresqlappThis component uses the PostgreSQL app.
SchemaschemastringSelect a value from the drop down menu.
TabletablestringSelect a value from the drop down menu.
Lookup ColumncolumnstringSelect a value from the drop down menu.
Lookup ValuevaluestringSelect a value from the drop down menu.
Row ValuesrowValuesobject

Enter the column names and respective values as key/value pairs, or with structured mode off as {{{columnName:"columnValue"}}}

Reject UnauthorizedrejectUnauthorizedboolean

If not false, the server certificate is verified against the list of supplied CAs. If you get the error Connection terminated unexpectedly try to set this prop as false

Authentication

PostgreSQL uses API keys for authentication. When you connect your PostgreSQL account, Pipedream securely stores the keys so you can easily authenticate to PostgreSQL APIs in both code and no-code steps.

Before you connect to your PostgreSQL database from Pipedream, please make sure your database is either:

  1. Accessible from the public internet (You may need to add a firewall rule on 0.0.0.0/0 on port 3306), or

  2. Accessible from an SSH server that you route PostgreSQL requests through

After that, enter the following values:

  • host: The hostname or IP address of your PostgreSQL server
  • port: 3306, unless you run PostgreSQL on a different port
  • username: The account username to log in
  • password: The account password to log in
  • database: The name of the PostgreSQL database to run queries against

About PostgreSQL

The World's Most Advanced Open Source Relational Database

More Ways to Use PostgreSQL

Triggers

New Column from the PostgreSQL API

Emit new event when a new column is added to a table. See Docs

 
Try it
New or Updated Row from the PostgreSQL API

Emit new event when a row is added or modified. See Docs

 
Try it
New Row from the PostgreSQL API

Emit new event when a new row is added to a table. See Docs

 
Try it
New Row Custom Query from the PostgreSQL API

Emit new event when new rows are returned from a custom query that you provide. See Docs

 
Try it
New Table from the PostgreSQL API

Emit new event when a new table is added to the database. See Docs

 
Try it

Actions

Delete Row(s) with the PostgreSQL API

Deletes a row or rows from a table. See Docs

 
Try it
Execute Custom Query with the PostgreSQL API

Executes a custom query you provide. See Docs

 
Try it
Find Row with the PostgreSQL API

Finds a row in a table via a lookup column. See Docs

 
Try it
Find Row With Custom Query with the PostgreSQL API

Finds a row in a table via a custom query. See Docs

 
Try it
Insert Row with the PostgreSQL API

Adds a new row. See Docs

 
Try it