<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nat Sandoval</title>
    <description>The latest articles on Forem by Nat Sandoval (@nmsand).</description>
    <link>https://forem.com/nmsand</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F558642%2F2bf72ad0-31de-43ef-aff7-6d4847f1d4ff.jpg</url>
      <title>Forem: Nat Sandoval</title>
      <link>https://forem.com/nmsand</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nmsand"/>
    <language>en</language>
    <item>
      <title>How LGBTQ+ Diversity Builds Better Companies</title>
      <dc:creator>Nat Sandoval</dc:creator>
      <pubDate>Tue, 05 Jul 2022 16:09:29 +0000</pubDate>
      <link>https://forem.com/courier/how-lgbtq-diversity-builds-better-companies-1215</link>
      <guid>https://forem.com/courier/how-lgbtq-diversity-builds-better-companies-1215</guid>
      <description>&lt;p&gt;by &lt;em&gt;Nathalia Sandoval&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
In my first interview with Courier, when my now-boss was telling me about the company, he stopped and said, “I see your display name is not the same as the name on your application. Are there any other pronouns that I should be using?” It was a small gesture, but it made an impact on me. The moment hinted at a company culture built around treating people with respect and appreciating authenticity. Courier is still a very small company building the foundation of a diverse team, but even as we grow, I’m confident that this will remain a priority for us in the future. &lt;/p&gt;

&lt;p&gt;Encouraging employees to be their true selves in big and little ways is important because it’s the right thing to do—it also happens to be the best way to recruit a diverse team of employees. And increasing diversity improves many facets of an organization: Productivity, profits, employee retention, and even the ability to navigate conflict.&lt;/p&gt;

&lt;p&gt;In honor of Pride month, let’s talk about the power of diversity and how tech companies should improve inclusion in their organizations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diverse Teams Make More Money
&lt;/h2&gt;

&lt;p&gt;It doesn’t matter whether you’re talking about racial diversity, gender diversity, or other forms of diversity—people with different experiences often come up with different ideas from each other. Those unique insights drive innovation and better decision making, which, in turn, increases profits.&lt;/p&gt;

&lt;p&gt;When looking at your demographics, it’s important to consider power and hierarchies. If most of your diversity is at the entry-level while management and leadership remain primarily white, cis, able-bodied, and male, you aren’t going to see the same results as companies with diversity at every level. &lt;a href="https://www.bcg.com/en-us/publications/2018/how-diverse-leadership-teams-boost-innovation"&gt;Organizations with above-average diversity in management see 19% higher innovation revenue&lt;/a&gt; than companies with below-average diversity in management. The same study found that teams with above-average diversity in management also had &lt;a href="https://www.investopedia.com/terms/e/ebit.asp"&gt;EBIT&lt;/a&gt; (Earnings Before Interest and Taxes) margins that were 9% higher than organizations with below-average diversity in management.&lt;/p&gt;

&lt;p&gt;Studies that zero in on the results of increased diversity when it comes to specific demographics see interesting results too. A study that compared two genders (men and women) found that companies where &lt;a href="https://www.mckinsey.com/featured-insights/diversity-and-inclusion/diversity-wins-how-inclusion-matters"&gt;30% or more of their executives were women&lt;/a&gt;, outperform their peers. Unfortunately, the study didn’t acknowledge or account for other genders.&lt;br&gt;
Available research indicates these results apply to LGBTQ+ diversity as well. A study of the LGBTQ+ inclusivity at 657 publicly-traded U.S. companies found strong evidence that “&lt;a href="https://onlinelibrary.wiley.com/doi/10.1111/acfi.12787"&gt;more LGBT-friendly firms have higher profitability&lt;/a&gt; and higher stock market valuations.” Diversity makes sound commercial sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences Improve Collaboration and Innovation
&lt;/h2&gt;

