Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

dynamic excel attachments on the email tool

dwilliams3
6 - Meteoroid

Hi, I am looking for some help regarding dynamic excel attachments on the email tool.

I have a data set with 13 different potential teams ([RequestedByTeam]). The query input may not have data for all teams, and the email tool errors on the teams without data. For instance, in the attached example only teams 1 - 7 have data, and teams 8 - 13 do not. The email tool errors on Team 8 as no excel attachment exists.

I think I am looking for a way to inspect teams that have records, and include only those team attachments. Not sure how to handle this.

I suppose another option is to add a null record for each team to insure there is an attachment for each team every time the workflow runs. Not sure how to handle this option either :).

Attached is a sample workflow and capture of desired email output. Thanks for your input.

7 REPLIES 7
rzdodson
12 - Quasar

@dwilliams3 quite a bit to unpack here, my friend. :)
I have some general questions that will help guide workflow development:

 

1. Are the number of teams known prior to the "core" of the workflow initiating? By "core", I mean the Table tool's start. Or, rather, are the number of teams likely to change over time? If not, then we would need to generate some data scaffold to dynamically intake the total number of teams we need to account for, creating a dummy row for them, and then work the remaining of the workflow (re: Generate Rows/Formula combo for the dummy row creation).
2. Have you thought of using a batch macro to get the number of records at the RequestedByTeam level, appending that value to the data set in the batch macro, and then using that Count Records value to create a SendEmail? flagging field to parse out who gets an email with a data table in it versus who receives a generic email (e.g. "TeamX did not have any data to report this week")?
3. Do each team have a need to see data from other teams? If not, then have you explored using the Report options within the Summarize tool, and then appending your email's header, etc. to it before creating your emails?

rzdodson
12 - Quasar

P.S.
Can definitely help with workflow development here. Just need to know what stones we have unturned so far.

dwilliams3
6 - Meteoroid

Hi rzdodson, thanks for your response. Please see my comments inline:

 

  1. Are the number of teams known prior to the "core" of the workflow initiating? By "core", I mean the Table tool's start. Or, rather, are the number of teams likely to change over time?
    1. [dw] the total number of teams are static at 13. But again, not all teams will have data when the workflow runs
  2. Have you thought of using a batch macro to get the number of records at the RequestedByTeam level, appending that value to the data set in the batch macro, and then using that Count Records value to create a SendEmail? flagging field to parse out who gets an email with a data table in it versus who receives a generic email (e.g. "TeamX did not have any data to report this week")?
    1. [dw] I saw a post similar to this thought. May be overkill for me since my the email distribution is static; that is, the email is sent to the same recipient regardless of what [RequestedByTeam] has data. That said, I think I understand the theory but still need help materializing. Could you amend my workflow using a count to determine what [RequestedByTeam]’s have data and then dynamically attach their excel files in the email tool?
  3. Do each team have a need to see data from other teams? If not, then have you explored using the Report options within the Summarize tool, and then appending your email's header, etc. to it before creating your emails?
    1. [dw] the email is sent to the same recipient regardless of what [RequestedByTeam] has data. I have not considered the report options / summarize tool but unclear how this would help me dynamically attach excel files when records exist for [RequestedByTeam]

 

Thanks again!

dwilliams3
6 - Meteoroid

Hi rzdodson - did you have any ideas I could try? 

 

Thanks for your help.

rzdodson
12 - Quasar

@dwilliams3 let me take a look at this one today for you. I am thinking there is a simpler to way to handle this with a BUD tool rendering a singular xlsx file, and then having the Email tool in anchor 2 of the BUD tool pointing to that temp file.

 

In this scenario, you would have your workflow generate the rendered xlsx file that puts "Section Breaks" between your various tables. Those tables are "Grouped" by the RequestedByTeam level. When that occurs, Alteryx will create a new tab for each RequestedByTeam value in one file. This gets you passed the situation where Team 8-13 errors out the workflow while still giving you the capability to send the data to its intended recipient.

dwilliams3
6 - Meteoroid

Thanks @rzdodson - I think this is a creative solution that meets the requirements. Looking forward to your reply.

rzdodson
12 - Quasar

@dwilliams3 try this out and let me know if this gets you close.Solution.png

Labels