Courseiva

SPLK-1004 · domain

Macros And Workflow Actions

This domain covers Splunk macros (search, eval, and workflow-action varieties) and workflow actions that turn field values into clickable links. Questions test where link targets get their values, how arguments and labels behave, and the order in which macro contents are expanded and processed inside a search pipeline.

41 questions11 easy16 medium14 hard

Focused practice

Practice Macros And Workflow Actions questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Macros And Workflow Actions

Be able to create and call macros with correct argument syntax and configure workflow actions that build links from field values. The critical skill is knowing which macro type fits a task and where a workflow action link actually gets its values.

Distinguishing search, eval, and workflow-action macro types and their argument definitions

Identifying valid sources for workflow action link values such as field values and search results

Configuring workflow actions to open external URLs or run secondary searches from a field

Understanding macro expansion order relative to search command processing and field extraction

Watch out for

Common Macros And Workflow Actions exam traps

  • ▸Confusing eval macros, which return a value to a field, with search macros that insert SPL into the pipeline
  • ▸Assuming workflow action links can pull values from anywhere instead of only defined fields and results
  • ▸Forgetting that macro arguments are positional and that missing or extra arguments break expansion

Question index

All Macros And Workflow Actions questions (41)

Click any question to see the full explanation, or start a practice session above.

1

You want to ensure a macro is only available to a specific user role. Where do you configure this restriction?

Medium
2

When a workflow action is configured with 'Search' type, what happens if the 'Link URI' field is also populated?

Medium
3

When creating a workflow action, what does the 'Apply only to the following fields' field do?

Medium
4

You need to pass a field value from a search result into a workflow action URL. What syntax should you use in the URI field?

Medium
5

You want a macro to expand to a specific set of fields. Which field in the macro definition would you use to provide a default value if the user provides no arguments?

Hard
6

A Splunk administrator is creating a search macro that will be used to standardize the extraction of a user ID from an email address. The macro should accept an email field as an argument and return only the portion before the '@' symbol. The administrator wants to ensure that when the macro is invoked in a search, the argument is properly validated to be a valid email address. Which of the following is the correct way to define the validation for this macro?

Medium
7

A Splunk administrator is creating a search macro that will be used in a dashboard. The macro should accept a time range as an argument and use it in an `earliest` and `latest` clause. The administrator wants to ensure that the macro can be called with different time ranges without modifying the macro definition. Which of the following is the correct way to define the macro arguments?

Hard
8

A Splunk power user has created a macro named `convert_time` that accepts one argument, a time field, and returns the time in epoch format. The user wants to use this macro in a search and also wants to ensure that if the macro is called without an argument, it uses a default field named `_time`. Which approach should be used?

Hard
9

Which of the following is a capability that must be enabled for a user to create macros?

Hard
10

A user has defined a macro with the argument 'user_id'. When calling the macro, the user provides the value 'admin'. How should the macro be invoked in the search bar?

Hard
11

Where are search macros primarily stored within the Splunk configuration file system?

Easy
12

When using a macro in a search, what happens if the macro is not defined?

Medium
13

What happens if a macro name conflicts with a Splunk search command name?

Hard
14

A Splunk power user is creating a macro that will be used in a search. The macro definition includes a search command that is not permitted by the user's role. What happens when the user attempts to run a search that calls this macro?

Medium
15

Which of the following is true about search macros?

Easy
16

When configuring a workflow action of type 'GET', what is the purpose of the 'Link URI' field?

Medium
17

In the context of workflow actions, what is the 'POST' method used for?

Easy
18

Which THREE of the following are valid sources of information for a Workflow Action link?

Hard
19

A security analyst needs a search macro that will be used across multiple dashboards and alerts. The macro must accept a field name as an argument and return a search string that filters events where that field equals a specific value. The analyst wants to ensure that the macro can be reused without modification in different contexts. Which of the following best describes how the macro should be defined to achieve this?

Medium
20

You need to create a search macro that accepts one argument. How should you define the argument in the macro definition field?

Easy
21

A Splunk administrator defines a search macro `top_errors(2)` with arguments `$host$` and `$error_type$`. The definition is `index=main host=$host$ error_type=$error_type$ | top limit=10 error_message`. The administrator sets a validation expression for the first argument as `match($host$, "^[a-zA-Z0-9.-]+$")` and for the second argument as `match($error_type$, "^(critical|warning|info)$")`. An analyst invokes the macro as `| top_errors("web-01", "fatal")`. What happens?

