Passing row_id to Button/URL

I have a Button field type that opens a URL that links to an Integromat webhook.

Integromat then runs some operations and should update the row where the button was pressed. I need to pass a row_id to the webhook for that to work correctly though.

Here is a desired URL format:
https://hook.integromat.com/xxxxxxxxxxxxxxxxxx?customParam={Param column name}?rowid={row_id}

I’m can pass other column names, but I can’t seem to figure how to get the row ID. I’ve tried all sorts of variations of row_id, id, ID, Row ID, rowid - nothing seems to work.

I appreciate any tips.

So in the end I’ve opted for a more robust solution using Scripts and provided context utilities.

Here is a simple POST request to Integromat webhook for reference:

let hookUrl = 'https://hook.integromat.com/xxxxxxxxxxxxxxxxxxx'
let data = {
  rowId: base.context.currentRow['_id'],
  customProperty: base.context.currentRow['Column name']
};

await fetch(hookUrl, {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify(data)
}).then(res => {
  console.log('Request complete! response:', res);
});

1 Like

Awesome! Thanks for sharing!

Yes, I was going to mention the context utilities but you figured it out yourself. Amazing!

As this is not a bug, I’ve moved this topic to Tips & Tricks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.