Help

Re: Slack Slash Command - Help

527 1
cancel
Showing results for 
Search instead for 
Did you mean: 

@JB_Bakst

Thank you so very much for publishing the Slack Slack Command How-To and Glitch repo!!! https://blog.airtable.com/api-content-series-slack-slash-command-app/

My team has this up and running on two of our most critical bases. It’s a longstanding dream come true (as Zoelle can tell you)! A few questions though…

  1. How can we specify the fields returned within the Slack message attachments? We have 80+ fields in our base and only want to return a very small sub-set. Can this filtering be done via View?

  2. Once we have limited the fields returned, how can we specify the order in which they are returned? Right now we are seeing variance in the order of the fields returned, between attachments.

  3. You suggest pagination for navigation of 10+ returned records. How is that configured?

Again, MANY thanks! I’ve spent the last two Thanksgivings poking at this project, and FINALLY have 90% of what we need. :raised_hands:

A.

2 Replies 2
JB_Bakst
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey Andrew!

Good questions :slightly_smiling_face:

For the first two, I’d suggest checking out the formatAirtableRecordAsSlackAttachment function. This is where we actually choose which fields to show in the Slack attachment (and the ordering), so you could update that code to use whichever fields you want.

Pagination is a bit trickier, and there are a few ways to do it. I’d recommend checking out the pageSize param to the list records API endpoint, and the offset that is returned in the response. You could fetch only 10 records on the first request by setting pageSize to 10, and then use the offset to fetch another 10 records on a subsequent request (maybe using Slack buttons).

JB

Thank you, JB. I really appreciate the support.

Unfortunately though, I’m not a developer; I’m able to read code well enough to tweak it, but am not sufficiently versed to add functionality.

BY NO MEANS would I ever assume it’s your role to help at that level or add features to your repo!

But I would like to ask here, if there are any freelance developers that have already started working with your code, interested in helping us take our nascent Airtable bots to the next level. If so, please reply here or email me at acenright@gmail.com.

Thanks all,

A.