Medium
22

A user wants to create a workflow action that, when clicked, runs a secondary search in Splunk and displays the results in the current window. The action should be available for all events. Which workflow action type should be selected?

Easy
23

Which type of workflow action allows you to execute a new search based on the value of a field in a current search result?

Easy
24

Which TWO of the following features are supported by Search Macros?

Easy
25

A Splunk power user is creating a workflow action of type 'Search' that will run a secondary search when an analyst clicks a field value in the results. The user wants the secondary search to open in a new browser tab and to pass the clicked field value as an argument to the search. Which configuration should the user apply?

Medium
26

A security team defines a macro `threat_lookup(2)` with arguments `$ip$` and `$severity$`. In the macro definition UI they set the validation for `$severity$` to a regular expression of `^(low|medium|high)$` and a validation error message of "Severity must be low, medium, or high." An analyst runs `| `threat_lookup("10.1.1.5", "critical")``. What is the result?

Hard
27

When creating a workflow action, what is the 'Label' field used for?

Easy
28

Where can users find a list of all currently available workflow actions?

Easy
29

What is the maximum number of arguments a search macro can accept?

Medium
30

A Splunk administrator is creating a workflow action that will appear when a user clicks on a field value in search results. The action should open a new browser tab and pass the field value to an external ticketing system via a URL. The administrator wants to ensure that the field value is properly URL-encoded and that the action is only available for events where the field `status` equals `open`. Which of the following configurations will achieve this?

Hard
31

You have a macro that uses a search command that is not allowed by the user's role. What happens when the user tries to run the macro?

Hard
32

A Splunk administrator is configuring a workflow action that will appear when a user clicks on a field value in search results. The action should open a new browser tab to an external threat intelligence website, passing the field value as a query parameter. The administrator sets the action type to `link` and configures the URI as `https://threatintel.example.com/search?q=$value$`. However, when testing, the link opens in the same tab, replacing the Splunk UI. Which setting must be adjusted to ensure the link opens in a new tab?

Hard
33

Which THREE of the following are valid ways to manage Search Macros in Splunk?

Medium
34

Which TWO of the following are true regarding the order of operations when a macro is used in a search?

Hard
35

A security team maintains a search macro named `net_flow_analysis` in the `syslog` app. The macro is defined with `definition = index=network sourcetype=firewall | stats count by src_ip, dest_ip` and no arguments. An analyst runs a search in the Search & Reporting app: `| net_flow_analysis`. What is the result of this search?

Medium
36

A team is building a workflow action that will appear when an analyst clicks a `dest_ip` field in search results. They want the action to open an internal ticketing system, pre-filling the ticket form with the destination IP and the event's timestamp. Which two configuration elements are required for this workflow action to function? (Choose two.)

Medium
37

How can you debug a macro that is not expanding as expected in a search?

Hard
38

Which THREE pieces of information are displayed in the 'Search Macros' listing page in Splunk Web?

Medium
39

A Splunk power user creates a workflow action of type 'Search' that uses a field named `clientip` to launch a search for that IP address. The user wants the search to open in a new window and to pass the field value as a search term. Which configuration settings are required to achieve this?

Hard
40

A SOC manager wants analysts to be able to right-click a `user` field value in search results and open that user's profile page in the organization's identity portal. The portal accepts a URL of the form `https://idp.example.com/user/<username>`. Which workflow action type and configuration should be used?

Easy
41

A Splunk user wants to create a workflow action that appears when a user clicks on the `clientip` field in search results. The action should open an external website that displays geolocation information for that IP address. The URL for the website is `https://ipinfo.io/$clientip$`. Which type of workflow action should the user create?

Easy

Frequently asked questions

What does the Macros And Workflow Actions domain cover on the SPLK-1004 exam?
Be able to create and call macros with correct argument syntax and configure workflow actions that build links from field values. The critical skill is knowing which macro type fits a task and where a workflow action link actually gets its values.
How many questions are in this domain?
This page lists all 41 Macros And Workflow Actions questions in the SPLK-1004 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Macros And Workflow Actions questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
Splunk Core Certified Advanced Power User (SPLK-1004) (SPLK-1004) Macros And Workflow Actions Practice Questions