&lt;p&gt;Diversity also affects how teams collaborate and innovate in complex ways. Overall, the more diverse a team is, the more creative and innovative they’ll be. Mixed-gender teams can &lt;a href="https://www.sciencedirect.com/science/article/abs/pii/S0749597816302205"&gt;better manage group conflict&lt;/a&gt; compared to homogenous teams and can better maximize creativity among team members.&lt;/p&gt;

&lt;p&gt;But some situations can thwart the benefits diversity brings. For instance, &lt;a href="https://onlinelibrary.wiley.com/doi/10.1002/job.2630?af=R"&gt;stress makes people in groups start leaning back into homogenous thinking&lt;/a&gt;. In turn, this can discourage employees who belong to marginalized groups from speaking up. Because these insights are no longer being shared, the benefits of diversity are lost, while employees feel detached and alienated. &lt;/p&gt;

&lt;p&gt;It’s also important to remember that employees who experience oppression are more likely to burn out. Glassdoor reviewed 209,112 workplace reviews and found that &lt;a href="https://www.glassdoor.com/research/pride-month-2022/"&gt;LGBTQ+ employees are 51% more likely to report burnout&lt;/a&gt; than their coworkers. A 2021 McKinsey report shared that LGBTQ+ women, disabled women, and Black women &lt;a href="https://www.mckinsey.com/featured-insights/diversity-and-inclusion/women-in-the-workplace"&gt;experienced more microaggressions&lt;/a&gt; than their peers and noted that, “Women who regularly experience microaggressions are…almost three times as likely to say that in the past few months they have struggled to concentrate at work as a result of stress.”&lt;/p&gt;

&lt;p&gt;In other words, if you want to experience the benefits of diversity, you must create a place where people can genuinely let their guard down and be themselves. That means increasing diversity in your team so employees don’t feel tokenized. This also means making your workplace a safe place to be a marginalized person. How do you do that? By making it an unsafe place for discrimination and harassment. For instance, leadership and management need to step in and say something when they see a microaggression happening. They need to make it an uncomfortable place to foster exclusion and hate.&lt;/p&gt;

&lt;p&gt;Harvard Business Review and Glassdoor partnered up for a series of &lt;a href="https://hbr.org/2020/01/the-new-analytics-of-culture"&gt;studies on diversity in the workplace&lt;/a&gt; and published an article on their findings in 2021. The author recommends “encouraging diverse cultural ideas while fostering agreement among employees about the importance of a common set of organizational norms and beliefs.” &lt;/p&gt;

&lt;h2&gt;
  
  
  Inclusivity is a Major Factor in Employee Retention
&lt;/h2&gt;

&lt;p&gt;Organizations looking to reduce employee turnover should consider that the level of inclusion employees feel at work greatly influences their career decisions. Whether or not your employees decide to take another job could come down to how comfortable they feel at work.&lt;/p&gt;

&lt;p&gt;A survey of 1,789 full-time U.S. employees and 2,000 live participant experiments found “high belonging was linked to a &lt;a href="https://hbr.org/2019/12/the-value-of-belonging-at-work"&gt;whopping 56% increase in job performance&lt;/a&gt;, a 50% drop in turnover risk, and a 75% reduction in sick days. For a 10,000-person company, this would result in annual savings of more than $52M.”&lt;/p&gt;

&lt;p&gt;A 2020 Catalyst survey of 2,100 employees at large corporations found that &lt;a href="https://www.catalyst.org/wp-content/uploads/2020/03/Getting-Real-About-Inclusive-Leadership-Report-2020update.pdf"&gt;35% of an employee’s emotional engagement in their job&lt;/a&gt; and 20% of an employee’s decision to stay or leave their current organization is determined by inclusivity.&lt;/p&gt;

&lt;p&gt;That’s not  surprising, given that feeling included at work is likely to make people happier, and happier employees are more likely to stay. What’s more interesting is that the retention benefits go beyond the demographics most affected. Workplaces with more gender diversity &lt;a href="https://journals.sagepub.com/doi/full/10.1177/0170840619875480"&gt;may see lower turnover&lt;/a&gt; in women and men. (Unfortunately, the research on inclusion didn’t include nonbinary employees.)&lt;/p&gt;

