Alteryx Designer Discussions

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

Uploading a file with a dynamic name to S3 Bucket

6 - Meteoroid



can anyone help me? My workflow is running daily and exporting a file to s3 Bucket. Therefore I would like the file to be imported to be named "name+today" every time. In some discussions macro was suggested. This solution failed to work for me. 

Can someone please help me? What am I doing wrong? 




After I run the file is uploaded with the name "ExampleObject.csv" every time. It fails to update with the formula 


Best regards 


17 - Castor
17 - Castor

Hi @Mahmoud_Turki 


The idea of a batch macro is that you can use the control parameter to change the value of something in your macro from another workflow that uses the macro. So there's a couple of things you need to do.


1. If you haven't done so yet, you need to define a path for where your macro will be called from.

a. Create a folder such as C:\Alteryx\Macros

b. Go to settings->User Settings->Macros and set this folder as your default Macros path




2. Change the Action Tool to "Update Value" rather than "Update with Formula" - The thing you want to update with the Control Parameter is Object - Value.

3. Right click on the input data tool and select, "Convert to Macro Input" - this becomes a placeholder for the data you'll be passing - your macro should look like this:




4. Save your batch macro - Alteryx should default to saving it in your defined Macros path


Now you need to create a workflow that calls your macro. You need to create something like this. Once you've configured the input data tool, you can right-click on it, pick Insert after, scroll down to Macros and you should be able to pick your macro from the list. Note how I create a placeholder filename and then replace the yyyy-mm-dd with today's date. This becomes the input for your control parameter.



Attached is my example workflow and macro. I've removed my AWS Key and Secret in the macro. You'll have to add yours in and also enter you own AWS workspace details. 


Let me know if you have any further questions

6 - Meteoroid

Thank you so much David for that well explained and documented solution. I tested that and it worked. 

6 - Meteoroid


6 - Meteoroid