Skip to main content
Best answer

Update row in postgres with JSONB data

  • September 7, 2023
  • 7 replies
  • 326 views

amplicity

We have a postgres table with a JSONB column we’d like to update. We’re using ‘Update row in PostgreSQL”, however, when we specify a value, such as:

`{“key”: “Value”}`

 

..it inputs it into our db with escape characters that render the JSON invalid. We have also tried single quotes and other formatting, but are unable to find a consistent format that works. 

 

How can we format a jsonb value?

Best answer by shalgrim

@amplicity 

This integration doesn’t support jsonb.

We have an open feature request to support this, and I’ve gone ahead and logged your email as a vote for that feature. I don't have an ETA on when that might happen, we get so many feature requests every day, but we do use these lists when we're working on app updates.

As we have your email logged as a vote there, we will be sure to drop you an email to let you know as soon as we get any news on that front.

I’m sorry I don’t have a better answer for you here.

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • September 7, 2023

Hi @amplicity 

Good question.

Can you post screenshots with how your Zap steps are configured along with a specific example so we can have more context?


amplicity
  • Author
  • New
  • September 7, 2023

Def. See attached, let me know if that’s not clear.

 

 

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • September 7, 2023

@amplicity 

Have you tried removing the leading and trailing ‘ ?

Also, the values look to have JSON brackets {}, which may be impacting the JSON structure.

 


amplicity
  • Author
  • New
  • September 7, 2023

> Have you tried removing the leading and trailing ‘ ?

Yes, without ` ’ `, zapier automatically puts ` ” ` around the entire content, along with `\` escape characters for the quotes.

 

> Also, the values look to have JSON brackets {}, which may be impacting the JSON structure.

Correct, this is expected because we include query params. These are in the correct JSON structure and work within our application as expected.

 

 

Configuration
Postgres column after update

 

 

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • September 7, 2023

@amplicity 

If you suspect there is an issue with the Zap action, you can try opening a ticket with Zapier Support: https://zapier.com/app/get-help


shalgrim
Forum|alt.badge.img+8
  • Zapier Staff
  • Answer
  • September 7, 2023

@amplicity 

This integration doesn’t support jsonb.

We have an open feature request to support this, and I’ve gone ahead and logged your email as a vote for that feature. I don't have an ETA on when that might happen, we get so many feature requests every day, but we do use these lists when we're working on app updates.

As we have your email logged as a vote there, we will be sure to drop you an email to let you know as soon as we get any news on that front.

I’m sorry I don’t have a better answer for you here.


amplicity
  • Author
  • New
  • September 8, 2023

Thanks for the info, we’ll have to find another workaround for now!