&lt;h2&gt;
  
  
  4 Tips for Increasing Employee Diversity
&lt;/h2&gt;

&lt;p&gt;To get these benefits, organizations need to clarify where they stand on diversity at every stage of the hiring process. Candidates who are most likely to improve the diversity of your organization will also be looking most carefully at how you talk about and approach diversity.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Assume many of your LGBTQ+ employees aren’t out at work
&lt;/h3&gt;

&lt;p&gt;The Williams Institute at the UCLA School of Law surveyed 935 adults who identified as “LGBT” in May 2021. They reported that &lt;a href="https://williamsinstitute.law.ucla.edu/publications/lgbt-workplace-discrimination/"&gt;50% of LGBT employees aren’t out to their supervisor&lt;/a&gt;, and 25% aren’t out to anyone at work. That’s likely because 45% of LGBT employees have already experienced unfair treatment at work at some point in their lives. Keep in mind that many employees will be reluctant to be themselves due to past experiences.&lt;/p&gt;

&lt;p&gt;It’s your job to make your organization's culture so welcoming and authentic that employees feel comfortable enough to be themselves. Have leadership and management start putting pronouns in their bios. Don’t invest in anti-LGBTQ+ companies or donate money to anti-LGBTQ+ politicians. Bring in diversity and inclusion educators from the communities they teach about. Never stop actively working to improve your organization’s diversity and inclusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Understand no marginalized communities are a monolith
&lt;/h3&gt;

&lt;p&gt;Oppression and inclusivity are not simple things. Especially at work. A Catalyst report on inclusivity put it well: “&lt;a href="https://www.catalyst.org/wp-content/uploads/2020/03/Getting-Real-About-Inclusive-Leadership-Report-2020update.pdf"&gt;Employees' work lives are often affected by their experiences as people with intersectional identities&lt;/a&gt; such as gender, race, ethnicity, religion, age, LGBTQ+ identity, etc. More granular views of employee experiences of inclusion are needed to truly make an impact.” The report advises organizations to avoid tokenizing employees and build inclusivity into the company culture so it goes beyond policies.&lt;br&gt;
Review your diversity and inclusion strategy and tactics. How is intersectionality addressed in the way you approach diversity and inclusion? If you don’t know the answer, bring in a dedicated diversity and inclusion educator to help you learn more and build intersectionality into your approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Don’t justify why diversity is vital to your organization
&lt;/h3&gt;

&lt;p&gt;Organizations that trip over themselves to explain they’re inclusive because it’s good for business risk alienating potential employees. Research shows employees are more likely to view an organization favorably if they make it clear to potential employees that &lt;a href="https://hbr.org/2022/06/stop-making-the-business-case-for-diversity"&gt;honoring diversity is at the core of the business&lt;/a&gt; and avoid any urge to explain why. For example, instead of saying. “We value diversity because it benefits us as well as our employees,” you could say something like, “Honoring and respecting employee diversity is and will continue to be a core value here.”&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Take action
&lt;/h3&gt;

&lt;p&gt;To impact future and current employees, you need to do more than learn and communicate; you’ll also need to take action. Think in big and small ways, such as ensuring health insurance covers gender-affirming care and encouraging employees to add pronouns to bios and email signatures. Ultimately each decision adds up to a culture that either helps employees thrive or holds them (and you) back.&lt;/p&gt;

