# Create your first recipe
Build your first recipe with this video guide
A recipe is an automated workflow that connects your apps. Each recipe is comprised of a trigger and one or more actions. When you turn on your recipe, it waits for a triggering event to run the actions.
The following steps guide you through building a recipe that closes a case in Salesforce when an issue with the same name in Jira closes.
# Before you start
- To connect to your Jira account, you need the Host name, Email, and API token
For information on how to generate the API token, see create API token in Atlassian - To connect to your Salesforce account, you need your username and password.
# Step 1: Open a new recipe
- Navigate to Assets and click Create Recipe.
- Enter
My first recipe
in the Name field. - Click Start building.
# Step 2: Connect to Jira
- Search for the Jira app.
- Select Updated issue.
The Connection page opens. - Enter a name for the connection in the Connection name field.
Since you can reuse connections between recipes, enter a descriptive name so you can identify the account. For exampleTest Jira account
. - Enter the URL of your Jira account.
- Select
Yes
to use an API token to authenticate. - Enter the email you use to login to Jira.
- Enter the API token you retrieved from Atlassian.
- Click Connect.
You can now configure the trigger fields.
# Step 3: Set up the trigger
The recipe will run whenever an issue is closed. When you start the recipe, it will check for matching events from the previous seven days.
- In the When first started... field, enter this formula:
7.days.ago
- Click to set a trigger condition.
- In the Recipe data window, search for Status > Name.
- Drag the Name datapill into the Trigger data field.
- Set the condition to
contains
. - Set the value to
Closed
.
# Step 4: Connect to Salesforce
- Click the + below Actions and click Action in app.
- Search for the Salesforce app.
- Select Search records.
The Connection page opens. - Enter a descriptive name for the connection in the Connection name field.
- Click Connect.
The Salesforce login page opens in a new window. - Enter your username and password and click Log In.
You can now configure the action fields.
# Step 5: Set up the action
The recipe will search for cases in Salesforce with the same case name as the Jira issue.
- In the Search for field, select Case.
- Enter a limit of
150
records. - Drag the Summary datapill into the Subject field.
# Step 6: Set up the conditional statement
This step instructs the recipe to check if the Salesforce case is closed. If not, the recipe updates the status to closed.
- Click the + below Actions and click IF condition.
- Drag the Status datapill into Data field.
- Select the equals condition.
- Enter
Closed
in the Value field. - Click to Select an app...
- Select the Salesforce app > Update record.
The action automatically selects the connection you established in Step 4. - Select Case.
- Drag the Case ID datapill into the Case ID field.
- Select the Closed status.
# Step 7: Save and start your recipe
- Click Save then Exit.
- Click Start recipe. Your finished recipe should match this recipe (opens new window)
# What is next
A few ideas for what you can do next:
- Explore the Community library (opens new window) to find ready-to-use recipes that other users built.
- Learn more about other types of triggers and actions in recipe components