Question

How can I format Google Sheets data for better readability when posting to Slack?

  • 23 October 2023
  • 9 replies
  • 94 views

Hey all,

We have a spreadsheet kept in Google Sheets that records employee travel info. We are attempting to have the spreadsheet outputted to a specific Slack channel every week. I’ve successfully created a Zap to post the data to Slack, but it’s effectively outputting it as unformatted csv data.

For example, it’s basically outputting it as:

Name,Title,Traveling to,Arrival Date,Return Date,John Smith,Director,New York,10/27/23,10/31/23

As seen above, it outputs it all in one line.

Is there a way to get Zapier to format it nicely or put it in a more readable format? Or does anyone have any ideas on how to make it more user-friendly with Slack itself? Drawing blanks on what can be done on the Slack side of things, unless there’s some table formatting native to Slack that I’m unfamiliar with.


9 replies

Userlevel 7
Badge +14

Hi @TDR 

Good question.

Please post screenshots with how your Zap steps are configured to give us more context.

Thanks for the response @Troy Tessalone

Currently, my Zap steps are as follows:

I added an AI-generated step 3 to try and handle formatting, but with no change.

I have the Google Sheets step handled as such:

Note that the table spans columns A to H and the data is first listed on row 9.

Userlevel 7
Badge +14

@TDR

We would need to see screenshots with how Steps 3-4 are configured.

 

 

@Troy Tessalone step 3 is configured as such:

and step 4 just sends the output of step 3 to the specified Slack channel:

 

Userlevel 7
Badge +14

@TDR 

Try using this as step 3 instead: Formatter > Utilities > Line Items to Text

Thanks @Troy Tessalone, I tried that and I believe I made more progress.

It’s still outputting it as a single line, but I think my remaining questions are:

  1. How can I get Zapier to take the output from the Google Sheet/CSV and create new lines for each row when it pushes the data to Slack? Currently, the data is being pushed to Slack in a single line. I noticed that the raw data that gets pulled separates each row with square brackets, but I’m unsure how to get Zapier to distinguish this as a new line when it pushes the data to Slack.

    To be more specific, currently I am getting this pushed to Slack:
    Name,Title,Traveling to,Arrival Date,Return Date,John Smith,Director,New York,10/27/23,10/31/23
    When I’m looking for this:
    Name,Title,Traveling to,Arrival Date,Return Date
    John Smith,Director,New York,10/27/23,10/31/23
  2. Can I get Zapier to create a text snippet in Slack and push the data via that text snippet? Although it appears this is the same functionality as just pushing a CSV to Slack, which I figured out how to achieve with Zapier, which may mean I am good on this point.

The main question is getting Zapier to recognize new lines from the Google Sheets/CSV data, and I think I’ll be all set.

Userlevel 7
Badge +14

@TDR 

We would need to see updated screenshots with how your Formatter step is configured.

@Troy Tessalone my apologies, here’s the latest screenshots:

For reference, the other input value options for the above were either individual columns or the raw data. The other steps stayed the same, though the Slack step is now calling the following:

I arbitrarily chose “Output Item 1”, though all options appear to output the same data, except for “Output Text” which outputs the data, but duplicated.

Userlevel 7
Badge +14

@TDR 

Did you try changing the Separator value?

Check the field description for guidance and click the more link to see more details.

 

Reply