&lt;p&gt;You should prioritize diversity for your organization because it’s the right thing to do. If you can build an inclusive environment where employees like me can be their real selves, every part of the business will benefit, too.&lt;br&gt;
All this is not to say that Courier has mastered building a diverse LGBTQ+ team (or will be able to do so in the near future), but we’re definitely taking a whack at it and I feel confident that we’ll get pretty close. To be a part of this mission, come &lt;a href="https://jobs.lever.co/trycourier"&gt;join the team&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>community</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How To Build Approval Workflows With Slack and Nodejs</title>
      <dc:creator>Nat Sandoval</dc:creator>
      <pubDate>Thu, 24 Mar 2022 01:56:11 +0000</pubDate>
      <link>https://forem.com/courier/using-courier-to-build-approval-workflows-5hen</link>
      <guid>https://forem.com/courier/using-courier-to-build-approval-workflows-5hen</guid>
      <description>&lt;p&gt;Utilized by countless organizations, approval workflows arrange the hierarchy of teams and the sequence of tasks for the ultimate goal of improving collaboration and efficiency. In my experience as a software engineer, approval workflows are vital for peer code reviews, but that’s not the only use case. In this article, we’ll explore the difference between manual and automated approval workflows and what you’ll need to know if you decide to automate your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an approval workflow?
&lt;/h2&gt;

&lt;p&gt;An approval workflow is a formalized process to ensure that project tasks are completed on time, are free of mistakes, and adhere to business and product standards. It generally consists of several phases of approval through different stages of project development. In software development, for example, approval workflows are often used to manage peer code reviews. Other use cases for approval workflows include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;granting temporary access to particular projects or accounts within an organization &lt;/li&gt;
&lt;li&gt;handling document requests such as vacation and time off requests&lt;/li&gt;
&lt;li&gt;reviewing invoice, budget, or expense reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Companies can structure their approval workflow manually, where it is up to each person to understand the hierarchy of approvals and initiate requests. However, manual workflows have limitations: they are harder to audit and can slow the company down. &lt;/p&gt;

&lt;p&gt;In this article, we explain in more detail why manual workflows can be limiting and when companies should prefer the automated option. If you are ready to automate, we will show you how you can do it by using Courier.&lt;/p&gt;

&lt;h2&gt;
  
  
  When a manual approval workflow might not fit your needs
&lt;/h2&gt;

&lt;p&gt;Suppose you’re a developer who needs their code peer reviewed and your company works with a manual approval workflow. You ask a team member to review your code. But in a fast-paced environment, there are so many moving pieces that your request for a peer review gets ignored or forgotten and you yourself forget to escalate the request. Not only might you and your team be frustrated with tasks falling through the cracks, but the software feature you had been working on gets delayed for a week and project schedules get shifted. &lt;/p&gt;

&lt;p&gt;This is exactly the situation I experienced in my software engineering role some time ago. Code reviews became bottlenecks in the process. In a manual approval workflow, it is up to the code author to follow up on the request for a code review and escalate the request if necessary, on top of their other tasks. &lt;/p&gt;

&lt;p&gt;In addition to the efficiency aspect, it’s difficult to ensure consistency with a manual workflow. A high degree of consistency allows all team members to know where they stand in the process, and removes the need for “reinventing the wheel” every time a new workflow begins. While checklists can be helpful in ensuring a consistent workflow, companies rarely use or follow them. Lack of consistency in tasks can become a serious limitation when applying for process certifications or security certifications.&lt;/p&gt;

&lt;p&gt;Finally, manual workflows often lack transparency. They are hard to analyze and troubleshoot, as the statistics on the steps are not very “readable” to a business analyst or even to an interested observer.&lt;/p&gt;

&lt;p&gt;To address the inefficiency, inconsistency and lack of transparency of manual approvals, companies often choose to automate parts of the approval process—especially the parts that are tedious or distracting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an automated approval workflow look like?
&lt;/h2&gt;

&lt;p&gt;Don’t spin up that shiny new Kubernetes cluster just yet! Automating an approval workflow doesn’t have to mean writing custom software. Tools like Slack are already available in many businesses and are well suited for simple automations. Let’s see what a Slack-based workflow could look like.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automated approval workflow with Slack
&lt;/h3&gt;

