I see the type of PreviousValue is string (for status column), but I’m trying to find out if that’s consistent. I haven’t found anything that can say for sure, but seems like type might be whatever the value
of the column used to be - not text
, which is always a string.
If that’s the case, we’ll need to parse the returned value to avoid errors.
Is there any way someone can help me with this? what type of value will be returned with the webhook for each column type?
Hello there @Soroh,
As you said, depending on the type of column, the previousValue will be different.
For example, if you change a date column, you can receive something like this:
previousValue: {
date: '2024-01-01',
icon: null,
time: null,
changed_at: '2024-03-31T09:50:57.312Z'
}
If you change a phone column, you can receive something like this:
previousValue: { phone: '8005882300' }
And which each different column type you will receive different formats.
You can test this by adding a webhook in your board that gets triggered when any column changes, add all kind of columns in your board, and log the payload on your end, and then change the columns one by one to see what you get
Cheers,
Matias