Workflow to create a document with field mapping and email it when row is added or changed?

I'm trying to create a workflow that will create a PDF document with mapping to fields in the sheet and then email it to one of our employees. So far I've got the documentation workflow working and it attaches it to the row. I created a second workflow for sending the alert. When I tried changing one of the rows to the status that will fire off the workflows it successfully creates the document but, the alert workflow doesn't run. I read someone else's post that said they thought the most recently modified rule runs first so I made sure to go in and change the name of the form workflow before doing a test. Also, I don't see any way to only email the newly created form. It only lists "attachment" in the included fields email. Ideally, the same workflow that creates the form could also email it.

Any help with this would be greatly appreciated!


  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    Hi @cbsarge,

    Creating a workflow in Smartsheet that automates the creation of a PDF document from sheet data, attaches it to a row, and then emails it as an attachment can involve a few steps and some troubleshooting. Here's a step-by-step guide to help you refine your workflow and address the issues you're facing:

    Step 1: Automate PDF Creation and Attachment

    It sounds like you've successfully set up this part. Your workflow that generates a PDF and attaches it to a row is working correctly. This is typically done through a "Document Builder" or similar automation tool within Smartsheet or integrating with third-party services like DocuSign or WebMerge through Smartsheet's API.

    Step 2: Troubleshooting the Alert Workflow

    If your alert workflow (intended to email the PDF attachment) isn't firing after the document is created and attached, consider the following:

    1. Check Workflow Triggers: Ensure the trigger for the alert workflow is set correctly. If it's based on a status change, verify that the change in the row precisely matches the trigger condition.
    2. Workflow Order: While Smartsheet does not officially document that the most recently modified rule runs first, workflow conflicts can occur. It's good that you tried adjusting the modification times. However, it's also important to ensure that there are no conflicting conditions or that the creation of the attachment itself doesn't inadvertently reset or affect the conditions needed to trigger the alert workflow.
    3. Automation Permissions: Verify that the automation (workflow) has the correct permissions to send emails. The account used to create the workflow needs to have permission to send emails on behalf of the sheet.

    Step 3: Emailing Only the Newly Created PDF

    Smartsheet's native functionality for workflows typically includes all attachments when sending an email alert that includes attachments. To specifically target the newly created PDF:

    1. Custom Solution: A direct, out-of-the-box solution for emailing only the newly created PDF as part of the workflow may not be available. You might need to explore custom scripting or third-party automation tools (like Zapier or Integromat) that can offer more granular control over attachments.
    2. API Integration: If you're comfortable with coding or have access to developer resources, you can use Smartsheet's API to create a more customized workflow. The API can be used to monitor for new attachments and send emails with specific attachments through an external service like SendGrid, Amazon SES, or even through a custom SMTP server.

    Step 4: Combining Workflows

    Ideally, combining the document creation and email alert into a single workflow would simplify the process. This might be challenging with Smartsheet's built-in features alone. Consider the following:

    1. Third-party Automation Tools: Tools like Zapier, Integromat, or Workato can listen for a trigger (like a row update), then perform multiple actions in sequence (e.g., create a document, wait for the document to be attached, and send an email with specific attachments).
    2. Custom Scripting with Smartsheet API: A custom script could listen for changes to a sheet, generate a PDF via a document creation service, attach it to the row, and then send a specific email. This requires more setup and possibly hosting the script on a server or a cloud function service like AWS Lambda or Google Cloud Functions.

    PMP Certified

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!