&lt;p&gt;A useful place to start an approval workflow automation is &lt;a href="https://slack.com/help/articles/115005265703-Create-a-bot-for-your-workspace"&gt;setting up a Slack bot&lt;/a&gt;. Using a dedicated bot account for approvals will lower the risk of security issues and allow you to customize your flow more easily, without requiring you to &lt;a href="https://api.slack.com/start/building"&gt;build a full-fledged Slack app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, you will need to create different &lt;a href="https://api.slack.com/messaging/composing/layouts"&gt;message templates&lt;/a&gt; for the specific tasks in your workflow. Then you can set up the automations—for example, posting one of the templated messages when a new pull request is ready for review. You’ll also need to specify the actions a user can perform on such notifications. We recommend including approvals, denials, reminders, and options to escalate a request. &lt;/p&gt;

&lt;p&gt;As you develop your workflow, you’ll notice that the creation of these templates and automations presents further details to consider. &lt;/p&gt;

&lt;h2&gt;
  
  
  What to watch out for if you build your own automations
&lt;/h2&gt;

&lt;p&gt;There are a few important factors to keep in mind if you’re creating your own automated approval workflow. The first is handling actions from users. Once the approval request is sent, what do you want to happen if it is accepted or denied? You will need to create different notification templates to alert the user making the request. The automation here also needs to stop the flow if the request is approved or denied. The next main factor is getting the timing right: if there is no response, you’ll have to decide how long until you escalate the request. What would be the right timing for your needs? For example, if a pull request isn’t approved within 30 minutes and it’s marked as P1/Urgent, you might want to escalate it right away, while other pull requests can likely wait a bit longer. If a request is ignored, to whom will the escalated request be sent? Additionally, you could add an option to manually escalate a request, interrupting the configured wait time.&lt;/p&gt;

&lt;p&gt;You will also have to manage the database for these procedures and the status of each request any time something changes. If any database complications arise, that’s more time you have to spend on sorting out what went wrong. Your current available resources may allow you to dedicate a developer to these tasks, but consider whether, in the future, you’ll want to expand your automations to other channels like email or SMS, which will also use development resources. &lt;/p&gt;

&lt;h2&gt;
  
  
  How Courier makes automated workflows easier
&lt;/h2&gt;

&lt;p&gt;At Courier, we have already implemented automations that best address customer needs, and it's all based on experience. The approval and escalation workflow is a straightforward use of &lt;a href="https://www.courier.com/docs/guides/tutorials/how-to-automate-message-sequences/"&gt;our product’s automations&lt;/a&gt;. For example, you would just make an API call from Courier to start the automation. You could then add actions to this automated notification that would trigger other automations depending on whether the request is approved, is denied, or needs to be escalated. Instead of configuring the details of the automations, you’ll just need to create the API calls. &lt;/p&gt;

&lt;p&gt;&lt;a href="//images.ctfassets.net/z7iqk1q8njt4/7bxH46wFV2Lpmk6NjQ9jop/54d704b36f2c207345c996aa9b3ddd26/approval-workflows-1.png" class="article-body-image-wrapper"&gt;&lt;img src="//images.ctfassets.net/z7iqk1q8njt4/7bxH46wFV2Lpmk6NjQ9jop/54d704b36f2c207345c996aa9b3ddd26/approval-workflows-1.png" alt="approval-workflows-1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Courier, you can create or &lt;a href="https://help.courier.com/en/articles/5437032-using-the-automation-template-visual-designer"&gt;configure dynamic templates&lt;/a&gt; easily. Courier also makes it simple to add more communication channels, whether you need email or SMS notifications. The benefit here is that your team does not have to spend any extra time on code outside of building your product. Your approval workflow can expand, adding users or communication channels, as you develop your product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of an automated workflow with Courier and Slack
&lt;/h2&gt;

