Best answer

Display both field name and field value as text in Slack message

  • 2 May 2023
  • 3 replies
  • 78 views

I’m working on a zap that pulls data from Airtable when a record is created and then sends a message in Slack relaying details of the new record.

 

In short, I would like to display both the field name of the included field as well as the value within the field, both as text that pulls through into the subsequent Slack message that is sent. For example, in the screenshot attached, the message text would read "Congratulations to: Project Manager: Jordan Christian". I can obviously get the message to send through to Slack with just the text of "Jordan Christian", but I want "Project Manager: Jordan Christian". I know I could instead write out text thus reading "Project Manager: Project Manager: Jordan Christian", but I don't want to include static text in the message because some of the fields won't always need to be populated based on the record and subsequent data pulled into the zap each time.

 

I am also attaching the screenshot showing what is currently getting pulled into Slack, which is not what I want. I want the original field name from Airtable via Zapier to also populate in the message.

 

I don't think this is possible to achieve through simple Markdown (the ideal solution), but rather I need to use some sort of format step. If the latter is the case, I'm not sure exactly which format type to use.

 

I have scoured the online community board as well as Google and can't seem to find a solution to my issue so hoping y'all can assist me.

icon

Best answer by MohSwellam 2 May 2023, 20:55

View original

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

3 replies

Userlevel 7
Badge +8

Hi @ScribeKesh 

 

The field name cannot be obtained in the Zapier integration. You might be able to do so if you choose to go through the Webhooks route. 

 

However, since this is actually the Field Name, I would suggest you hardcode it. 

@MohSwellam Could you possibly expand upon what you mean by “hardcode it”? I would greatly appreciate it! I don’t have a developer background.

Userlevel 7
Badge +8

Hi @ScribeKesh 

 

What I mean is typing the field name :) 

 

“but I don't want to include static text in the message because some of the fields won't always need to be populated based on the record and subsequent data pulled into the zap each time.” 

 

Actually, now that I think about it a bit more, you can achieve that by creating a Formula field in Airtable with the message and a few IF statements :D Something like:

 

“IF({Project Manager},”Project Manager: “&{Project Manager})….