Triggers
Time to learn: 8 minutes
Prerequisites: Automation configured with data source and mappings
Triggers are the "go button" that tells Gdocify to generate documents. They determine when and how your automation runs.
Triggers Quick Reference
What Are Triggers?
Triggers are different ways to start your automation:
- Manual trigger: Click a button in Gdocify
- Airtable button: Click a button in your Airtable base
- Webhook: Call a URL from another app
- API: Send a request from your own application
Why Use Triggers?
Triggers let you:
- Control when documents are generated - Run on-demand or automatically
- Integrate with workflows - Connect to other tools and processes
- Automate generation - Set up hands-free document creation
- Scale easily - Generate documents for one record or thousands
Manual Triggers
The simplest way to run your automation.
How It Works
- Go to your automation in Gdocify
- Click the "Run" or "Generate" button
- Select which records to process:
- All records: Generate for every record
- Specific records: Choose individual records
- Click "Generate Documents"
When to Use
- Testing: Perfect for testing your automation
- One-time generation: When you need documents now
- Small batches: For processing a few records
- On-demand: When you control when to generate
Airtable Triggers
If you're using Airtable, you can add buttons directly in your base.
Button Trigger
Add a button field in Airtable that generates documents:
- In Airtable, add a "Button" field to your table
- Configure the button to call the Gdocify webhook URL
- When you click the button, it generates a document for that specific record
Perfect for:
- On-demand generation from Airtable
- Generating documents for specific records
- User-friendly interface for non-technical users
Script Trigger
Use Airtable scripts for advanced automation:
- Create an Airtable script
- Call the Gdocify API endpoint
- Generate documents based on script logic
Perfect for:
- Complex automation logic
- Conditional generation
- Advanced workflows
Email Trigger
Generate documents when records are emailed:
- Set up email automation in Airtable
- Configure to trigger Gdocify webhook
- Documents generate automatically when emails are sent
Perfect for:
- Automated email workflows
- Triggering from Airtable automations
- Event-driven generation
Google Sheets Webhook Triggers
Trigger from Google Sheets using webhooks:
- Set up a webhook URL in Gdocify
- Configure Google Sheets to call the webhook
- Use Google Apps Script or automation tools
- Documents generate when the webhook is called
Perfect for:
- Google Workspace workflows
- Spreadsheet-based automation
- Integration with Google Apps Script
API Triggers
For developers, trigger via API:
- Get your API endpoint and authentication key
- Send a POST request with record data
- Gdocify processes the request and generates documents
Perfect for:
- Custom applications
- Existing API infrastructure
- Full control over triggering
API Request Example
curl -X POST https://api.gdocify.com/trigger \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"automationId": "your-automation-id",
"recordId": "record-123"
}'
How Triggers Work
When a trigger is activated:
- Trigger received: Gdocify receives the trigger request
- Data loaded: Reads data from your data source
- Template processed: Applies data to your template
- Document generated: Creates the Google Doc and/or PDF
- Actions executed: Saves files, sends emails, calls webhooks
- Status updated: Records the execution in history
Choosing the Right Trigger
Manual Trigger
Use when:
- You need full control
- Testing your automation
- One-time or occasional generation
Airtable Button
Use when:
- Your team uses Airtable
- You want user-friendly triggering
- Generating for specific records
Webhook
Use when:
- Integrating with other apps
- Automating from external systems
- Building custom workflows
API
Use when:
- Building custom applications
- Need programmatic control
- Integrating with existing APIs
Testing Your Trigger
Before using triggers in production:
- Test with one record: Always test with a single record first
- Verify the output: Check that documents are generated correctly
- Check execution history: Review the execution log
- Test at scale: Once confirmed, test with multiple records
- Monitor performance: Watch for any issues
Best Practices
Trigger Selection
- Start simple: Begin with manual triggers
- Choose appropriately: Use the trigger that fits your workflow
- Test thoroughly: Always test before scaling
- Document your setup: Note which trigger you're using
Performance
- Batch processing: Process multiple records efficiently
- Rate limits: Be aware of API rate limits
- Error handling: Handle failures gracefully
- Monitoring: Track trigger success rates
Common Issues
"Trigger not working"
- Check that you've copied the URL correctly
- Verify authentication credentials
- Ensure the trigger endpoint is accessible
- Review execution history for errors
"Permission denied"
- Verify authentication credentials
- Check API keys or tokens
- Ensure proper permissions are granted
- Re-authorize if needed
"No records found"
- Make sure your data source has records
- Verify records are accessible
- Check filters or views aren't excluding all records
- Test data source connection
Tips
- Start with manual triggers: Easiest way to test your automation
- Test before scaling: Always test with one record before running for hundreds
- Use appropriate triggers: Choose the trigger type that fits your workflow
- Document your triggers: Note which trigger you're using for future reference
- Monitor execution: Keep an eye on trigger success rates
Next Steps
Now that you understand triggers:
- Learn about Run History to track executions
- Explore Email Notifications for delivery
- Check out Webhooks for integrations