&lt;p&gt;An automated approval workflow with Courier and Slack requires two components: a Slack bot, as mentioned above, and a Courier workflow that’s set up in the Courier user interface.&lt;/p&gt;

&lt;p&gt;The relevant part of the Slack bot gets attached to the /request_access Slack &lt;a href="https://slack.com/help/articles/201259356-Slash-commands-in-Slack"&gt;slash command&lt;/a&gt; and handles the sending of a message to Courier for the next steps. Here’s how the Node.js code that accomplishes this task can look:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Handle the command to start slack bot access request&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/request_access&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;say&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ack&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Message to send to Courier&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;@&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;gt; is requesting access &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;to &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;

    &lt;span class="c1"&gt;// The person requesting access who ran the command&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;requestor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user_id&lt;/span&gt;

    &lt;span class="c1"&gt;// First automation from template is called for initial access request.&lt;/span&gt;
   &lt;span class="c1"&gt;// Sends to first user, then waits 30 minutes before initiating the escalation request&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;runId&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;courier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;automations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;invokeAutomationTemplate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;templateId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;initial_access_request&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;slack&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;access_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SLACK_BOT_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;requestor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;requestId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ERROR &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;say&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;There was an error sending your request&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The corresponding Courier workflow that gets activated when the Slack bot sends the message to Courier can consist of the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send a confirmation of the request to the user who requested access.&lt;/li&gt;
&lt;li&gt;Send a message to the person who should handle the approval request.&lt;/li&gt;
&lt;li&gt;Wait for 30 minutes, and if the request hasn’t been approved by that time, send another message to the sender to tell them the request is getting escalated.&lt;/li&gt;
&lt;li&gt;Start the next automation that handles the escalation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s how such a workflow would look in the Courier user interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="//images.ctfassets.net/z7iqk1q8njt4/4hnC7BpOevx1KJCcDveM3U/fc2602cdf51b4d0f202f7c3c26c4d623/approval-workflows-2.png" class="article-body-image-wrapper"&gt;&lt;img src="//images.ctfassets.net/z7iqk1q8njt4/4hnC7BpOevx1KJCcDveM3U/fc2602cdf51b4d0f202f7c3c26c4d623/approval-workflows-2.png" alt="approval-workflows-2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The approval request that Courier sends with this workflow looks like a Slack message from the Slack bot—AccessBot in this case. It offers three actions on the request: Approve, Reject, and Request Further Approval.&lt;/p&gt;

&lt;p&gt;&lt;a href="//images.ctfassets.net/z7iqk1q8njt4/3qE788hhfcaB6l2OEi6fWy/a6daf46b21fc3377c9d6afbfcb53d439/approval-workflows-3.png" class="article-body-image-wrapper"&gt;&lt;img src="//images.ctfassets.net/z7iqk1q8njt4/3qE788hhfcaB6l2OEi6fWy/a6daf46b21fc3377c9d6afbfcb53d439/approval-workflows-3.png" alt="approval-workflows-3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ready to automate your approval workflow?
&lt;/h2&gt;

&lt;p&gt;While manual workflows might be suitable for your needs, they also have their limitations. Automations help with these limitations, as well as ensuring efficiency, consistency, and visibility. Creating your own automated workflow will, however, cost you time and resources that could instead be spent on further developing your product. Also, keep in mind that automated approval workflows have many use cases besides peer code reviews, such as for various internal tasks or in your actual product. They can be used within any organization that needs to automate company document requests or control access to project or customer accounts, such as for support issues.&lt;/p&gt;

&lt;p&gt;This article has explored what you need to consider in designing an approval workflow. At Courier, we’ve worked hard to create automations tailored to our customers' needs and we continue trying to find new problems that we can solve. If you’re interested in helping us out,  send us a message or follow us on Twitter at &lt;a class="mentioned-user" href="https://dev.to/trycourier"&gt;@trycourier&lt;/a&gt; today!&lt;/p&gt;

</description>
      <category>slack</category>
      <category>automation</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
